Lines Matching refs:fd
342 int c, ret, fd, i = 0, timeout = -1, port = SERVER_PORT; in main() local
432 fd = socket(family, SOCK_DGRAM, IPPROTO_UDP); in main()
433 if (fd < 0) { in main()
445 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, in main()
476 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, in main()
482 ret = bind(fd, addr_recv, addr_len); in main()
513 ret = sendto(fd, data[i].buf, len, 0, in main()
529 FD_SET(fd, &rfds); in main()
538 ret = select(fd + 1, &rfds, NULL, NULL, &tv); in main()
552 } else if (!FD_ISSET(fd, &rfds)) { in main()
558 ret = recv(fd, buf, sizeof(buf), 0); in main()
592 close(fd); in main()