Perform ARP request via code

  • Thread starter Thread starter Stuart Parker
  • Start date Start date
S

Stuart Parker

I need a routine to get a MAC address for a given IP address.

I don't want to use WMI as I don't want to depend on WMI being available on
the remote machine, or desktop firewalls getting in the way. So would like
to do this via the lowest most compatible level possible, i.e and ARP
request.

Could someone post some working VB code? I've seen examples of C# code using
the SendARP API but I've not had any success in converting it to VB.Net.

I'm using VB 2005 and .net 2.0

Cheers
 
I don't want to use WMI as I don't want to depend on WMI being
available on the remote machine, or desktop firewalls getting in the
way. So would like to do this via the lowest most compatible level
possible, i.e and ARP request.

Not sure if .NET has any classes to do that type of stuff - but it would be
pretty easy to parse it from the command line ARP utility.
 
Back
Top