MCPcopy Index your code
hub / github.com/secdev/scapy / valid_ip6

Function valid_ip6

scapy/utils.py:789–799  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

787
788
789def valid_ip6(addr):
790 # type: (str) -> bool
791 try:
792 addr = plain_str(addr)
793 except UnicodeDecodeError:
794 return False
795 try:
796 inet_pton(socket.AF_INET6, addr)
797 except socket.error:
798 return False
799 return True
800
801
802def valid_net6(addr):

Callers 3

from_cli_argumentsMethod · 0.90
_ChoseRPCBindingMethod · 0.90
valid_net6Function · 0.85

Calls 2

plain_strFunction · 0.90
inet_ptonFunction · 0.90

Tested by

no test coverage detected