MCPcopy Create free account
hub / github.com/secdev/scapy / in6_isincluded

Function in6_isincluded

scapy/utils6.py:709–717  ·  view source on GitHub ↗

Returns True when 'addr' belongs to prefix/plen. False otherwise.

(addr, prefix, plen)

Source from the content-addressed store, hash-verified

707
708
709def in6_isincluded(addr, prefix, plen):
710 # type: (str, str, int) -> bool
711 """
712 Returns True when 'addr' belongs to prefix/plen. False otherwise.
713 """
714 temp = inet_pton(socket.AF_INET6, addr)
715 pref = in6_cidr2mask(plen)
716 zero = inet_pton(socket.AF_INET6, prefix)
717 return zero == in6_and(temp, pref)
718
719
720def in6_isllsnmaddr(str):

Callers 11

routeMethod · 0.90
in6_isdocaddrFunction · 0.85
in6_islladdrFunction · 0.85
in6_issladdrFunction · 0.85
in6_isuladdrFunction · 0.85
in6_isgladdrFunction · 0.85
in6_ismaddrFunction · 0.85
in6_ismnladdrFunction · 0.85
in6_ismgladdrFunction · 0.85
in6_ismlladdrFunction · 0.85
in6_ismsladdrFunction · 0.85

Calls 3

inet_ptonFunction · 0.90
in6_cidr2maskFunction · 0.85
in6_andFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…