Home
last modified time | relevance | path

Searched refs:hp (Results 1 – 25 of 203) sorted by relevance

123456789

/mirbsd/src/sys/dev/sdmmc/
Dsdhc.c55 #define HDEVNAME(hp) ((hp)->sc->sc_dev.dv_xname) argument
60 #define HREAD1(hp, reg) \ argument
61 (bus_space_read_1((hp)->iot, (hp)->ioh, (reg)))
62 #define HREAD2(hp, reg) \ argument
63 (bus_space_read_2((hp)->iot, (hp)->ioh, (reg)))
64 #define HREAD4(hp, reg) \ argument
65 (bus_space_read_4((hp)->iot, (hp)->ioh, (reg)))
66 #define HWRITE1(hp, reg, val) \ argument
67 bus_space_write_1((hp)->iot, (hp)->ioh, (reg), (val))
68 #define HWRITE2(hp, reg, val) \ argument
[all …]
/mirbsd/src/usr.sbin/lpr/pac/
Dpac.c227 struct hent *hp; in account() local
261 hp = lookup(cp); in account()
262 if (hp == NULL) { in account()
265 hp = enter(cp); in account()
267 hp->h_feetpages += t; in account()
269 hp->h_count += ic; in account()
271 hp->h_count++; in account()
283 struct hent *hp, **ap; in dumpit() local
287 hp = hashtab[0]; in dumpit()
289 base = (struct hent **) malloc(hcount * sizeof(hp)); in dumpit()
[all …]
/mirbsd/src/usr.sbin/config/
Dhash.c174 struct hashent *hp; in newhashent() local
177 m = poolalloc(sizeof(*hp) + ALIGNBYTES); in newhashent()
178 hp = (struct hashent *)ALIGN(m); in newhashent()
179 hp->h_name = name; in newhashent()
180 hp->h_hash = h; in newhashent()
181 hp->h_next = NULL; in newhashent()
182 return (hp); in newhashent()
213 struct hashent *hp, **hpp; in intern() local
221 for (; (hp = *hpp) != NULL; hpp = &hp->h_next) in intern()
222 if (hp->h_hash == h && strcmp(hp->h_name, s) == 0) in intern()
[all …]
/mirbsd/src/usr.bin/xstr/
Dxstr.c340 struct hash *hp, *hp0; in hashit() local
342 hp = hp0 = &bucket[lastchr(str) & 0177]; in hashit()
343 while (hp->hnext) { in hashit()
344 hp = hp->hnext; in hashit()
345 i = istail(str, hp->hstr); in hashit()
347 return (hp->hpt + i); in hashit()
349 if ((hp = (struct hash *) calloc(1, sizeof (*hp))) == NULL) { in hashit()
353 hp->hpt = mesgpt; in hashit()
354 if (!(hp->hstr = strdup(str))) { in hashit()
358 mesgpt += strlen(hp->hstr) + 1; in hashit()
[all …]
/mirbsd/src/gnu/usr.sbin/sendmail/libsm/
Dheap.c528 SM_HEAP_ITEM_T *hi, **hp; local
541 for (hp = &SmHeapTable[ptrhash(ptr)]; *hp != NULL; hp = &(**hp).hi_next)
543 if ((**hp).hi_ptr == ptr)
547 hi = *hp;
562 *hp = hi->hi_next;
565 hp = &SmHeapTable[ptrhash(newptr)];
566 hi->hi_next = *hp;
567 *hp = hi;
596 SM_HEAP_ITEM_T *hi, **hp; local
611 for (hp = &SmHeapTable[ptrhash(ptr)]; *hp != NULL; hp = &(**hp).hi_next)
[all …]
/mirbsd/src/usr.sbin/dhcpd/
Dbootp.c50 struct host_decl *hp, *host = NULL; in bootp() local
73 hp = find_hosts_by_haddr(packet->raw->htype, packet->raw->chaddr, in bootp()
82 if (hp) in bootp()
83 subnet = find_host_for_network(&hp, &ip_address, in bootp()
93 if (hp) in bootp()
94 for (; hp; hp = hp->n_ipaddr) in bootp()
95 if (!hp->fixed_addr) { in bootp()
96 host = hp; in bootp()
207 if (hp && (!hp->group->allow_booting)) { in bootp()
208 note("Ignoring excluded BOOTP client %s", hp->name); in bootp()
[all …]
/mirbsd/src/usr.sbin/timed/timedc/
Dcmds.c66 struct hostent *hp; variable
207 hp = gethostbyname(*argv); in clockdiff()
208 if (hp == NULL) { in clockdiff()
220 server.sin_family = hp->h_addrtype; in clockdiff()
221 memmove(&server.sin_addr.s_addr, hp->h_addr, hp->h_length); in clockdiff()
233 printf("%s is down\n", hp->h_name); in clockdiff()
237 hp->h_name); in clockdiff()
240 printf("%s is unreachable\n", hp->h_name); in clockdiff()
250 dayaddr.sin_family = hp->h_addrtype; in clockdiff()
251 memmove(&dayaddr.sin_addr.s_addr, hp->h_addr, in clockdiff()
[all …]
/mirbsd/src/sys/lib/libsa/
Dustarfs.c57 static ustar_hdr_t *hp = (ustar_hdr_t *)bounce_buf; variable
58 #define ISAFILE() (!hp->typeflag || hp->typeflag == '0' || \
59 hp->typeflag == '7')
60 #define ISALINK() (hp->typeflag == '1')
82 blk, 512, (void *)hp, &buflen))) in rd()
95 ustar_hdr_t *h2 = hp + 1; in ustar_check()
99 if (memcmp((char *)hp + offsetof(ustar_hdr_t, magic), in ustar_check()
103 if (hp->typeflag && (hp->typeflag < '0' || hp->typeflag > '7')) in ustar_check()
106 memcpy(h2, hp, 512); in ustar_check()
110 if (sum != UNOCT(hp->chksum)) in ustar_check()
[all …]
/mirbsd/src/usr.bin/mail/
Dsend.c328 mail1(struct header *hp, int printheaders) in mail1() argument
340 if ((mtf = collect(hp, printheaders)) == NULL) in mail1()
343 if (hp->h_subject == NULL) in mail1()
354 to = usermap(cat(hp->h_bcc, cat(hp->h_to, hp->h_cc))); in mail1()
363 to = outof(to, mtf, hp); in mail1()
369 fixhead(hp, to); in mail1()
370 if ((mtf = infix(hp, mtf)) == NULL) { in mail1()
374 namelist = unpack(hp->h_smopts, to); in mail1()
429 fixhead(struct header *hp, struct name *tolist) in fixhead() argument
433 hp->h_to = NULL; in fixhead()
[all …]
Dcollect.c66 collect(struct header *hp, int printheaders) in collect() argument
101 if (hp->h_subject == NULL && value("interactive") != NULL && in collect()
105 puthead(hp, stdout, t); in collect()
108 if (getsub && gethfromtty(hp, GSUBJECT) == -1) in collect()
220 grabh(hp, GTO|GSUBJECT|GCC|GBCC); in collect()
226 hp->h_to = cat(hp->h_to, extract(&linebuf[2], GTO)); in collect()
235 hp->h_subject = savestr(cp); in collect()
241 hp->h_cc = cat(hp->h_cc, extract(&linebuf[2], GCC)); in collect()
247 hp->h_bcc = cat(hp->h_bcc, extract(&linebuf[2], GBCC)); in collect()
340 puthead(hp, stdout, GTO|GSUBJECT|GCC|GBCC|GNL); in collect()
[all …]
/mirbsd/src/bin/mksh/
Dhistrap.c96 char **hfirst, **hlast, **hp, *editor = NULL; in c_fc() local
187 hp = first ? hist_get(first, false, false) : in c_fc()
189 if (!hp) in c_fc()
193 strdupx(line, *hp, ATEMP); in c_fc()
204 for (s = *hp; (s1 = strstr(s, pat)) && in c_fc()
275 for (hp = rflag ? hlast : hfirst; in c_fc()
276 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1) { in c_fc()
279 hist_source->line - (int)(histptr - hp)); in c_fc()
282 s = *hp; in c_fc()
303 for (hp = rflag ? hlast : hfirst; in c_fc()
[all …]
/mirbsd/src/usr.bin/talk/
Dget_addrs.c50 struct hostent *hp; local
55 hp = gethostbyname(my_machine_name);
56 if (hp == NULL)
58 memmove((char *)&my_machine_addr, hp->h_addr, hp->h_length);
64 hp = gethostbyname(his_machine_name);
65 if (hp == NULL)
67 memmove((char *) &his_machine_addr, hp->h_addr, hp->h_length);
/mirbsd/src/lib/libm/src/
De_remainder.c36 int32_t hx,hp; in __ieee754_remainder() local
41 EXTRACT_WORDS(hp,lp,p); in __ieee754_remainder()
43 hp &= 0x7fffffff; in __ieee754_remainder()
47 if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */ in __ieee754_remainder()
49 ((hp>=0x7ff00000)&& /* p is NaN */ in __ieee754_remainder()
50 (((hp-0x7ff00000)|lp)!=0))) in __ieee754_remainder()
54 if (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p); /* now x < 2p */ in __ieee754_remainder()
55 if (((hx-hp)|(lx-lp))==0) return zero*x; in __ieee754_remainder()
58 if (hp<0x00200000) { in __ieee754_remainder()
De_remainderf.c30 int32_t hx,hp; in __ieee754_remainderf() local
35 GET_FLOAT_WORD(hp,p); in __ieee754_remainderf()
37 hp &= 0x7fffffff; in __ieee754_remainderf()
41 if(hp==0) return (x*p)/(x*p); /* p = 0 */ in __ieee754_remainderf()
43 ((hp>0x7f800000))) /* p is NaN */ in __ieee754_remainderf()
47 if (hp<=0x7effffff) x = __ieee754_fmodf(x,p+p); /* now x < 2p */ in __ieee754_remainderf()
48 if ((hx-hp)==0) return zero*x; in __ieee754_remainderf()
51 if (hp<0x01000000) { in __ieee754_remainderf()
/mirbsd/src/lib/libc/net/
Dgethostnamadr.c87 static void map_v4v6_hostent(struct hostent *hp, char **bp, char *);
142 const HEADER *hp; local
174 hp = &answer->hdr;
175 ancount = ntohs(hp->ancount);
176 qdcount = ntohs(hp->qdcount);
429 gethostbyname_r(const char *name, struct hostent *hp, char *buf, int buflen, argument
438 memcpy(hp, res, sizeof *hp); /* XXX not sufficient */
439 return hp;
466 struct hostent *hp; local
470 hp = _gethtbyname2(name, AF_INET);
[all …]
Dres_mkquery.c83 HEADER *hp; in res_mkquery() local
108 hp = (HEADER *) buf; in res_mkquery()
110 hp->id = htons(_resp->id); in res_mkquery()
111 hp->opcode = op; in res_mkquery()
112 hp->rd = (_resp->options & RES_RECURSE) != 0; in res_mkquery()
113 hp->rcode = NOERROR; in res_mkquery()
136 hp->qdcount = htons(1); in res_mkquery()
157 hp->arcount = htons(1); in res_mkquery()
179 hp->ancount = htons(1); in res_mkquery()
196 HEADER *hp; in res_opt() local
[all …]
/mirbsd/src/lib/libc/gen/
Dalloca.c94 header *hp; /* Traverses linked list. */ in alloca() local
96 for (hp = last_alloca_header; hp != NULL;) in alloca()
97 if ((STACK_DIRECTION > 0 && hp->h.deep > depth) in alloca()
98 || (STACK_DIRECTION < 0 && hp->h.deep < depth)) in alloca()
100 header *np = hp->h.next; in alloca()
102 free ((pointer) hp); /* Collect garbage. */ in alloca()
104 hp = np; /* -> next header. */ in alloca()
109 last_alloca_header = hp; /* -> last valid storage. */ in alloca()
/mirbsd/src/gnu/usr.sbin/sendmail/sendmail/
Ddaemon.c1657 register struct hostent *hp; local
1659 hp = sm_gethostbyname(addr, AF_INET);
1660 if (hp == NULL)
1665 while (*(hp->h_addr_list) != NULL &&
1666 hp->h_addrtype != AF_INET)
1667 hp->h_addr_list++;
1668 if (*(hp->h_addr_list) == NULL)
1673 *(hp->h_addr_list),
1676 freehostent(hp);
1677 hp = NULL;
[all …]
/mirbsd/src/usr.bin/rup/
Drup.c66 struct host_list *hp; in search_host() local
71 for (hp = hosts; hp != NULL; hp = hp->next) { in search_host()
72 if (hp->addr.s_addr == addr.s_addr) in search_host()
81 struct host_list *hp; in remember_host() local
83 if (!(hp = (struct host_list *)malloc(sizeof(struct host_list)))) { in remember_host()
87 hp->addr.s_addr = addr.s_addr; in remember_host()
88 hp->next = hosts; in remember_host()
89 hosts = hp; in remember_host()
157 struct hostent *hp; in rstat_reply() local
162 hp = gethostbyaddr((char *)&raddrp->sin_addr.s_addr, in rstat_reply()
[all …]
/mirbsd/src/sbin/mountd/
Dmountd.c373 struct hostent *hp = NULL; in mntsrv() local
470 if (hp == NULL) in mntsrv()
471 hp = gethostbyaddr((caddr_t)&saddr, in mntsrv()
473 if (hp) in mntsrv()
474 add_mlist(hp->h_name, dirpath); in mntsrv()
506 hp = gethostbyaddr((caddr_t)&saddr, sizeof(saddr), AF_INET); in mntsrv()
507 if (hp) in mntsrv()
508 del_mlist(hp->h_name, dirpath); in mntsrv()
518 hp = gethostbyaddr((caddr_t)&saddr, sizeof(saddr), AF_INET); in mntsrv()
519 if (hp) in mntsrv()
[all …]
/mirbsd/src/lib/libcompat/4.3/
Drexec.c54 struct hostent *hp; in rexec() local
60 hp = gethostbyname(*ahost); in rexec()
61 if (hp == 0) { in rexec()
65 *ahost = hp->h_name; in rexec()
66 ruserpass(hp->h_name, &name, &pass); in rexec()
73 sin.sin_family = hp->h_addrtype; in rexec()
76 memmove((char *)&sin.sin_addr, hp->h_addr, (size_t)hp->h_length); in rexec()
84 perror(hp->h_name); in rexec()
/mirbsd/src/gnu/usr.bin/cvs/src/
Dhardlink.c67 Node *hp, *p; in lookup_file_by_inode() local
95 hp = findnode (hardlist, inodestr); in lookup_file_by_inode()
96 if (hp == NULL) in lookup_file_by_inode()
98 hp = getnode (); in lookup_file_by_inode()
99 hp->type = NT_UNKNOWN; in lookup_file_by_inode()
100 hp->key = inodestr; in lookup_file_by_inode()
101 hp->data = getlist (); in lookup_file_by_inode()
102 hp->delproc = delhardlist; in lookup_file_by_inode()
103 (void) addnode (hardlist, hp); in lookup_file_by_inode()
110 p = findnode (hp->data, filepath); in lookup_file_by_inode()
[all …]
/mirbsd/src/usr.sbin/httpd/src/main/
Dutil_uri.c113 API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp) in ap_pduphostent() argument
121 if (hp == NULL) in ap_pduphostent()
125 if (hp->h_aliases != NULL) in ap_pduphostent()
126 for (; hp->h_aliases[j] != NULL; ++j) in ap_pduphostent()
130 if (hp->h_addr_list != NULL) in ap_pduphostent()
131 for (; hp->h_addr_list[i] != NULL; ++i) in ap_pduphostent()
135 newent = (struct hostent *) ap_palloc(p, sizeof(*hp)); in ap_pduphostent()
140 *newent = *hp; in ap_pduphostent()
141 newent->h_name = ap_pstrdup(p, hp->h_name); in ap_pduphostent()
146 for (j = 0; hp->h_aliases[j] != NULL; ++j) { in ap_pduphostent()
[all …]
/mirbsd/src/sbin/umount/
Dumount.c165 struct hostent *hp; in umountfs() local
217 hp = gethostbyname(hostp); in umountfs()
222 hp = gethostbyname(hostp); in umountfs()
226 hp = NULL; in umountfs()
227 if (!namematch(hp)) in umountfs()
242 (hp != NULL) && !(fflag & MNT_FORCE)) { in umountfs()
247 memmove(&saddr.sin_addr, hp->h_addr, hp->h_length); in umountfs()
351 namematch(struct hostent *hp) in namematch() argument
355 if ((hp == NULL) || (nfshost == NULL)) in namematch()
358 if (strcasecmp(nfshost, hp->h_name) == 0) in namematch()
[all …]
/mirbsd/src/sbin/routed/rtquery/
Drtquery.c143 struct hostent *hp = gethostbyname(optarg); in main() local
144 if (hp == 0) { in main()
150 memmove(&OMSG.rip_nets[0].n_dst, hp->h_addr, in main()
398 struct hostent *hp; in out() local
411 hp = gethostbyname(host); in out()
412 if (hp == 0) { in out()
416 memmove(&router.sin_addr, hp->h_addr, sizeof(router.sin_addr)); in out()
444 struct hostent *hp; in rip_input() local
451 hp = gethostbyaddr((char*)&from->sin_addr, in rip_input()
453 if (hp == 0) { in rip_input()
[all …]

123456789