Features for getting system mac addresses

This commit is contained in:
Chris Cameron
2017-10-11 11:52:38 -04:00
parent 218107b371
commit 8cda2f5d7d
2 changed files with 71 additions and 20 deletions

View File

@@ -40,6 +40,22 @@ namespace ICD.Common.Utils
}
}
/// <summary>
/// Gets the mac address(es) of the processor.
/// </summary>
[PublicAPI]
public static IEnumerable<string> MacAddresses
{
get
{
const CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET param =
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS;
const EthernetAdapterType type = EthernetAdapterType.EthernetLANAdapter;
short id = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(type);
yield return CrestronEthernetHelper.GetEthernetParameter(param, id);
}
}
#region Methods
public static DateTime GetLocalTime()