Home
last modified time | relevance | path

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

12345678910>>...16

/freebsd/libexec/bootpd/
H A Ddumptab.c45 struct host *hp; in dumptab() local
103 for (hp = (struct host *) hash_FirstEntry(nmhashtable); hp != NULL; in dumptab()
104 hp = (struct host *) hash_NextEntry(nmhashtable)) { in dumptab()
105 dump_host(fp, hp); in dumptab()
122 dump_host(FILE *fp, struct host *hp) in dump_host() argument
125 if (hp) { in dump_host()
126 fprintf(fp, "%s:", (hp->hostname ? in dump_host()
127 hp->hostname->string : "?")); in dump_host()
128 if (hp->flags.bootfile) { in dump_host()
129 fprintf(fp, "\\\n\t:bf=%s:", hp->bootfile->string); in dump_host()
[all …]
H A Ddovend.c37 dovend_rfc1497(struct host *hp, byte *buf, int len) in dovend_rfc1497() argument
46 hp->hostname->string, MSG); \ in dovend_rfc1497()
63 if (hp->flags.time_offset) { in dovend_rfc1497()
67 insert_u_long(htonl(hp->time_offset), &vp); /* -4 bytes */ in dovend_rfc1497()
73 if (hp->flags.swap_server) { in dovend_rfc1497()
78 insert_u_long(hp->swap_server.s_addr, &vp); /* -4 bytes */ in dovend_rfc1497()
81 if (hp->flags.root_path) { in dovend_rfc1497()
86 len = strlen(hp->root_path->string); in dovend_rfc1497()
90 bcopy(hp->root_path->string, vp, len); in dovend_rfc1497()
94 if (hp->flags.dump_file) { in dovend_rfc1497()
[all …]
H A Dreadfile.c308 struct host *hp; in readtab() local
377 hp = (struct host *) smalloc(sizeof(struct host)); in readtab()
378 bzero((char *) hp, sizeof(*hp)); in readtab()
384 if (process_entry(hp, buffer) < 0) { in readtab()
385 hp->linkcount = 1; in readtab()
386 free_host((hash_datum *) hp); in readtab()
394 if (goodname(hp->hostname->string)) { in readtab()
395 char *hn = hp->hostname->string; in readtab()
397 if (hp->flags.iaddr == 0) { in readtab()
402 hp->iaddr.s_addr = value; in readtab()
[all …]
H A Dbootpd.c620 struct host *hp = NULL; in handle_request() local
678 hp = (struct host *) hash_Lookup(hwhashtable, hashcode, hwlookcmp, in handle_request()
680 if (hp == NULL && in handle_request()
691 hp = (struct host *) hash_Lookup(hwhashtable, hashcode, in handle_request()
694 if (hp == NULL) { in handle_request()
704 (bp->bp_yiaddr).s_addr = hp->iaddr.s_addr; in handle_request()
717 hp = (struct host *) hash_Lookup(iphashtable, hashcode, iplookcmp, in handle_request()
719 if (hp == NULL) { in handle_request()
729 report(LOG_INFO, "found %s (%s)", inet_ntoa(hp->iaddr), in handle_request()
730 hp->hostname->string); in handle_request()
[all …]
/freebsd/sbin/hastd/
H A Dhooks.c83 static void hook_remove(struct hookproc *hp);
84 static void hook_free(struct hookproc *hp);
148 struct hookproc *hp; in hook_fini() local
153 while ((hp = TAILQ_FIRST(&hookprocs)) != NULL) { in hook_fini()
154 PJDLOG_ASSERT(hp->hp_magic == HOOKPROC_MAGIC_ONLIST); in hook_fini()
155 PJDLOG_ASSERT(hp->hp_pid > 0); in hook_fini()
157 hook_remove(hp); in hook_fini()
158 hook_free(hp); in hook_fini()
170 struct hookproc *hp; in hook_alloc() local
173 hp = malloc(sizeof(*hp)); in hook_alloc()
[all …]
/freebsd/cddl/contrib/opensolaris/common/ctf/
H A Dctf_hash.c35 ctf_hash_create(ctf_hash_t *hp, ulong_t nelems) in ctf_hash_create() argument
45 bzero(hp, sizeof (ctf_hash_t)); in ctf_hash_create()
46 hp->h_buckets = (uint_t *)_CTF_EMPTY; in ctf_hash_create()
47 hp->h_nbuckets = 1; in ctf_hash_create()
51 hp->h_nbuckets = 211; /* use a prime number of hash buckets */ in ctf_hash_create()
52 hp->h_nelems = nelems + 1; /* we use index zero as a sentinel */ in ctf_hash_create()
53 hp->h_free = 1; /* first free element is index 1 */ in ctf_hash_create()
55 hp->h_buckets = ctf_alloc(sizeof (uint_t) * hp->h_nbuckets); in ctf_hash_create()
56 hp->h_chains = ctf_alloc(sizeof (ctf_helem_t) * hp->h_nelems); in ctf_hash_create()
58 if (hp->h_buckets == NULL || hp->h_chains == NULL) { in ctf_hash_create()
[all …]
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_inttab.c57 dt_inthash_t *hp, *np; in dt_inttab_destroy() local
59 for (hp = ip->int_head; hp != NULL; hp = np) { in dt_inttab_destroy()
60 np = hp->inh_next; in dt_inttab_destroy()
61 dt_free(ip->int_hdl, hp); in dt_inttab_destroy()
72 dt_inthash_t *hp; in dt_inttab_insert() local
75 for (hp = ip->int_hash[h]; hp != NULL; hp = hp->inh_hash) { in dt_inttab_insert()
76 if (hp->inh_value == value && hp->inh_flags == flags) in dt_inttab_insert()
77 return (hp->inh_index); in dt_inttab_insert()
81 if ((hp = dt_alloc(ip->int_hdl, sizeof (dt_inthash_t))) == NULL) in dt_inttab_insert()
84 hp->inh_hash = ip->int_hash[h]; in dt_inttab_insert()
[all …]
H A Ddt_strtab.c104 dt_strhash_t *hp, *hq; in dt_strtab_destroy() local
108 for (hp = sp->str_hash[i]; hp != NULL; hp = hq) { in dt_strtab_destroy()
109 hq = hp->str_next; in dt_strtab_destroy()
110 free(hp); in dt_strtab_destroy()
148 dt_strtab_compare(dt_strtab_t *sp, dt_strhash_t *hp, in dt_strtab_compare() argument
151 ulong_t b = hp->str_buf; in dt_strtab_compare()
152 const char *buf = hp->str_data; in dt_strtab_compare()
219 dt_strhash_t *hp; in dt_strtab_index() local
228 for (hp = sp->str_hash[h]; hp != NULL; hp = hp->str_next) { in dt_strtab_index()
229 if (dt_strtab_compare(sp, hp, str, len + 1) == 0) in dt_strtab_index()
[all …]
/freebsd/usr.sbin/lpr/pac/
H A Dpac.c204 register struct hent *hp; in account() local
222 hp = lookup(cp); in account()
223 if (hp == NULL) { in account()
226 hp = enter(cp); in account()
228 hp->h_feetpages += t; in account()
230 hp->h_count += ic; in account()
232 hp->h_count++; in account()
244 register struct hent *hp, **ap; in dumpit() local
249 hp = hashtab[0]; in dumpit()
251 base = (struct hent **) calloc(sizeof hp, hcount); in dumpit()
[all …]
/freebsd/sbin/ipf/libipf/
H A Dprinthashdata.c12 printhashdata(iphtable_t *hp, int opts) in printhashdata() argument
16 if ((hp->iph_type & IPHASH_ANON) == IPHASH_ANON) in printhashdata()
17 PRINTF("# 'anonymous' table refs %d\n", hp->iph_ref); in printhashdata()
18 if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE) in printhashdata()
20 switch (hp->iph_type & ~IPHASH_ANON) in printhashdata()
27 if (hp->iph_flags & FR_INQUE) in printhashdata()
29 else if (hp->iph_flags & FR_OUTQUE) in printhashdata()
35 PRINTF("%#x", hp->iph_type); in printhashdata()
41 ISDIGIT(*hp->iph_name) ? "Number" : "Name", in printhashdata()
42 hp->iph_name); in printhashdata()
[all …]
/freebsd/contrib/atf/test-programs/
H A Dsrcdir_test.sh42 for hp in $(get_helpers); do
43 h=${hp##*/}
44 cp ${hp} tmp
47 atf_check -s eq:1 -o empty -e ignore "${hp}" -r res srcdir_exists
64 for hp in $(get_helpers c_helpers cpp_helpers); do
65 h=${hp##*/}
66 cp ${hp} tmp
67 cp ${hp} tmp/.libs
70 atf_check -s eq:1 -o empty -e ignore "${hp}" -r res srcdir_exists
74 for hp in $(get_helpers c_helpers cpp_helpers); do
[all …]
/freebsd/cddl/contrib/opensolaris/tools/ctf/dump/
H A Ddump.c112 ref_to_str(uint_t name, const ctf_header_t *hp, const ctf_data_t *cd) in ref_to_str() argument
115 const char *s = cd->cd_ctfdata + hp->cth_stroff + offset; in ref_to_str()
120 if (offset >= hp->cth_strlen) in ref_to_str()
123 if (hp->cth_stroff + offset >= cd->cd_ctflen) in ref_to_str()
183 print_header(const ctf_header_t *hp, const ctf_data_t *cd) in print_header() argument
187 (void) printf(" cth_magic = 0x%04x\n", hp->cth_magic); in print_header()
188 (void) printf(" cth_version = %u\n", hp->cth_version); in print_header()
189 (void) printf(" cth_flags = 0x%02x\n", hp->cth_flags); in print_header()
191 ref_to_str(hp->cth_parlabel, hp, cd)); in print_header()
193 ref_to_str(hp->cth_parname, hp, cd)); in print_header()
[all …]
/freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Dstrtab.c69 strhash_t *hp, *hq; in strtab_destroy() local
73 for (hp = sp->str_hash[i]; hp != NULL; hp = hq) { in strtab_destroy()
74 hq = hp->str_next; in strtab_destroy()
75 free(hp); in strtab_destroy()
107 strtab_compare(strtab_t *sp, strhash_t *hp, const char *str, size_t len) in strtab_compare() argument
109 ulong_t b = hp->str_buf; in strtab_compare()
110 const char *buf = hp->str_data; in strtab_compare()
157 strhash_t *hp; in strtab_insert() local
170 for (hp = sp->str_hash[h]; hp != NULL; hp = hp->str_next) { in strtab_insert()
171 if (strtab_compare(sp, hp, str, len + 1) == 0) in strtab_insert()
[all …]
/freebsd/lib/libc/net/
H A Dname6.c218 struct hostent *hp; in getipnodebyname() local
283 hp = gethostbyname2(name, af); in getipnodebyname()
284 hp = _hpcopy(hp, errp); in getipnodebyname()
287 hp = _hpreorder(hp); in getipnodebyname()
289 if (af == AF_INET6 && ((flags & AI_ALL) || hp == NULL) && in getipnodebyname()
292 if (hp == NULL) in getipnodebyname()
296 hp = _hpmapv6(hp2, errp); in getipnodebyname()
298 if (hp2 && strcmp(hp->h_name, hp2->h_name) == 0) { in getipnodebyname()
299 struct hostent *hpb = hp; in getipnodebyname()
300 hp = _hpmerge(hpb, hp2, errp); in getipnodebyname()
[all …]
/freebsd/usr.bin/xstr/
H A Dxstr.c333 struct hash *hp, *hp0; in hashit() local
335 hp = hp0 = &bucket[lastchr(str) & 0177]; in hashit()
336 while (hp->hnext) { in hashit()
337 hp = hp->hnext; in hashit()
338 i = istail(str, hp->hstr); in hashit()
340 return (hp->hpt + i); in hashit()
342 if ((hp = (struct hash *) calloc(1, sizeof (*hp))) == NULL) in hashit()
344 hp->hpt = mesgpt; in hashit()
345 if (!(hp->hstr = strdup(str))) in hashit()
347 mesgpt += strlen(hp->hstr) + 1; in hashit()
[all …]
/freebsd/contrib/tcp_wrappers/
H A Dscaffold.c46 static struct hostent *dup_hostent(struct hostent *hp) in dup_hostent() argument
57 for (count = 0; hp->h_addr_list[count] != 0; count++) in dup_hostent()
61 + (hp->h_length + sizeof(char *)) * count)) == 0) { in dup_hostent()
66 hb->host.h_length = hp->h_length; in dup_hostent()
71 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) { in dup_hostent()
72 hb->host.h_addr_list[count] = data + hp->h_length * count; in dup_hostent()
73 memcpy(hb->host.h_addr_list[count], addr, hp->h_length); in dup_hostent()
119 struct hostent *hp; in find_inet_addr() local
143 if ((hp = gethostbyname(host)) == 0) { in find_inet_addr()
147 if (hp->h_addrtype != AF_INET) { in find_inet_addr()
[all …]
/freebsd/sbin/rcorder/
H A Dhash.c103 register struct Hash_Entry **hp; in Hash_InitTable() local
117 t->bucketPtr = hp = (struct Hash_Entry **)emalloc(sizeof(*hp) * i); in Hash_InitTable()
119 *hp++ = NULL; in Hash_InitTable()
143 register struct Hash_Entry **hp, *h, *nexth = NULL; in Hash_DeleteTable() local
146 for (hp = t->bucketPtr, i = t->size; --i >= 0;) { in Hash_DeleteTable()
147 for (h = *hp++; h != NULL; h = nexth) { in Hash_DeleteTable()
227 struct Hash_Entry **hp; in Hash_CreateEntry() local
253 hp = &t->bucketPtr[h & t->mask]; in Hash_CreateEntry()
254 e->next = *hp; in Hash_CreateEntry()
255 *hp = e; in Hash_CreateEntry()
[all …]
/freebsd/contrib/sendmail/libsm/
H A Dheap.c535 SM_HEAP_ITEM_T *hi, **hp; local
548 for (hp = &SmHeapTable[ptrhash(ptr)]; *hp != NULL; hp = &(**hp).hi_next)
550 if ((**hp).hi_ptr == ptr)
554 hi = *hp;
569 *hp = hi->hi_next;
572 hp = &SmHeapTable[ptrhash(newptr)];
573 hi->hi_next = *hp;
574 *hp = hi;
603 SM_HEAP_ITEM_T *hi, **hp; local
618 for (hp = &SmHeapTable[ptrhash(ptr)]; *hp != NULL; hp = &(**hp).hi_next)
[all …]
/freebsd/usr.bin/mail/
H A Dsend.c283 mail1(struct header *hp, int printheaders) in mail1() argument
296 if ((mtf = collect(hp, printheaders)) == NULL) in mail1()
301 grabh(hp, GCC); in mail1()
303 grabh(hp, GBCC); in mail1()
312 if (hp->h_subject == NULL) in mail1()
323 to = usermap(cat(hp->h_bcc, cat(hp->h_to, hp->h_cc))); in mail1()
332 to = outof(to, mtf, hp); in mail1()
348 bcopy(hp->h_to, nsto, sizeof(struct name)); in mail1()
350 fixhead(hp, to); in mail1()
351 if ((mtf = infix(hp, mtf)) == NULL) { in mail1()
[all …]
/freebsd/libexec/bootpd/tools/bootpef/
H A Dbootpef.c119 struct host *hp; in main() local
227 hp = (struct host *) hash_Lookup(nmhashtable, in main()
230 if (!hp) { in main()
234 if (!hp->flags.exten_file) { in main()
238 mktagfile(hp); in main()
245 hp = (struct host *) hash_FirstEntry(nmhashtable); in main()
246 while (hp != NULL) { in main()
247 mktagfile(hp); in main()
248 hp = (struct host *) hash_NextEntry(nmhashtable); in main()
261 mktagfile(struct host *hp) in mktagfile() argument
[all …]
/freebsd/usr.bin/rup/
H A Drup.c68 struct host_list *hp; in search_host() local
73 for (hp = hosts; hp != NULL; hp = hp->next) { in search_host()
74 if (hp->addr.s_addr == addr.s_addr) in search_host()
83 struct host_list *hp; in remember_host() local
85 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()
100 struct hostent *hp; in rstat_reply() local
107 hp = gethostbyaddr((char *)&raddrp->sin_addr.s_addr, in rstat_reply()
[all …]
/freebsd/sys/netgraph/
H A Dng_tag.c123 static int ng_tag_setdata_in(hook_p hook, const struct ng_tag_hookin *hp);
124 static int ng_tag_setdata_out(hook_p hook, const struct ng_tag_hookout *hp);
131 const struct ng_tag_hookin *hp; in ng_tag_hookinary_getLength() local
133 hp = (const struct ng_tag_hookin *) in ng_tag_hookinary_getLength()
135 return (hp->tag_len); in ng_tag_hookinary_getLength()
142 const struct ng_tag_hookout *hp; in ng_tag_hookoutary_getLength() local
144 hp = (const struct ng_tag_hookout *) in ng_tag_hookoutary_getLength()
146 return (hp->tag_len); in ng_tag_hookoutary_getLength()
360 hp = (struct ng_tag_hookin *)msg->data; in ng_tag_rcvmsg() local
364 if (msg->header.arglen < sizeof(*hp) || in ng_tag_rcvmsg()
[all …]
/freebsd/contrib/tcpdump/
H A Dprint-hsrp.c97 const struct hsrp *hp = (const struct hsrp *) bp; in hsrp_print() local
101 version = GET_U_1(hp->hsrp_version); in hsrp_print()
107 tok2strary(op_code_str, "unknown (%u)", GET_U_1(hp->hsrp_op_code))); in hsrp_print()
110 tok2str(states, "Unknown (%u)", GET_U_1(hp->hsrp_state))); in hsrp_print()
111 ND_PRINT("group=%u ", GET_U_1(hp->hsrp_group)); in hsrp_print()
112 if (GET_U_1(hp->hsrp_reserved) != 0) { in hsrp_print()
113 ND_PRINT("[reserved=%u!] ", GET_U_1(hp->hsrp_reserved)); in hsrp_print()
115 ND_PRINT("addr=%s", GET_IPADDR_STRING(hp->hsrp_virtaddr)); in hsrp_print()
118 unsigned_relts_print(ndo, GET_U_1(hp->hsrp_hellotime)); in hsrp_print()
120 unsigned_relts_print(ndo, GET_U_1(hp->hsrp_holdtime)); in hsrp_print()
[all …]
/freebsd/usr.bin/rusers/
H A Drusers.c69 struct host_list *hp; in search_host() local
74 for (hp = hosts; hp != NULL; hp = hp->next) { in search_host()
75 if (hp->addr.s_addr == addr.s_addr) in search_host()
84 struct host_list *hp; in remember_host() local
86 if ((hp = (struct host_list *)malloc(sizeof(struct host_list))) == NULL) in remember_host()
88 hp->addr.s_addr = addr.s_addr; in remember_host()
89 hp->next = hosts; in remember_host()
90 hosts = hp; in remember_host()
99 struct hostent *hp; in rusers_reply() local
112 hp = gethostbyaddr((char *)&raddrp->sin_addr.s_addr, in rusers_reply()
[all …]
/freebsd/usr.sbin/rpc.statd/
H A Dfile.c79 HostInfo *hp; in find_host() local
88 for (i = 0, hp = status_info->hosts; i < status_info->noOfHosts; i++, hp++) in find_host()
90 if (!strncasecmp(hostname, hp->hostname, SM_MAXSTRLEN)) in find_host()
92 result = hp; in find_host()
95 if (hp->hostname[0] != '\0' && in find_host()
96 getaddrinfo(hp->hostname, NULL, NULL, &ai2) != 0) in find_host()
109 result = hp; in find_host()
121 if (!spare_slot && !hp->monList && !hp->notifyReqd) in find_host()
122 spare_slot = hp; in find_host()
305 HostInfo *hp; in notify_hosts() local
[all …]

12345678910>>...16