[Winpcap-users] How to get local MAC address ?

Wentao Shang wentaoshang at gmail.com
Tue Sep 13 00:44:51 PDT 2011


Sorry I gave you the wrong prefix.

Try this one:

const char pcap_prefix[] = "rpcap://\\Device\\NPF_";

The 'pcap_if->name' should start with the prefix above and there is
nothing behind the GUID. (No '{' and '}'. Wireshark failed me...) Pay
attention to the double '\'. :)

Or you may print out both strings and find a proper matching method.

Regards.

Wentao

2011/9/13 MARMONIER Cédric <cmarmonier at ifotec.com>:
>
>
>>> One solution is to compare the 'AdapterName' field in IP_ADAPTER_ADDRESSES struct with the field in pcap_if_t struct (i don't remember the name).
>
> I don't know why but the fields are not exactly the same XD : I can't compare the strings
>
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>



-- 
Wentao Shang

Master Candidate and Research Assistant at CERNET Center & NGN Lab, EE
Department, Tsinghua University,

Email: wentaoshang at gmail.com, mundou at qq.com,

Mobile: +86-13466605118, +86-18952150939,


More information about the Winpcap-users mailing list