(self, resolve_mac=True)
Print list of available network interfaces in human readable form
Print list of available network interfaces in human readable form
Print list of available network interfaces in human readable form
def show(self, resolve_mac=True):
        """Print list of available network interfaces in human readable form"""
        print "%s  %s  %s" % ("IFACE".ljust(5), "IP".ljust(15), "MAC")
        for iface_name in sorted(self.data.keys()):
            dev = self.data[iface_name]
            mac = str(dev.mac)
            if resolve_mac:
                mac = conf.manufdb._resolve_MAC(mac)
            print "%s  %s  %s" % (str(dev.name).ljust(5), str(dev.ip).ljust(15), mac)
def show ( self , resolve_mac = True ) : print "%s  %s  %s" % ( "IFACE" . ljust ( 5 ) , "IP" . ljust ( 15 ) , "MAC" ) for iface_name in sorted ( self . data . keys ( ) ) : dev = self . data [ iface_name ] mac = str ( dev . mac ) if resolve_mac : mac = conf . manufdb . _resolve_MAC ( mac ) print "%s  %s  %s" % ( str ( dev . name ) . ljust ( 5 ) , str ( dev . ip ) . ljust ( 15 ) , mac )