# these examples show the reserved networks
is_ipv4_mapped(ip_network("::ffff:0.0.0.0/96"))
is_6to4(ip_network("2002::/16"))
is_teredo(ip_network("2001::/32"))
# these examples show embedded IPv4 addresses
extract_ipv4_mapped(ip_address("::ffff:192.168.0.1"))
extract_6to4(ip_address("2002:c000:0204::"))
extract_teredo_server(ip_address("2001:0000:4136:e378:8000:63bf:3fff:fdd2"))
extract_teredo_client(ip_address("2001:0000:4136:e378:8000:63bf:3fff:fdd2"))
Run the code above in your browser using DataLab