Lines Matching refs:fds
47 struct zsock_pollfd fds[SOCK_ID_MAX] = { 0 }; variable
301 for (i = 0; i < ARRAY_SIZE(fds); i++) { in udp_receiver_cleanup()
302 if (fds[i].fd >= 0) { in udp_receiver_cleanup()
303 zperf_udp_leave_mcast(fds[i].fd); in udp_receiver_cleanup()
304 zsock_close(fds[i].fd); in udp_receiver_cleanup()
305 fds[i].fd = -1; in udp_receiver_cleanup()
382 for (int i = 0; i < ARRAY_SIZE(fds); i++) { in zperf_udp_receiver_init()
383 fds[i].fd = -1; in zperf_udp_receiver_init()
393 fds[SOCK_ID_IPV4].fd = zsock_socket(AF_INET, SOCK_DGRAM, in zperf_udp_receiver_init()
395 if (fds[SOCK_ID_IPV4].fd < 0) { in zperf_udp_receiver_init()
429 ret = zsock_bind(fds[SOCK_ID_IPV4].fd, in zperf_udp_receiver_init()
439 fds[SOCK_ID_IPV4].events = ZSOCK_POLLIN; in zperf_udp_receiver_init()
447 fds[SOCK_ID_IPV6].fd = zsock_socket(AF_INET6, SOCK_DGRAM, in zperf_udp_receiver_init()
449 if (fds[SOCK_ID_IPV6].fd < 0) { in zperf_udp_receiver_init()
486 ret = zsock_bind(fds[SOCK_ID_IPV6].fd, in zperf_udp_receiver_init()
496 fds[SOCK_ID_IPV6].events = ZSOCK_POLLIN; in zperf_udp_receiver_init()
501 ret = net_socket_service_register(&svc_udp, fds, in zperf_udp_receiver_init()
502 ARRAY_SIZE(fds), NULL); in zperf_udp_receiver_init()