none
How to get the server MAC address

    Question

  • Hi!

     

    Is there some method to get the mac address from the server, from a client?

     

    Thanks,

    Bobby

    Wednesday, July 02, 2008 9:45 PM

Answers

  • The Home Server SDK doesn't provide a documented way to do that... however you can go a layer deeper into the Windows API's and get it.

     

    In an add-in of mine I used the Win32 method SendArp() (example on PInvoke.NET).

     

    If you use that method you may want to add a bit of logic to send out a ping to the PC in question (so as to make sure your local PC knows the address) and then call SendArp() again if it doesn't return what you are looking for the first time.

     

    Edit: I just remembered that I posted some sample code on doing this last year.

    Wednesday, July 02, 2008 9:56 PM

All replies

  • The Home Server SDK doesn't provide a documented way to do that... however you can go a layer deeper into the Windows API's and get it.

     

    In an add-in of mine I used the Win32 method SendArp() (example on PInvoke.NET).

     

    If you use that method you may want to add a bit of logic to send out a ping to the PC in question (so as to make sure your local PC knows the address) and then call SendArp() again if it doesn't return what you are looking for the first time.

     

    Edit: I just remembered that I posted some sample code on doing this last year.

    Wednesday, July 02, 2008 9:56 PM
  • Thanks Brendan!

     

    That was what I wanted to avoid but apparantly there's no other way then. :-s

    The sample code was for me too but then the other way round, so I now have to get the server name or ip, somewhere from the registry and then do the arp stuff...

     

    Bobby

    Wednesday, July 02, 2008 10:07 PM
  •  

    From the client computer start a remote desktop session and type ipconfig/all in the cmd window it will give it to you.
    Friday, July 04, 2008 10:33 AM