FreeBSD Manual Pages
PCAP_GET_REQUIRED_SELECT_TILibrary)FunctionPCAP_GET_REQUIRED_SELECT_TIMEOUT(3) NAME pcap_get_required_select_timeout - get a file descriptor on which a se- lect() can be done for a live capture SYNOPSIS #include <pcap/pcap.h> struct timeval *pcap_get_required_select_timeout(pcap_t *p); DESCRIPTION pcap_get_required_select_timeout() returns, on UNIX, a pointer to a struct timeval containing a value that must be used as the minimum timeout in select(), poll(), epoll_wait(), and kevent() calls if pcap_get_selectable_fd() returns -1. The timeout that should be used in those calls must be no larger than the smallest of all timeouts returned by pcap_get_required_select_time- out() for devices from which packets will be captured. The device for which pcap_get_selectable_fd() returned -1 must be put in non-blocking mode with pcap_setnonblock(), and an attempt must al- ways be made to read packets from the device when the select(), poll(), epoll_wait(), or kevent() call returns. Note that a device on which a read can be done without blocking may, on some platforms, not have any packets to read if the packet buffer time- out has expired. A call to pcap_dispatch() or pcap_next_ex() will re- turn 0 in this case, but will not block. pcap_get_required_select_timeout() is not available on Windows. RETURN VALUE A pointer to a struct timeval is returned if the timeout is required; otherwise NULL is returned. SEE ALSO pcap(3), pcap_get_selectable_fd(3), select(2), poll(2), epoll_wait(2), kqueue(2) 19 January PCAP_GET_REQUIRED_SELECT_TIMEOUT(3)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=pcap_get_required_select_timeout&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>