[Winpcap-users] Re: How will winpcap recognize 2 realtek 8139 adapters

Guy Harris guy at alum.mit.edu
Fri Dec 2 11:18:47 GMT 2005

Bhuvanes V wrote:
>         I have one more doubt related to WINPCAP.
WinPcap questions should be sent to winpcap-users at winpcap.org, not to me.
> 1) Is it possible to capture packets from multiple interfaces using 
> single winpcap function?

You should, however, be able to open the two interfaces with 
pcap_open(), call pcap_gethandle() to get handles from the two pcap_t's, 
and then block on them with a WaitForMultipleEvents() call and, if any 
of them are indicated as readable by WaitForMultipleEvents(), call 
pcap_dispatch() on them.  (On UN*X, you'd use pcap_get_selectable_fd() 
or, in older versions, pcap_fileno(), and call select() on them - NOTE 
that, at least in Mac OS X 10.4[.x], you can't use poll() on them.)
> If so how can i capture raw packets(Layer 2 pkts) for eg. STP packets 
> from multiple interfaces using
> Thanks and Regards,
> Bhuvan

More information about the Winpcap-users mailing list