code: def get_if_raw_addr6(iff):
      
      #r = filter(lambda x: x[2] == iff and x[1] == IPV6_ADDR_GLOBAL, in6_getifaddr())
      r = [ x for x in in6_getifaddr() if x[2] == iff and x[1] == IPV6_ADDR_GLOBAL]
      if len(r) == 0:
          return None
      else:
          r = r[0][0] 
      return inet_pton(socket.AF_INET6, r)
docs: Returns the main global unicast address associated with provided 
      interface, in network format. If no global address is found, None 
      is returned.