title: Get a machines MAC address on the local network from its IP in C#
body: <p>I am trying write a function that takes a single <code>IP address</code> as a parameter and queries that machine on my local network for it's <code>MAC address</code>.</p>
  
  <p>I have seen many examples that get the local machine's own <code>MAC address</code>, however none (I've found) that seem to query a local network machine for it.</p>
  
  <p>I know such a task is achievable as this <a href="http://www.nirsoft.net/utils/wake_on_lan.html">Wake on LAN scanner</a> software scans the local IP range and returns MAC address/Hostname of all on machines.</p>
  
  <p>Can anyone tell me where I'd get started trying to write a function to achieve this in C#? Any help would be appreciated. Thanks</p>
  
  <p>EDIT:</p>
  
  <p>As per Marco Mp's comment below, have used ARP tables.
  <a href="http://pietschsoft.com/post/2009/11/08/Resolve_IP_Address_And_Host_Name_From_MAC_Address_using_CSharp_and_Windows_ARP_Utility.aspx">arp class</a></p>