Lines Matching refs:fd
235 * Open an fd for the given address and connect asynchronously. Wait
237 * change fd to blocking and return it, else return -1.
247 int fd;
252 fd = t_open(nconf->nc_device, O_RDWR | O_NONBLOCK, &tinfo);
253 if (fd == -1) {
257 if (t_bind(fd, (struct t_bind *)NULL, (struct t_bind *)NULL) == -1) {
258 (void) close(fd);
262 /* we can't connect unless fd is in IDLE state */
263 if (t_getstate(fd) != T_IDLE) {
264 (void) close(fd);
275 if (t_connect(fd, &sndcall, rcvcall) != 0) {
277 (void) close(fd);
284 if (t_rcvconnect(fd, rcvcall) == 0)
289 (void) close(fd);
297 /* make the fd blocking (synchronous) */
298 flags = fcntl(fd, F_GETFL, 0);
299 (void) fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
302 return (fd);
319 int fd;
390 /* get an fd connected to the given address */
391 fd = get_connection(nconf, netaddr);
392 if (fd == -1) {
401 printf("fd: %d, KADM: %d, KADMVERS %d\n", fd, KADM, KADMVERS);
413 * Tell clnt_tli_create that given fd is already connected
425 handle->clnt = clnt_tli_create(fd, nconf, NULL,
429 handle->clnt = clnt_tli_create(fd, nconf, NULL,
439 (void) close(fd);
443 * The rpc-handle was created on an fd opened and connected
451 (void) close(fd);