Home All Groups Group Topic Archive Search About

Perform ARP request via code

Author
20 Oct 2006 2:05 PM
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

Author
20 Oct 2006 2:36 PM
Spam Catcher
"Stuart Parker" <mrgimper@nospam-hotmail.com> wrote in
news:OR9L9CF9GHA.4740@TK2MSFTNGP02.phx.gbl:

> 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.