Lines Matching refs:rcv_fds

31 static void build_rcv_fd(int family, int proto, int *rcv_fds, int count)  in build_rcv_fd()  argument
56 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd()
57 if (rcv_fds[i] < 0) in build_rcv_fd()
61 if (setsockopt(rcv_fds[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_fd()
65 if (bind(rcv_fds[i], (struct sockaddr *)&addr, sizeof(addr))) in build_rcv_fd()
68 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd()
128 static void test(int *rcv_fds, int count, int proto) in test() argument
141 ev.data.fd = rcv_fds[i]; in test()
142 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fds[i], &ev)) in test()
160 int rcv_fds[32], i; in main() local
163 build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 5); in main()
164 build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[5]), 5); in main()
165 test(rcv_fds, 10, SOCK_DGRAM); in main()
167 close(rcv_fds[i]); in main()
170 build_rcv_fd(AF_INET6, SOCK_DGRAM, rcv_fds, 5); in main()
171 build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[5]), 5); in main()
172 test(rcv_fds, 10, SOCK_DGRAM); in main()
174 close(rcv_fds[i]); in main()
180 build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 16); in main()
181 build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[16]), 16); in main()
182 test(rcv_fds, 32, SOCK_DGRAM); in main()
184 close(rcv_fds[i]); in main()
187 build_rcv_fd(AF_INET6, SOCK_DGRAM, rcv_fds, 16); in main()
188 build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[16]), 16); in main()
189 test(rcv_fds, 32, SOCK_DGRAM); in main()
191 close(rcv_fds[i]); in main()
194 build_rcv_fd(AF_INET, SOCK_STREAM, rcv_fds, 5); in main()
195 build_rcv_fd(AF_INET6, SOCK_STREAM, &(rcv_fds[5]), 5); in main()
196 test(rcv_fds, 10, SOCK_STREAM); in main()
198 close(rcv_fds[i]); in main()
201 build_rcv_fd(AF_INET6, SOCK_STREAM, rcv_fds, 5); in main()
202 build_rcv_fd(AF_INET, SOCK_STREAM, &(rcv_fds[5]), 5); in main()
203 test(rcv_fds, 10, SOCK_STREAM); in main()
205 close(rcv_fds[i]); in main()