[Winpcap-users] Active ethernet devices + PCAP_OPENFLAG_PROMISCUOUS on 802.11

Mikael Hillborg mikael at hillborg.se
Mon Jun 2 18:07:11 GMT 2008


Two questions.

Is it possible to check which ethernet adapters that are active / switched on?
I call pcap_findalldevs_ex and then get a list of ethernet adapters, including 
those that aren't connected (e.g. my wired ethernet card when I'm using the
802.11 card). I'd like to check which ones that are active and which ones 
that aren't even connected. A get a handle (!= NULL) back from all of them 
when I open them with pcap_open and I can't find a way to check which 
one that is currently in use. 

So basically I get a list of three cards. These are the "generic dial up and
VPN adapter", my ethernet adapter and the wireless card, which is by the
way wrapped as a DLT_EN10MB device. Which brings me to the second
question. It's actually possible to call pcap_open on the 802.11 card 
with the flag PCAP_OPENFLAG_PROMISCUOUS and the call will return a 
handle for me. But it's definitely not in "promiscous mode", but nevertheless 
I get a (!= NULL) handle back. Is that the way this call works? If the 802.11 
driver for the card doesn't support "promiscous mode" (which almost no 
802.11 cards on Windows do IIRC) then should it really reply with a handle 
and not NULL?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2280 bytes
Desc: not available
Url : http://www.winpcap.org/pipermail/winpcap-users/attachments/20080602/1968d888/winmail.bin

More information about the Winpcap-users mailing list