()
return ret
Returns a list of 3-tuples of the form (addr, scope, iface) where
    'addr' is the address of scope 'scope' associated to the interface
    'ifcace'.

    This is the list of all addresses of all interfaces available on
    the system.
Returns a list of 3-tuples of the form (addr, scope, iface) where
    'addr' is the address of scope 'scope' associated to the interface
    'ifcace'.
Returns a list of 3 - tuples of the form ( addr scope iface ) where addr is the address of scope scope associated to the interface ifcace .
def in6_getifaddr():
    """
    Returns a list of 3-tuples of the form (addr, scope, iface) where
    'addr' is the address of scope 'scope' associated to the interface
    'ifcace'.

    This is the list of all addresses of all interfaces available on
    the system.
    """
    ret = []
    try:
        f = open("/proc/net/if_inet6","r")
    except IOError, err:    
        return ret
    l = f.readlines()
    for i in l:
        # addr, index, plen, scope, flags, ifname
        tmp = i.split()
        addr = struct.unpack('4s4s4s4s4s4s4s4s', tmp[0])
        addr = scapy.utils6.in6_ptop(':'.join(addr))
        ret.append((addr, int(tmp[3], 16), tmp[5])) # (addr, scope, iface)
    return ret
def in6_getifaddr ( ) : ret = [ ] try : f = open ( "/proc/net/if_inet6" , "r" ) except IOError , err : return ret l = f . readlines ( ) for i in l : # addr, index, plen, scope, flags, ifname tmp = i . split ( ) addr = struct . unpack ( '4s4s4s4s4s4s4s4s' , tmp [ 0 ] ) addr = scapy . utils6 . in6_ptop ( ':' . join ( addr ) ) ret . append ( ( addr , int ( tmp [ 3 ] , 16 ) , tmp [ 5 ] ) ) # (addr, scope, iface) return ret