code: def in6_getifaddr():
      
      ret = []
      try:
          f = open("/proc/net/if_inet6","rb")
      except IOError as 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 = kamene.utils6.in6_ptop(b':'.join(addr).decode('ascii'))
          ret.append((addr, int(tmp[3], 16), tmp[5].decode('ascii'))) # (addr, scope, iface)
      f.close()
      return ret
docs: 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.