How do I obtain the physical (MAC) address of an IP address using C#?

后端 未结 4 1399
失恋的感觉
失恋的感觉 2020-12-05 20:03

From C#, I want to do the equivalent of the following:

arp -a |findstr 192.168.1.254

Alternatively, the answer could call the SendARP funct

4条回答
  •  执笔经年
    2020-12-05 20:53

    Hook into the WMI subsystem. Some VBScript code to get going in the right direction is here

提交回复
热议问题