Lines Matching refs:fdl

85 check_bound(struct fdlist *fdl, char *uaddr)  in check_bound()  argument
92 if (fdl->check_binding == FALSE) in check_bound()
95 na = uaddr2taddr(fdl->nconf, uaddr); in check_bound()
101 (void) mutex_lock(&fdl->fd_lock); in check_bound()
102 fd = fdl->fd; in check_bound()
105 (void) mutex_unlock(&fdl->fd_lock); in check_bound()
110 (void) mutex_unlock(&fdl->fd_lock); in check_bound()
118 fdl->fd = t_open(fdl->nconf->nc_device, O_RDWR, NULL); in check_bound()
119 if (fdl->fd == -1) in check_bound()
120 fdl->check_binding = FALSE; in check_bound()
122 (void) mutex_unlock(&fdl->fd_lock); in check_bound()
149 struct fdlist *fdl; in add_bndlist() local
157 fdl = (struct fdlist *)malloc((uint_t)sizeof (struct fdlist)); in add_bndlist()
158 if (fdl == NULL) { in add_bndlist()
163 (void) mutex_init(&fdl->fd_lock, USYNC_THREAD, NULL); in add_bndlist()
164 fdl->nconf = newnconf; in add_bndlist()
165 fdl->next = NULL; in add_bndlist()
167 fdhead = fdl; in add_bndlist()
168 fdtail = fdl; in add_bndlist()
170 fdtail->next = fdl; in add_bndlist()
171 fdtail = fdl; in add_bndlist()
173 fdl->check_binding = FALSE; in add_bndlist()
174 if ((fdl->fd = t_open(nconf->nc_device, O_RDWR, &tinfo)) < 0) { in add_bndlist()
200 if (t_bind(fdl->fd, taddr, baddr) != 0) { in add_bndlist()
202 fdl->check_binding = TRUE; in add_bndlist()
220 t_unbind(fdl->fd); in add_bndlist()
235 if (t_bind(fdl->fd, &tmpaddr, taddr) != 0) { in add_bndlist()
289 t_unbind(fdl->fd); in add_bndlist()
290 fdl->check_binding = TRUE; in add_bndlist()
294 t_close(fdl->fd); in add_bndlist()
295 fdl->fd = -1; in add_bndlist()
299 t_close(fdl->fd); in add_bndlist()
300 fdl->fd = -1; in add_bndlist()
307 struct fdlist *fdl; in is_bound() local
309 for (fdl = fdhead; fdl; fdl = fdl->next) in is_bound()
310 if (strcmp(fdl->nconf->nc_netid, netid) == 0) in is_bound()
312 if (fdl == NULL) in is_bound()
314 return (check_bound(fdl, uaddr)); in is_bound()
329 struct fdlist *fdl; in mergeaddr() local
333 for (fdl = fdhead; fdl; fdl = fdl->next) in mergeaddr()
334 if (strcmp(fdl->nconf->nc_netid, netid) == 0) in mergeaddr()
336 if (fdl == NULL) in mergeaddr()
338 if (check_bound(fdl, uaddr) == FALSE) in mergeaddr()
351 ma.c_uaddr = taddr2uaddr(fdl->nconf, svc_getrpccaller(xprt)); in mergeaddr()
354 fdl->nconf->nc_netid, netdir_sperror()); in mergeaddr()
361 if ((strcmp(fdl->nconf->nc_protofmly, NC_INET) != 0) && in mergeaddr()
362 (strcmp(fdl->nconf->nc_protofmly, NC_INET6) != 0)) { in mergeaddr()
364 stat = netdir_options(fdl->nconf, ND_MERGEADDR, 0, (char *)&ma); in mergeaddr()
367 else if ((ma.s_uaddr = taddr2uaddr(fdl->nconf, in mergeaddr()
370 stat = netdir_options(fdl->nconf, ND_MERGEADDR, 0, (char *)&ma); in mergeaddr()
407 fdl->nconf->nc_netid, netdir_sperror()); in mergeaddr()
421 struct fdlist *fdl; in rpcbind_get_conf() local
423 for (fdl = fdhead; fdl; fdl = fdl->next) in rpcbind_get_conf()
424 if (strcmp(fdl->nconf->nc_netid, netid) == 0) in rpcbind_get_conf()
426 if (fdl == NULL) in rpcbind_get_conf()
428 return (fdl->nconf); in rpcbind_get_conf()