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