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

Function valid_net6

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

Source from the content-addressed store, hash-verified

800
801
802def valid_net6(addr):
803 # type: (str) -> bool
804 try:
805 addr = plain_str(addr)
806 except UnicodeDecodeError:
807 return False
808 if '/' in addr:
809 ip, mask = addr.split('/', 1)
810 return valid_ip6(ip) and mask.isdigit() and 0 <= int(mask) <= 128
811 return valid_ip6(addr)
812
813
814def ltoa(x):

Callers 1

ARPClass · 0.90

Calls 2

plain_strFunction · 0.90
valid_ip6Function · 0.85

Tested by

no test coverage detected