scapy.pton_ntop

Convert IPv6 addresses between textual representation and binary.

These functions are missing when python is compiled without IPv6 support, on Windows for instance.

scapy.pton_ntop.inet_ntop(af: AddressFamily, addr: bytes) str[source]

Convert an IP address from binary form into text representation.

scapy.pton_ntop.inet_pton(af: AddressFamily, addr: bytes | str) bytes[source]

Convert an IP address from text representation into binary form.