add NetInterfaceConfig.Type
This commit is contained in:
parent
1296c1ebe6
commit
f6aa1fa388
|
@ -12,17 +12,13 @@ public class Ifconfig {
|
||||||
sigar.NetInterfaceConfig(name);
|
sigar.NetInterfaceConfig(name);
|
||||||
ulong flags = ifconfig.Flags;
|
ulong flags = ifconfig.Flags;
|
||||||
|
|
||||||
//XXX cannot assume ethernet
|
|
||||||
String encap = (flags & Sigar.IFF_LOOPBACK) > 0 ?
|
|
||||||
"Local Loopback" : "Ethernet";
|
|
||||||
|
|
||||||
String hwaddr = "";
|
String hwaddr = "";
|
||||||
if (!Sigar.NULL_HWADDR.Equals(ifconfig.Hwaddr)) {
|
if (!Sigar.NULL_HWADDR.Equals(ifconfig.Hwaddr)) {
|
||||||
hwaddr = " HWaddr " + ifconfig.Hwaddr;
|
hwaddr = " HWaddr " + ifconfig.Hwaddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
println(ifconfig.Name + "\t" +
|
println(ifconfig.Name + "\t" +
|
||||||
"Link encap:" + encap +
|
"Link encap:" + ifconfig.Type +
|
||||||
hwaddr);
|
hwaddr);
|
||||||
|
|
||||||
String ptp = "";
|
String ptp = "";
|
||||||
|
|
|
@ -445,6 +445,8 @@ namespace Hyperic.Sigar {
|
||||||
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]
|
public readonly string Hwaddr; //char[64]
|
||||||
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]
|
||||||
|
public readonly string Type; //char[64]
|
||||||
private readonly ulong address;
|
private readonly ulong address;
|
||||||
private readonly ulong destination;
|
private readonly ulong destination;
|
||||||
private readonly ulong broadcast;
|
private readonly ulong broadcast;
|
||||||
|
|
Loading…
Reference in New Issue