On Nov 20, 2012, at 9:34 AM, Sam Roberts <[email protected]> wrote:

> On Mon, Nov 19, 2012 at 9:44 AM, Joe Anello <[email protected]> wrote:
>> I’m sure it is in the documentation, but I just can’t seem to find it.
> 
> Better to read the source.
> 
>> I have a Windows based system with 6 GigE ports (all based on the same Intel
>> chips).  When I call pcap_findalldevs, it returns a list that contains 6
>> IDENTICAL strings for the ports. Pcap_open_live expects me to pass it that
>> identification string, but since they are all the same, how do I identify
>> which of the 6 ports I want to open?
> 
> You mean in struct pcap_if, the .name fields are all the same, or the
> .description fields?

...because the .name field is what should be passed to pcap_open_live(), not 
the description field.

There is no guarantee that the description field will be different for all 
interfaces - on Windows (i.e., in WinPcap rather than in libpcap on various 
UN*Xes), it comes from the "vendor description" supplied by the driver, which 
describes the adapter's hardware (or, in some cases, describes an intermediate 
driver), so if you have multiple adapters of the same type, the descriptions 
will be identical.

I suspect that the .name field is *not* the same for all the adapters.
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to