use NetInterfaceConfig.getType()

This commit is contained in:
Doug MacEachern 2005-11-18 18:09:12 +00:00
parent e8e6f86666
commit 583922f3d0

View File

@ -70,17 +70,13 @@ public class Ifconfig extends SigarCommandBase {
this.sigar.getNetInterfaceConfig(name);
long flags = ifconfig.getFlags();
//XXX cannot assume ethernet
String encap = (flags & NetFlags.IFF_LOOPBACK) > 0 ?
"Local Loopback" : "Ethernet";
String hwaddr = "";
if (!NetFlags.NULL_HWADDR.equals(ifconfig.getHwaddr())) {
hwaddr = " HWaddr " + ifconfig.getHwaddr();
}
println(ifconfig.getName() + "\t" +
"Link encap:" + encap +
"Link encap:" + ifconfig.getType() +
hwaddr);
String ptp = "";