convert NetInterfaceConfig.Hwaddr to NetAddress

This commit is contained in:
Doug MacEachern 2006-07-05 21:42:28 +00:00
parent 4a3a4caa07
commit 665701d9af
1 changed files with 7 additions and 2 deletions

View File

@ -451,11 +451,10 @@ namespace Hyperic.Sigar {
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=16)] [MarshalAs(UnmanagedType.ByValTStr, SizeConst=16)]
public readonly string Name; //char[16] public readonly string Name; //char[16]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] [MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]
public readonly string Hwaddr; //char[64]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]
public readonly string Type; //char[64] public readonly string Type; //char[64]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=256)] [MarshalAs(UnmanagedType.ByValTStr, SizeConst=256)]
public readonly string Description; //char[256] public readonly string Description; //char[256]
private readonly NetAddress hwaddr;
private readonly NetAddress address; private readonly NetAddress address;
private readonly NetAddress destination; private readonly NetAddress destination;
private readonly NetAddress broadcast; private readonly NetAddress broadcast;
@ -506,6 +505,12 @@ namespace Hyperic.Sigar {
return buffer.ToString(); return buffer.ToString();
} }
public string Hwaddr {
get {
return inet_ntoa(this.hwaddr);
}
}
public string Address { public string Address {
get { get {
return inet_ntoa(this.address); return inet_ntoa(this.address);