pcapy listen on multiple devices

B

billiejoex

Hi all. I noticed that with the original pcap sniffing library it is
possible to listen on multiple devices by using "select()" or "poll()"
function.
These function aren't present in pcapy module. Do you got any suggestion to
avoid this problem?
 
J

Jorgen Grahn

Hi all. I noticed that with the original pcap sniffing library it is
possible to listen on multiple devices by using "select()" or "poll()"
function.

Yes; you can ask pcap for the file descriptor which corresponds to your
sniffed device. That works at least on Unixes.

(There is also the 'any' pseudo-interface, if you are on Linux (and other
Unixes?). You get to listen /everywhere/ in one session.)
These function aren't present in pcapy module. Do you got any suggestion to
avoid this problem?

Modify pcapy so you can get the file descriptor from it. Pcapy is great, but
it doesn't expose libpcap literally. Maybe the original authors had no use
for getfd().

I've been meaning to write The Pcap Bindings To End All Pcap Bindings for
almost a year now, but I never seem to get around to it ;-)

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top