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

Function get_ips

scapy/arch/windows/__init__.py:692–705  ·  view source on GitHub ↗

Returns all available IPs matching to interfaces, using the windows system. Should only be used as a WinPcapy fallback. :param v6: IPv6 addresses

(v6=False)

Source from the content-addressed store, hash-verified

690
691
692def get_ips(v6=False):
693 # type: (bool) -> Dict[NetworkInterface, List[str]]
694 """Returns all available IPs matching to interfaces, using the windows system.
695 Should only be used as a WinPcapy fallback.
696
697 :param v6: IPv6 addresses
698 """
699 res = {}
700 for iface in conf.ifaces.values():
701 if v6:
702 res[iface] = iface.ips[6]
703 else:
704 res[iface] = iface.ips[4]
705 return res
706
707
708def get_ip_from_name(ifname, v6=False):

Callers 2

get_ip_from_nameFunction · 0.85
in6_getifaddrFunction · 0.85

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected