tcpdump mailing list archives

Re: libpcap & poll()


From: Eloy Paris <peloy () chapus net>
Date: Thu, 13 Nov 2008 18:24:19 -0500

Hi Ben,

On Thu, Nov 13, 2008 at 03:13:05PM -0800, Ben Greear wrote:

[...]

The code above works on Solaris, but does not work on Windows since
there is nothing to poll() on windows.

Windows has select() but it is my understanding that you can't use it on
a packet capture descriptor. At least pcap_get_selectable_fd() is not
available on Windows, according to the pcap man page.

This is a major bummer for my application and is the only reason I
haven't tried to attempt a port of my application to Windows. I'd love
to know how to efficiently read from multiple packet capture descriptors
on Linux...

On Linux, I just use raw sockets, which are faster and easier to deal
with than pcap..but my app is probabl different in nature from yours.

If portability is not needed raw sockets are nice. The nice thing about
PCAP is that it's portable.

Cheers,

Eloy Paris.-
netexpect.org
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: