Lines Matching refs:sock
25 static int sock = -1, dst_sock = -1, listen_sock = -1;
29 static void do_send(int sock, void *buf, size_t size, int flags)
31 SAFE_SEND(1, sock, buf, size, flags);
34 static void do_sendto(int sock, void *buf, size_t size, int flags)
36 SAFE_SENDTO(1, sock, buf, size, flags, (struct sockaddr *)&addr,
40 static void do_sendmsg(int sock, void *buf, size_t size, int flags)
54 SAFE_SENDMSG(size, sock, &msg, flags);
59 void (*send)(int sock, void *buf, size_t size, int flags);
74 static int check_recv(int sock, long expsize, int loop)
79 TEST(recv(sock, recvbuf, RECVSIZE, MSG_DONTWAIT));
115 if (sock >= 0)
116 SAFE_CLOSE(sock);
143 sock = SAFE_SOCKET(tc->domain, tc->type, tc->protocol);
146 SAFE_CONNECT(sock, (struct sockaddr *)&addr, len);
151 tc->send(sock, sendbuf, SENDSIZE, 0);
157 tc->send(sock, sendbuf, SENDSIZE, MSG_MORE);
163 tc->send(sock, sendbuf, 1, 0);
169 SAFE_CLOSE(sock);