add NetInterfaceConfig.Type
This commit is contained in:
parent
1296c1ebe6
commit
f6aa1fa388
|
@ -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 = "";
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue