Lines Matching refs:proto

34 static void build_rcv_fd(int family, int proto, int *rcv_fds, int count,  in build_rcv_fd()  argument
75 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd()
87 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd()
89 else if (proto == SOCK_DCCP) { in build_rcv_fd()
101 static int connect_and_send(int family, int proto) in connect_and_send() argument
147 fd = socket(family, proto, 0); in connect_and_send()
151 if (proto == SOCK_DCCP && in connect_and_send()
168 static int receive_once(int epfd, int proto) in receive_once() argument
178 if (proto == SOCK_STREAM || proto == SOCK_DCCP) { in receive_once()
194 static void test(int *rcv_fds, int count, int family, int proto, int fd) in test() argument
210 send_fd = connect_and_send(family, proto); in test()
212 recv_fd = receive_once(epfd, proto); in test()
221 static void run_one_test(int fam_send, int fam_rcv, int proto, in run_one_test() argument
233 build_rcv_fd(AF_INET, proto, rcv_fds, 2, NULL); in run_one_test()
234 build_rcv_fd(AF_INET6, proto, rcv_fds + 2, 2, NULL); in run_one_test()
235 build_rcv_fd(fam_rcv, proto, rcv_fds + 4, 1, addr_str); in run_one_test()
236 build_rcv_fd(AF_INET, proto, rcv_fds + 5, 2, NULL); in run_one_test()
237 build_rcv_fd(AF_INET6, proto, rcv_fds + 7, 2, NULL); in run_one_test()
238 test(rcv_fds, 9, fam_send, proto, rcv_fds[4]); in run_one_test()
244 static void test_proto(int proto, const char *proto_str) in test_proto() argument
246 if (proto == SOCK_DCCP) { in test_proto()
249 test_fd = socket(AF_INET, proto, 0); in test_proto()
261 run_one_test(AF_INET, AF_INET, proto, IP4_ADDR); in test_proto()
264 run_one_test(AF_INET6, AF_INET6, proto, IP6_ADDR); in test_proto()
267 run_one_test(AF_INET, AF_INET6, proto, IP4_MAPPED6); in test_proto()