Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 3 of 3) sorted by relevance

/bionic/libc/dns/resolv/
Dres_send.c150 static int connect_with_timeout(int sock, const struct sockaddr *nsap,
152 static int retrying_poll(const int sock, short events, const struct timespec* finish);
980 connect_with_timeout(int sock, const struct sockaddr *nsap, socklen_t salen, in connect_with_timeout() argument
985 origflags = fcntl(sock, F_GETFL, 0); in connect_with_timeout()
986 fcntl(sock, F_SETFL, origflags | O_NONBLOCK); in connect_with_timeout()
988 res = __connect(sock, nsap, salen); in connect_with_timeout()
997 async_safe_format_log(ANDROID_LOG_DEBUG, "libc", " %d send_vc\n", sock); in connect_with_timeout()
1000 res = retrying_poll(sock, POLLIN | POLLOUT, &finish); in connect_with_timeout()
1006 fcntl(sock, F_SETFL, origflags); in connect_with_timeout()
1009 " %d connect_with_const timeout returning %d\n", sock, res); in connect_with_timeout()
[all …]
/bionic/tests/
Difaddrs_test.cpp132 sockaddr_in* sock = reinterpret_cast<sockaddr_in*>(&ifr.ifr_addr); in CheckAddressIsInSet() local
133 in_addr_t addr = sock->sin_addr.s_addr; in CheckAddressIsInSet()
147 auto sock = reinterpret_cast<sockaddr_in*>(addr->ifa_addr); in TEST() local
148 inet_addrs[addr->ifa_name].insert(sock->sin_addr.s_addr); in TEST()
151 auto sock = reinterpret_cast<sockaddr_in*>(addr->ifa_broadaddr); in TEST() local
152 broad_addrs[addr->ifa_name].insert(sock->sin_addr.s_addr); in TEST()
/bionic/libc/dns/net/
Dgetaddrinfo.c1789 int sock; in _find_src_addr() local
1805 sock = socket(addr->sa_family, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP); in _find_src_addr()
1806 if (sock == -1) { in _find_src_addr()
1813 if (mark != MARK_UNSET && setsockopt(sock, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) < 0) { in _find_src_addr()
1814 close(sock); in _find_src_addr()
1817 if (uid > 0 && uid != NET_CONTEXT_INVALID_UID && fchown(sock, uid, (gid_t)-1) < 0) { in _find_src_addr()
1818 close(sock); in _find_src_addr()
1822 ret = __connect(sock, addr, len); in _find_src_addr()
1826 close(sock); in _find_src_addr()
1830 if (src_addr && getsockname(sock, src_addr, &len) == -1) { in _find_src_addr()
[all …]