diff --git a/bindings/perl/examples/ifconfig.pl b/bindings/perl/examples/ifconfig.pl index bd94362b..35a87f04 100755 --- a/bindings/perl/examples/ifconfig.pl +++ b/bindings/perl/examples/ifconfig.pl @@ -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) {