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

Function in6_iseui64

scapy/utils6.py:566–576  ·  view source on GitHub ↗

Return True if provided address has an interface identifier part created in modified EUI-64 format (meaning it matches ``*::*:*ff:fe*:*``). Otherwise, False is returned. Address must be passed in printable format.

(x)

Source from the content-addressed store, hash-verified

564
565
566def in6_iseui64(x):
567 # type: (str) -> bool
568 """
569 Return True if provided address has an interface identifier part
570 created in modified EUI-64 format (meaning it matches ``*::*:*ff:fe*:*``).
571 Otherwise, False is returned. Address must be passed in printable
572 format.
573 """
574 eui64 = inet_pton(socket.AF_INET6, '::ff:fe00:0')
575 bx = in6_and(inet_pton(socket.AF_INET6, x), eui64)
576 return bx == eui64
577
578
579def in6_isanycast(x): # RFC 2526

Callers 1

in6_isanycastFunction · 0.85

Calls 2

inet_ptonFunction · 0.90
in6_andFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…