

The way to get the Mac-Address of the machine itself is to use the. Return BitConverter.ToString(address.GetAddressBytes()) PhysicalAddress address = adapter.GetPhysicalAddress() NetworkInterface nics = NetworkInterface.GetAllNetworkInterfaces() įoreach (NetworkInterface adapter in nics)įoreach (UnicastIPAddressInformation unip in adapter.GetIPProperties().UnicastAddresses) Public static string GetMyMacAddress(string ip) / string com os bytes separados por hífen / Dado um ip que pertença a mesma rede, o MAC Address será dado _erro = "Não foi possível executar comando ARP" If (SendARP((int)IP.Address, 0, macAddr, ref macAddrLen) != 0)

Public static string TryGetMacAddress(string ip) / String com o MAC Address no formato XX-XX-XX-XX-XX / Recupera o MAC Address de um equipamento na rede local baseado em seu IP Public static extern int SendARP(int DestIP, int SrcIP, byte pMacAddr, ref uint PhyAddrLen) I already have tools that can identify the Mac-Address of devices on my network, as long as the 'server' or application is running on Windows and.
