AW: [Winpcap-users] Getting MAC Address

Wolf Wolfgang wolf at faps.uni-erlangen.de
Tue Nov 7 08:45:03 GMT 2006


Maybe there is a misunderstanding:
I want to retrieve the MAC-Address of the local network adapter, which I opened with pcap_open_live.
 
I know the local IP-Address, but I cannot send an ARP-Request for my own IP-Address, as I have
to insert my own MAC-Address in the sender-field of the message, which is unknown.
 
Which possibility do I have to retrieve the local MAC-Address?

________________________________

Von: winpcap-users-bounces at winpcap.org [mailto:winpcap-users-bounces at winpcap.org] Im Auftrag von Eric Hansen
Gesendet: Sonntag, 5. November 2006 14:31
An: winpcap-users at winpcap.org
Betreff: Re: [Winpcap-users] Getting MAC Address


" This is done by sending ARP packet. ARP packet is used to determine the host's MAC address when its IP address is known. First ARP request packet is sent by specifying the source MAC address, source IP address and destination IP Address. The ARP reply packet contains the destination MAC address. This method also prevents the target host from sending arp packet to source host when the source host sends the first SYN packet during scanning process. From the ARP request packet that we have sent , target host will come to know about the MAC address of the source host."

Source:  http://www.codeproject.com/internet/NagTPortScanner.asp


On 11/5/06, Wolf Wolfgang <wolf at faps.uni-erlangen.de> wrote: 

	Hello,
	
	I'm using pcap_...-Functions for sniffing and sending
	messages. But for sending I need the MAC address of the
	opened connection (with "pcap_open_live").
	How can I obtain this?
	
	Thanks! 
	
	Wolfgang
	
	
	_______________________________________________
	Winpcap-users mailing list
	Winpcap-users at winpcap.org
	https://www.winpcap.org/mailman/listinfo/winpcap-users
	




-- 
さよう今に
君立ちで。。。愛して
私は二ィナァジョイビロヌを愛 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20061107/75626c34/attachment-0001.htm


More information about the Winpcap-users mailing list