Mega Search
23.2 Million


Sign Up

Make a donation  
Get Mac Addres synapse  
News Group: embarcadero.public.delphi.internet.winsock

Hi, I need to get Mac Address from the data package in the network. I'm using synapse.
I´m doing an application acting as a UDP Server. Then, there are some machines connecting to that server and send some packages…Is it possible to figure out the Mac Address from these incoming packages? I could send a ARP resolution to do this, but there are some case (start situation) that I have some machines with the same IP. 
I also work with PIC microcontroller and there I can do this, but I couldn´t find a way to this on the PC.
Any trip, tip or clue are very welcome.

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2015, at 4:30 AM EST
From: Filipe Gebara
 
Re: Get Mac Addres synapse  
News Group: embarcadero.public.delphi.internet.winsock
Filipe wrote:

> Hi, I need to get Mac Address from the data package in the network.

Why?  Socket code should not care about MACs, only IPs.

> I´m doing an application acting as a UDP Server. Then, there are some
> machines connecting to that server and send some packages…Is it
> possible to figure out the Mac Address from these incoming packages?

UDP sockets do not expose that information.  If you absolutely need access 
to the MAC of an inbound packet, you need access to the packet's ethernet 
header.  You would have to either use a packet sniffing library, such as 
libpcap, or else use a RAW socket (which requires admin rights) instead of 
a UDP socket.

--
Remy Lebeau (TeamB)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2015, at 10:23 AM EST
From: Remy Lebeau (TeamB)