Lines Matching refs:fds
235 static int sock_fanout_read(int fds[], char *rings[], const int expect[])
239 ret[0] = sock_fanout_read_ring(fds[0], rings[0]);
240 ret[1] = sock_fanout_read_ring(fds[1], rings[1]);
269 int fds[2];
273 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
274 if (fds[0] == -1) {
292 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
293 if (fds[1] == -1) {
297 if (close(fds[1]) || close(fds[0])) {
306 int fds[3];
318 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
319 if (fds[0] == -1) {
333 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
334 if (fds[1] == -1) {
341 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH, 0);
342 if (fds[2] == -1) {
347 if (close(fds[2]) || close(fds[1]) || close(fds[0])) {
356 int fds[3];
361 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH |
363 if (fds[0] == -1) {
368 sock_fanout_getopts(fds[0], &typeflags, &first_group_id);
379 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, first_group_id);
380 if (fds[1] == -1) {
386 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH |
388 if (fds[2] == -1) {
394 sock_fanout_getopts(fds[2], &typeflags, &second_group_id);
402 if (close(fds[0]) || close(fds[1]) || close(fds[2])) {
414 int fds[2], fds_udp[2][2], ret;
420 fds[0] = sock_fanout_open(typeflags, 0);
421 fds[1] = sock_fanout_open(typeflags, 0);
422 if (fds[0] == -1 || fds[1] == -1) {
427 sock_fanout_set_cbpf(fds[0]);
429 sock_fanout_set_ebpf(fds[0]);
431 rings[0] = sock_fanout_open_ring(fds[0]);
432 rings[1] = sock_fanout_open_ring(fds[1]);
435 sock_fanout_read(fds, rings, expect0);
440 ret = sock_fanout_read(fds, rings, expect1);
445 ret |= sock_fanout_read(fds, rings, expect2);
454 close(fds[1]) || close(fds[0])) {