Lines Matching refs:sock
112 int sock = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); in ipv4_loopback() local
113 if (sock < 0) { in ipv4_loopback()
121 if (connect(sock, (sockaddr*) &server, sizeof(server))) { in ipv4_loopback()
123 close(sock); in ipv4_loopback()
139 close(sock); in ipv4_loopback()
144 close(sock); in ipv4_loopback()
169 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in ipv6_loopback() local
170 if (sock < 0) { in ipv6_loopback()
178 if (connect(sock, (sockaddr*) &server, sizeof(server))) { in ipv6_loopback()
180 close(sock); in ipv6_loopback()
196 close(sock); in ipv6_loopback()
201 close(sock); in ipv6_loopback()