AW: [Winpcap-users] Getting MAC Address
bugtraq
bugtraq at 163.com
Wed Nov 8 03:17:48 GMT 2006
Please use Win32 API function GetAdaptersInfo() .
On Tue, 7 Nov 2006 09:45:03 +0100
"Wolf Wolfgang" <wolf at faps.uni-erlangen.de> wrote:
> 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
>
>
>
>
>
> --
> ³æ¤¡É
> N§¿ÅBBB¤µÄ
> ÍñBi@WCrkð¤
--
bugtraq <bugtraq at 163.com>
More information about the Winpcap-users
mailing list