Home
last modified time | relevance | path

Searched refs:tcpfd (Results 1 – 4 of 4) sorted by relevance

/external/dnsmasq/src/
Dnetwork.c239 int tcpfd, fd; in create_ipv6_listener() local
252 if ((tcpfd = socket(AF_INET6, SOCK_STREAM, 0)) == -1) return 0; in create_ipv6_listener()
255 setsockopt(tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
257 setsockopt(tcpfd, IPV6_LEVEL, IPV6_V6ONLY, &opt, sizeof(opt)) == -1 || !fix_fd(fd) || in create_ipv6_listener()
258 !fix_fd(tcpfd) || in create_ipv6_listener()
264 bind(tcpfd, (struct sockaddr*) &addr, sa_len(&addr)) == -1 || listen(tcpfd, 5) == -1 || in create_ipv6_listener()
270 l->tcpfd = tcpfd; in create_ipv6_listener()
284 int tcpfd = -1, fd = -1; in create_wildcard_listeners() local
293 (tcpfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) in create_wildcard_listeners()
296 if (setsockopt(tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
[all …]
Dforward.c711 if ((last_server->tcpfd == -1) && in tcp_request()
712 (last_server->tcpfd = in tcp_request()
714 (!local_bind(last_server->tcpfd, &last_server->source_addr, in tcp_request()
716 connect(last_server->tcpfd, &last_server->addr.sa, in tcp_request()
718 close(last_server->tcpfd); in tcp_request()
719 last_server->tcpfd = -1; in tcp_request()
722 if (last_server->tcpfd == -1) continue; in tcp_request()
727 if (!read_write(last_server->tcpfd, &c1, 1, 0) || in tcp_request()
728 !read_write(last_server->tcpfd, &c2, 1, 0) || in tcp_request()
729 !read_write(last_server->tcpfd, packet, size, 0) || in tcp_request()
[all …]
Ddnsmasq.c877 if (listener->tcpfd != -1) in set_dns_listeners()
880 FD_SET(listener->tcpfd, set); in set_dns_listeners()
881 bump_maxfd(listener->tcpfd, maxfdp); in set_dns_listeners()
906 if (listener->tcpfd != -1 && FD_ISSET(listener->tcpfd, set)) { in check_dns_listeners()
911 while ((confd = accept(listener->tcpfd, NULL, NULL)) == -1 && errno == EINTR) in check_dns_listeners()
964 for (s = daemon->servers; s; s = s->next) s->tcpfd = -1; in check_dns_listeners()
982 if (s->tcpfd != -1) { in check_dns_listeners()
983 shutdown(s->tcpfd, SHUT_RDWR); in check_dns_listeners()
984 close(s->tcpfd); in check_dns_listeners()
Ddnsmasq.h332 int flags, tcpfd; member
346 int fd, tcpfd, family; member