text: PCAP_GET_SELECTABLE_FD(3PCAP) PCAP_GET_SELECTABLE_FD(3PCAP)
  pcap_get_selectable_fd - get a file descriptor on which a select() can be done for a live capture
  #include <pcap/pcap.h> int pcap_get_selectable_fd(pcap_t *p);
  pcap_get_selectable_fd() returns, on UNIX, a file descriptor number for a file descriptor on which one can do a select(), poll(), or other such call to wait for it to be possible to read packets without blocking, if such a descriptor exists, or -1, if no such descriptor exists. Some network devices opened with pcap_create() and pcap_activate(), or with pcap_open_live(), do not support select() or poll() (for example, regular network devices on FreeBSD 4.3 and 4.4, and Endace DAG devices), so -1 is returned for those devices. Note that a descriptor on which a read can be done without blocking may, on some platforms, not have any packets to read if the packet buffer timeout has expired. A call to pcap_dispatch() will return 0 in this case, but will not block. packet timeout expires before then. To work around this, an application that uses select() or poll() to wait for packets to arrive must put the pcap_t in non-blocking mode, and must arrange that the select() or poll() have a timeout less than or equal to the packet buffer, including.
  A selectable file descriptor is returned if one exists; otherwise, -1 is returned.
  pcap(3PCAP), select(2), poll(2) 20 January 2017 PCAP_GET_SELECTABLE_FD(3PCAP)