<p>From C#, I want to do the equivalent of the following:</p>

<pre><code>arp -a |findstr 192.168.1.254
</code></pre>

<p>Alternatively, the answer could call the <a href="http://msdn.microsoft.com/en-us/library/aa366358.aspx" rel="noreferrer">SendARP</a> function and get the results.</p>

<p>This will allow my application to do some other processing that requires the MAC address.</p>

SendARP P/Invoke goes like this:
```
```
[DllImport("iphlpapi.dll", ExactSpelling=true)]
public static extern int SendARP( int destIp, int srcIP, byte[] macAddr, ref uint physicalAddrLen );
```
```
PInvoke.NET
has this example:
```
```
IPAddress dst = IPAddress.Parse("192.168.2.1"); // the destination IP address

byte[] macAddr = new byte[6];
uint macAddrLen = (uint)macAddr.Length;

if (SendARP(BitConverter.ToInt32(dst.GetAddressBytes(), 0), 0, macAddr, ref macAddrLen) != 0)
     throw new InvalidOperationException("SendARP failed.");

string[] str = new string[(int)macAddrLen];
for (int i=0; i<macAddrLen; i++)
     str[i] = macAddr[i].ToString("x2");

Console.WriteLine(string.Join(":", str));
```
```