add NetInterfaceConfig.Type

This commit is contained in:
Doug MacEachern 2005-12-06 17:01:54 +00:00
parent 1296c1ebe6
commit f6aa1fa388
2 changed files with 3 additions and 5 deletions

View File

@ -12,17 +12,13 @@ public class Ifconfig {
sigar.NetInterfaceConfig(name);
ulong flags = ifconfig.Flags;
//XXX cannot assume ethernet
String encap = (flags & Sigar.IFF_LOOPBACK) > 0 ?
"Local Loopback" : "Ethernet";
String hwaddr = "";
if (!Sigar.NULL_HWADDR.Equals(ifconfig.Hwaddr)) {
hwaddr = " HWaddr " + ifconfig.Hwaddr;
}
println(ifconfig.Name + "\t" +
"Link encap:" + encap +
"Link encap:" + ifconfig.Type +
hwaddr);
String ptp = "";

View File

@ -445,6 +445,8 @@ namespace Hyperic.Sigar {
public readonly string Name; //char[16]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]
public readonly string Hwaddr; //char[64]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]
public readonly string Type; //char[64]
private readonly ulong address;
private readonly ulong destination;
private readonly ulong broadcast;