Lines Matching defs:fdl

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