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 $ifconfig = $sigar->net_interface_config($ifname);
|
||||||
my $flags = $ifconfig->flags;
|
my $flags = $ifconfig->flags;
|
||||||
|
|
||||||
my $encap = ($flags & Sigar::IFF_LOOPBACK) ?
|
my $encap = $ifconfig->type;
|
||||||
"Local Loopback" : "Ethernet";
|
|
||||||
|
|
||||||
my $hwaddr = $ifconfig->hwaddr;
|
my $hwaddr = $ifconfig->hwaddr;
|
||||||
if ($hwaddr eq Sigar::NULL_HWADDR) {
|
if ($hwaddr eq Sigar::NULL_HWADDR) {
|
||||||
|
|
Loading…
Reference in New Issue