[Winpcap-users] Adapters MAC-address

Gianluca Varenni gianluca.varenni at cacetech.com
Tue Sep 18 15:29:04 GMT 2007


Unfortunately, as Ioan already pointed out, there is no pcap API to obtain 
the MAC address of an adapter. There are two alternatives:

- use the IP helper API, match the name of the adapters returned by WinPcap 
with the ones returned by the IP helper API and obtain the MAC address
- use the Packet API to retrieve the MAC address, as shown in the sample

WpdPack\Examples-remote\PacketDriver\GetMacAddress

Hope it helps
GV


----- Original Message ----- 
From: "Roger" <roger at gaspsys.se>
To: <winpcap-users at winpcap.org>
Sent: Friday, September 14, 2007 12:17 AM
Subject: [Winpcap-users] Adapters MAC-address


> Hi
> I just started programming with WinPcap.
> I want to build a packet with destination and source addresses
> and send it using pcap_sendpacket. But how do I get the source
> address which in this case is the selected adapters MAC-address?
> I have looked through the documentation but have not been able
> to find it. I can of course get it using a windows function,
> but then I have to match it to the pcap adapter. There must
> be a smarter way to get it. Please help.
> Kind regards
> Germund Asp
>
>
>
> _______________________________________________
> 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