def in6_6to4ExtractAddr(addr):
 try:
  addr = inet_pton(socket.AF_INET6, addr)
 except:
  return None
 if (addr[:2] != ' \x02'):
  return None
 return inet_ntop(socket.AF_INET, addr[2:6])

def in6_6to4ExtractAddr ( addr ) : try : addr = inet_pton ( socket . AF_INET6 , addr ) except : return None if ( addr [ : 2 ] != ' \x02' ) : return None return inet_ntop ( socket . AF_INET , addr [ 2 : 6 ] )
extract ipv4 address embedded in 6to4 address .