tcpdump mailing list archives
Re: Multiple interface listening modification
From: Guy Harris <guy () alum mit edu>
Date: Thu, 4 Jun 2015 09:38:01 -0700
On Jun 4, 2015, at 12:37 AM, Michal Sekletar <msekleta () redhat com> wrote:
Can't you just pcap_open more interfaces and for each pcap_t* you get call pcap_fileno which will return back file descriptor for that capture. Then you can use select/epoll to multiplex on those descriptors.
Or, in newer versions of libpcap, call pcap_get_selectable_fd(), which, for devices on which you can capture but on which you *can't* use select()/poll()/epoll()/kqueues, returns -1. (Yes, they do exist; the DAG card drivers don't support it.) BTW, that's also one problem with having a single pcap_t refer to multiple devices - a lot of code out there expects a single descriptor on which it can do select()/poll()/epoll()/kqueues, and you can't do that if a single pcap_t refers to multiple devices. _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Multiple interface listening modification Tugrul Erdogan (Jun 03)
- Re: Multiple interface listening modification Michal Sekletar (Jun 04)
- Re: Multiple interface listening modification Guy Harris (Jun 04)
- Re: Multiple interface listening modification Michal Sekletar (Jun 04)