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()
161 int rcv_fds[32], i; in main() local
164 build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 5); in main()
165 build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[5]), 5); in main()
166 test(rcv_fds, 10, SOCK_DGRAM); in main()
168 close(rcv_fds[i]); in main()
171 build_rcv_fd(AF_INET6, SOCK_DGRAM, rcv_fds, 5); in main()
172 build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[5]), 5); in main()
173 test(rcv_fds, 10, SOCK_DGRAM); in main()
175 close(rcv_fds[i]); in main()
181 build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 16); in main()
182 build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[16]), 16); in main()
183 test(rcv_fds, 32, SOCK_DGRAM); in main()
185 close(rcv_fds[i]); in main()
188 build_rcv_fd(AF_INET6, SOCK_DGRAM, rcv_fds, 16); in main()
189 build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[16]), 16); in main()
190 test(rcv_fds, 32, SOCK_DGRAM); in main()
192 close(rcv_fds[i]); in main()
195 build_rcv_fd(AF_INET, SOCK_STREAM, rcv_fds, 5); in main()
196 build_rcv_fd(AF_INET6, SOCK_STREAM, &(rcv_fds[5]), 5); in main()
197 test(rcv_fds, 10, SOCK_STREAM); in main()
199 close(rcv_fds[i]); in main()
202 build_rcv_fd(AF_INET6, SOCK_STREAM, rcv_fds, 5); in main()
203 build_rcv_fd(AF_INET, SOCK_STREAM, &(rcv_fds[5]), 5); in main()
204 test(rcv_fds, 10, SOCK_STREAM); in main()
206 close(rcv_fds[i]); in main()