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

Function get_if_addr

scapy/arch/__init__.py:78–83  ·  view source on GitHub ↗

Returns the IPv4 of an interface or "0.0.0.0" if not available

(iff)

Source from the content-addressed store, hash-verified

76
77
78def get_if_addr(iff):
79 # type: (_GlobInterfaceType) -> str
80 """
81 Returns the IPv4 of an interface or "0.0.0.0" if not available
82 """
83 return inet_ntop(socket.AF_INET, get_if_raw_addr(iff)) # noqa: F405
84
85
86def get_if_hwaddr(iff):

Callers 10

sniffMethod · 0.90
spawnMethod · 0.90
read_routesFunction · 0.90
__init__Method · 0.90
make_replyMethod · 0.90
arpleakFunction · 0.90
__init__Method · 0.90
make_replyMethod · 0.90
spawnMethod · 0.90

Calls 2

inet_ntopFunction · 0.90
get_if_raw_addrFunction · 0.70

Tested by

no test coverage detected