On Oct 18, 2006, at 3:41 PM, Alexander Dupuy wrote:
You really want to use select() (or poll() if your operating system
doesn't support select()) instead of a CPU polling loop. You can
use pcap_get_selectable_fd() to get the underlying file descriptor
on a Unix system (won't work on Windo
After playing around with this for a while, the solution I've used is to
open two pcap_t * handles, set them non-blocking, and then call
pcap_dispatch() on each of them within a while(1) loop.
This sucks for (at least) two reasons: First, it's basically brain-dead and
a CPU hog. Second, for
rh wrote:
After playing around with this for a while, the solution I've used is
to open two pcap_t * handles, set them non-blocking, and then call
pcap_dispatch() on each of them within a while(1) loop.
You really want to use select() (or poll() if your operating system
doesn't support sele