From 0bfcfc18fa81fcbb9c9c3a1c715d013e25cf46ca Mon Sep 17 00:00:00 2001 From: Dave Malcolm Date: Fri, 1 Jul 2011 19:00:00 -0400 Subject: pifethtool: Show IPv6 address information when available Signed-off-by: David Sommerseth --- pifconfig.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pifconfig.py b/pifconfig.py index d509483..1536071 100755 --- a/pifconfig.py +++ b/pifconfig.py @@ -65,9 +65,15 @@ def show_config(device): inet addr:%s''' % ipaddr, if not (flags & (ethtool.IFF_LOOPBACK | ethtool.IFF_POINTOPOINT)): print "Bcast:%s" % ethtool.get_broadcast(device), - print ''' Mask:%s - %s -''' % (netmask, flags2str(flags)) + print ' Mask:%s' % netmask + for info in ethtool.get_interfaces_info(device): + for addr in info.get_ipv6_addresses(): + print (" inet6 addr: %s/%s Scope: %s" + % (addr.address, + addr.netmask, + addr.scope)) + print ' %s' % flags2str(flags) + print def main(): global all_devices -- cgit