Home | History | Annotate | Download | only in ns-tools

Lines Matching defs:sock_fd

136  *  sock_fd:	socket file descriptor
141 void respond_to_client(sock_fd)
151 if (getsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF,
154 close(sock_fd);
162 close(sock_fd);
168 if ((msglen = recvfrom(sock_fd, msgbuf, msgbuf_size, 0,
178 if (sendto(sock_fd, msgbuf, msglen, 0,
196 int sock_fd; /* socket binded open ports */
296 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
297 if (sock_fd < 0)
305 (sock_fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(int)))
312 if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
316 if (bind(sock_fd, res->ai_addr, res->ai_addrlen) < 0)
340 FD_SET(sock_fd, &read_fds);
341 max_read_fd = sock_fd;
365 if (FD_ISSET(sock_fd, &active_fds))
366 respond_to_client(sock_fd);
371 if (close(sock_fd))