def in6_get6to4Prefix(addr):
 try:
  addr = inet_pton(socket.AF_INET, addr)
  addr = inet_ntop(socket.AF_INET6, ((' \x02' + addr) + ('\x00' * 10)))
 except:
  return None
 return addr

def in6_get6to4Prefix ( addr ) : try : addr = inet_pton ( socket . AF_INET , addr ) addr = inet_ntop ( socket . AF_INET6 , ( ( ' \x02' + addr ) + ( '\x00' * 10 ) ) ) except : return None return addr
returns the /48 6to4 prefix associated with provided ipv4 address on error .