Lines Matching refs:ho
77 static void free_host(struct hostent *ho);
94 struct irs_ho *ho; in irs_irp_ho() local
97 if (!(ho = memget(sizeof *ho))) { in irs_irp_ho()
101 memset(ho, 0x0, sizeof *ho); in irs_irp_ho()
104 memput(ho, sizeof *ho); in irs_irp_ho()
111 ho->private = pvt; in irs_irp_ho()
112 ho->close = ho_close; in irs_irp_ho()
113 ho->byname = ho_byname; in irs_irp_ho()
114 ho->byname2 = ho_byname2; in irs_irp_ho()
115 ho->byaddr = ho_byaddr; in irs_irp_ho()
116 ho->next = ho_next; in irs_irp_ho()
117 ho->rewind = ho_rewind; in irs_irp_ho()
118 ho->minimize = ho_minimize; in irs_irp_ho()
119 ho->addrinfo = ho_addrinfo; in irs_irp_ho()
121 return (ho); in irs_irp_ho()
167 struct hostent *ho = &pvt->host; in ho_byname2() local
173 if (ho->h_name != NULL && in ho_byname2()
174 strcmp(name, ho->h_name) == 0 && in ho_byname2()
175 af == ho->h_addrtype) { in ho_byname2()
176 return (ho); in ho_byname2()
194 free_host(ho); in ho_byname2()
195 if (irp_unmarshall_ho(ho, body) != 0) { in ho_byname2()
196 ho = NULL; in ho_byname2()
199 ho = NULL; in ho_byname2()
206 return (ho); in ho_byname2()
220 struct hostent *ho = &pvt->host; in ho_byaddr() local
228 if (ho->h_name != NULL && in ho_byaddr()
229 af == ho->h_addrtype && in ho_byaddr()
230 len == ho->h_length) { in ho_byaddr()
231 for (p = ho->h_addr_list ; *p != NULL ; p++) { in ho_byaddr()
233 return (ho); in ho_byaddr()
257 free_host(ho); in ho_byaddr()
258 if (irp_unmarshall_ho(ho, body) != 0) { in ho_byaddr()
259 ho = NULL; in ho_byaddr()
262 ho = NULL; in ho_byaddr()
269 return (ho); in ho_byaddr()
283 struct hostent *ho = &pvt->host; in ho_next() local
304 free_host(ho); in ho_next()
305 if (irp_unmarshall_ho(ho, body) != 0) { in ho_next()
306 ho = NULL; in ho_next()
309 ho = NULL; in ho_next()
316 return (ho); in ho_next()
368 free_host(struct hostent *ho) { in free_host() argument
371 if (ho == NULL) { in free_host()
375 if (ho->h_name != NULL) in free_host()
376 free(ho->h_name); in free_host()
378 if (ho->h_aliases != NULL) { in free_host()
379 for (p = ho->h_aliases ; *p != NULL ; p++) in free_host()
381 free(ho->h_aliases); in free_host()
384 if (ho->h_addr_list != NULL) { in free_host()
385 for (p = ho->h_addr_list ; *p != NULL ; p++) in free_host()
387 free(ho->h_addr_list); in free_host()