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

Method load

scapy/arch/linux/__init__.py:164–175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162 return bool(dev.flags & IFF_UP)
163
164 def load(self):
165 # type: () -> Dict[str, NetworkInterface]
166 data = {}
167 for iface in _get_if_list().values():
168 if_data = iface.copy()
169 if_data.update({
170 "network_name": iface["name"],
171 "description": iface["name"],
172 "ips": [x["address"] for x in iface["ips"]]
173 })
174 data[iface["name"]] = NetworkInterface(self, if_data)
175 return data
176
177
178conf.ifaces.register_provider(LinuxInterfaceProvider)

Callers

nothing calls this directly

Calls 5

_get_if_listFunction · 0.90
NetworkInterfaceClass · 0.90
valuesMethod · 0.45
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected