Undocumented WHS Classes: NetworkUtils

Another small class, in the series of undocumented API’s in Windows Home Server.

This new article describes the undocumented functions in the NetworkUtils class which is located in WHSCommon.dll.
This class contains 2 handy functions to get IP/Mac address of the server & the IP of the router.

void GetRouterIPAndServerMAC(out string ip, out string mac)
Get the IP address of the router and mac address of the server.

Sample code
string ip, mac;
NetworkUtils.GetRouterIPAndServerMAC(out ip, out mac);

Sample output
IP: 172.19.3.1
MAC:00-19-DB-7B-6D-35

string GetServerIP()
Get the IP address of the server.
Sample code
string serverIp = NetworkUtils.GetServerIP();

Sample output
IP: 172.19.3.10

So as you see, two very easy to use functions, that a very handy!
You can follow ASoft @Twitter: http://twitter.com/asoftware

Have fun!

Advertisements

Tags: , , , , , , ,

2 Responses to “Undocumented WHS Classes: NetworkUtils”

  1. Undocumented WHS Classes: NetworkUtils | GeekGazette.net Says:

    […] https://asoftblog.wordpress.com/2009/10/08/undocumented-whs-classes-networkutils/ Categories : All, Software […]

  2. The Undocumented NetworkUtils WHS Class « MS Windows Home Server Says:

    […] Nick has the details here. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: