Lines Matching refs:hd
199 ndr_handle_t *hd; in ndr_hdalloc() local
202 if ((hd = malloc(sizeof (ndr_handle_t))) == NULL) in ndr_hdalloc()
214 bcopy(&id, &hd->nh_id, sizeof (ndr_hdid_t)); in ndr_hdalloc()
215 hd->nh_pipe = xa->pipe; in ndr_hdalloc()
216 hd->nh_svc = xa->binding->service; in ndr_hdalloc()
217 hd->nh_data = (void *)data; in ndr_hdalloc()
218 hd->nh_data_free = NULL; in ndr_hdalloc()
221 hd->nh_next = ndr_handle_list; in ndr_hdalloc()
222 ndr_handle_list = hd; in ndr_hdalloc()
225 return (&hd->nh_id); in ndr_hdalloc()
235 ndr_handle_t *hd; in ndr_hdfree() local
244 hd = *pphd; in ndr_hdfree()
246 if (bcmp(&hd->nh_id, id, sizeof (ndr_hdid_t)) == 0) { in ndr_hdfree()
247 if (hd->nh_svc == svc) { in ndr_hdfree()
248 *pphd = hd->nh_next; in ndr_hdfree()
249 free(hd); in ndr_hdfree()
269 ndr_handle_t *hd; in ndr_hdlookup() local
273 hd = ndr_handle_list; in ndr_hdlookup()
275 while (hd) { in ndr_hdlookup()
276 if (bcmp(&hd->nh_id, id, sizeof (ndr_hdid_t)) == 0) { in ndr_hdlookup()
277 if (hd->nh_svc != svc) in ndr_hdlookup()
280 return (hd); in ndr_hdlookup()
283 hd = hd->nh_next; in ndr_hdlookup()
296 ndr_handle_t *hd; in ndr_hdclose() local
303 hd = *pphd; in ndr_hdclose()
305 if (hd->nh_pipe == pipe) { in ndr_hdclose()
306 *pphd = hd->nh_next; in ndr_hdclose()
308 if (hd->nh_data_free) in ndr_hdclose()
309 (*hd->nh_data_free)(hd->nh_data); in ndr_hdclose()
311 free(hd); in ndr_hdclose()