RTC Forums

Subscription => Support => Topic started by: SevenOut on September 09, 2014, 12:54:20 AM



Title: Obtain MAC address of connected client
Post by: SevenOut on September 09, 2014, 12:54:20 AM
I need to determine the MAC address of the client.  I have a server that allows the client to make function calls using the RtcClientModule.  I currently get the PeerAddr on the server side using in the OnExecute event using TRtcDataServer(Sender).PeerAddr.  Is there a way to get the MAC address too?

Thanks,
Scott


Title: Re: Obtain MAC address of connected client
Post by: D.Tkalcec (RTC) on September 09, 2014, 01:59:47 AM
Sorry, but there is nothing related to MAC Addresses in the RTC SDK.

What I did find out about MAC Addresses after googling for a bit, is that an IP packet no longer contains a MAC Address of its origin after the packet has passed a few locations (routers, gateways, firewalls or proxies) and the only way for a Server to find out the MAC Address of the Client would be to send the Client a packet and ask for it.

Here is a Forum discussion about obtaining MAC Addresses from remote clients (Linux?):
http://www.linuxquestions.org/questions/programming-9/remote-client-mac-address-on-socket-descriptor-850092

Here is an article with an example in VC++ for Windows (looks promissing):
http://www.binarytides.com/get-mac-address-from-ip-in-winsock/

And here is a Forum Thread with an example in Delphi:
http://www.borlandtalk.com/indy-how-to-obtain-peers-mac-adress--vt43051.html

I hope that helps. If not, try using Google. There are a lot of articles and Forum threads about this subject.

Best Regards,
Danijel Tkalcec