On Dec 5, 2014, at 3:15 AM, Thomas Habets <tho...@habets.se> wrote: > On 4 December 2014 at 20:01, Guy Harris <g...@alum.mit.edu> wrote: >> If your program needs to have packets delivered as soon as they arrive, it >> should, if the version of libpcap with which it's being built has the >> pcap_set_immediate_mode() API > > Thanks. I switched to the pcap_create() API from pcap_open_live() (my > code predates pcap_create()) and set immediate mode, and that did it.
I'd move the BIOCIMMEDIATE call into try_pcap_open_live(), and do it if 1) BIOCIMMEDIATE is defined and 2) either a) you don't have pcap_create() or b) you do but don't have pcap_set_immediate_mode() as you don't have to use it on BPF systems that *do* have pcap_set_immediate_mode() as that call will do it for you (or, rather, will cause it to be done at pcap_activate() time). _______________________________________________ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers