Hi,

   I have a question about pcap. I am writing a program to capture packets 
which arrive on any of my interfaces since I do not know on which interface 
the packets might arrive. I am running a RHL kernel 2.4.2-2 and I am 
assuming that this kernel supports the "any" device for capturing packets on 
all interfaces. am I right? If so, when I use "any" in pcap_open_live(), it 
returns a descriptor for the interface. What does it return in the case 
where we use "any". Does it return an array of descriptors? Also, I need to 
use the descriptor returned by this function in pcap_compile() and 
pcap_setfilter(). How do I do this assuming I get an array of descriptors? 
Should I call these functions with each of the elements of the descriptor 
array?

Finally, if "any" is not supported by my Kernel, What is an alternative 
method of capturing packets on all interfaces? One way that I can think of 
is to somehow get a list of all the interfaces of the machine and then call 
pcap_open_live() and the other functions individually on each of the 
interfaces. Am I correct and/or is ther any other way of doing this?
Any replies to this mail would be a great help to me in my project. Thank 
you.

moni.



Subramoni Padmanabhan
G-126, 700 woodland avenue
Lexington, Kentucky 40508
Phone : 859 323 9405


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

-
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