Lines Matching refs:fd
370 int fd; member
1003 return sendto(user_data->fd, data, len, 0, in send_to_peer()
1013 if (!user_data || !user_data->fd) in dtls_handle_read()
1018 user_data->len = recvfrom(user_data->fd, user_data->buf, MAX_READ_BUF, in dtls_handle_read()
1076 if (!user_data || !user_data->fd) in read_data_from_net()
1567 int c, ret, fd, timeout = 0; local
1670 fd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
1671 if (fd < 0) {
1683 if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE,
1716 close(coap_ctx->endpoint->handle.fd);
1718 ret = bind(fd, addr_recv, addr_len);
1726 if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on,
1729 if (setsockopt(fd, IPPROTO_IPV6, IPV6_PKTINFO, &on,
1734 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on) ) < 0) {
1741 user_data.fd = fd;
1746 coap_ctx->endpoint->handle.fd = fd;
1801 FD_SET(fd, &rfds);
1841 ret = select(fd + 1, &rfds, NULL, NULL, &tv);
1868 } else if (!FD_ISSET(fd, &rfds)) {
1883 user_data.fd = fd;
1901 close(fd);