use ifconfig->type
This commit is contained in:
parent
c224d52ce3
commit
082c64e00c
|
@ -11,8 +11,7 @@ for my $ifname (@$iflist) {
|
|||
my $ifconfig = $sigar->net_interface_config($ifname);
|
||||
my $flags = $ifconfig->flags;
|
||||
|
||||
my $encap = ($flags & Sigar::IFF_LOOPBACK) ?
|
||||
"Local Loopback" : "Ethernet";
|
||||
my $encap = $ifconfig->type;
|
||||
|
||||
my $hwaddr = $ifconfig->hwaddr;
|
||||
if ($hwaddr eq Sigar::NULL_HWADDR) {
|
||||
|
|
Loading…
Reference in New Issue