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

MARMONIER Cédric cmarmonier at ifotec.com
Tue Sep 13 03:56:15 PDT 2011


Ok I thank you, my programm work on windows xp
=> I will see later for linux



-----Message d'origine-----
De : winpcap-users-bounces at winpcap.org [mailto:winpcap-users-bounces at winpcap.org] De la part de Wentao Shang
Envoyé : mardi 13 septembre 2011 09:45
À : winpcap-users at winpcap.org
Objet : Re: [Winpcap-users] How to get local MAC address ?

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 Cdric <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,
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users



More information about the Winpcap-users mailing list