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

Method __repr__

scapy/route.py:49–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 self.routes = read_routes()
48
49 def __repr__(self):
50 # type: () -> str
51 rtlst = [] # type: List[Tuple[Union[str, List[str]], ...]]
52 for net, msk, gw, iface, addr, metric in self.routes:
53 if_repr = resolve_iface(iface).description
54 rtlst.append((ltoa(net),
55 ltoa(msk),
56 gw,
57 if_repr,
58 addr,
59 str(metric)))
60
61 return pretty_list(rtlst,
62 [("Network", "Netmask", "Gateway", "Iface", "Output IP", "Metric")]) # noqa: E501
63
64 def make_route(self,
65 host=None, # type: Optional[str]

Callers

nothing calls this directly

Calls 4

resolve_ifaceFunction · 0.90
ltoaFunction · 0.90
pretty_listFunction · 0.90
appendMethod · 0.45

Tested by

no test coverage detected