Get the MAC address of a LAN client ?

Community Forums/General Help/Get the MAC address of a LAN client ?

Panno(Posted 2010) [#1]
as the topic say :

how to "Get the MAC address of a LAN client" in bmax without tools such like arp -a


BlitzSupport(Posted 2010) [#2]
I tried this a few days ago and failed, but finally got it working today:



This is Windows NT-specific, but the basic process is the same across OSes -- they all use sendarp, inet_addr, etc, as far as I know.

Please note that the demo obtains your public IP from my web site, so may pop up a firewall warning. Just comment those lines out of that's a problem, and specify the local IP you want to retrieve the MAC from. [EDIT: Actually, on XP my public IP has an associated MAC, but on '7 it doesn't, so don't be surprised if that test fails.]

Please note dire warning at bottom of code! Not sure what causes that...


Panno(Posted 2010) [#3]
wow many thanks James.
sendarp with the iphlpapi.dll i dig this out from some vbforum but i get it never runing

thx again


AJ00200(Posted 2010) [#4]
Yes, the ARP protocal is supported by all RFC compliant devices.