[Winpcap-users] How to get local MAC address ?
Fish" (David B. Trout
fish at infidels.org
Mon Sep 12 14:24:37 PDT 2011
Wentao Shang wrote:
[...]
> One solution is to compare the 'AdapterName' field
(Or maybe Description? Or maybe FriendlyName?)
> in IP_ADAPTER_ADDRESSES struct with the field in pcap_if_t struct
> (i don't remember the name).
(Description?)
> You may first get the whole pcap_if_t struct list then select
> the one you need.
I agree. That is probably the best way. Scan the list of IP_ADAPTER_ADDRESSES returned by GetAdaptersAddresses and find(*) the entry for the WinPCap adapter you're interested in.
--
"Fish" (David B. Trout)
fish at softdevlabs.com
(*) AdapterName? Description? FriendlyName? Not sure which one is correct, but I seem to recall ONE of them matches the WinPCap Description field (I think).
More information about the Winpcap-users
mailing list