Lines Matching refs:fds
221 static int sock_fanout_read(int fds[], char *rings[], const int expect[])
225 ret[0] = sock_fanout_read_ring(fds[0], rings[0]);
226 ret[1] = sock_fanout_read_ring(fds[1], rings[1]);
255 int fds[2];
259 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
260 if (fds[0] == -1) {
278 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
279 if (fds[1] == -1) {
283 if (close(fds[1]) || close(fds[0])) {
292 int fds[3];
297 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH |
299 if (fds[0] == -1) {
304 sock_fanout_getopts(fds[0], &typeflags, &first_group_id);
315 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, first_group_id);
316 if (fds[1] == -1) {
322 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH |
324 if (fds[2] == -1) {
330 sock_fanout_getopts(fds[2], &typeflags, &second_group_id);
338 if (close(fds[0]) || close(fds[1]) || close(fds[2])) {
350 int fds[2], fds_udp[2][2], ret;
356 fds[0] = sock_fanout_open(typeflags, 0);
357 fds[1] = sock_fanout_open(typeflags, 0);
358 if (fds[0] == -1 || fds[1] == -1) {
363 sock_fanout_set_cbpf(fds[0]);
365 sock_fanout_set_ebpf(fds[0]);
367 rings[0] = sock_fanout_open_ring(fds[0]);
368 rings[1] = sock_fanout_open_ring(fds[1]);
371 sock_fanout_read(fds, rings, expect0);
376 ret = sock_fanout_read(fds, rings, expect1);
381 ret |= sock_fanout_read(fds, rings, expect2);
390 close(fds[1]) || close(fds[0])) {