(I am on [EMAIL PROTECTED]; there is no point in CCing me on
mail to that list.)

> Can you please tell me if there is any way we can modify the current tcpdump
> code to enable sniffing on all devices simultaniously in one process. I am
> using Sun OS 5.8.

Not without significant changes to "pcap-dlpi.c" to open multiple
capture devices and use "select()" or "poll()" to wait on all of them.

This would also break programs that expect "pcap_fileno()" to return the
file descriptor for the currently open capture device, and may have
other problems.

As such, it is not likely to happen any time soon, so don't wait for it
to happen unless you can wait a long while; find another way to
accomplish your goal, such as running multiple tcpdump processes.

> I have used socket before and the following command listens on all ethernet
> ports at the same time:
> 
> servAddr.sin_addr.s_addr = htonl(INADDR_ANY);

Well, that command doesn't listen on anything - it sets a field in a
structure.  A "bind()" with "servAddr" will listen on all *IPv4
addresses* for the machine, which means it'll listen on all interfaces
that have IPv4 addresses (whether they're Ethernet interfaces or not) -
but won't listen on interfaces that don't have IPv4 addresses.

In any case, that's irrelevant to what libpcap does on SunOS 5.x - on
SunOS 5.x, captures use DLPI, rather than sockets, and the DLPI devices
on SunOS 5.x refer to particular types of interfaces (so if you have
more than one type of Ethernet card, for example, there is no single
DLPI device to open to use all of them), and I'm not even sure you can
capture on an "unbound" DLPI device (so that it listens on all units of
that type).
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to