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

Method add

scapy/route6.py:115–123  ·  view source on GitHub ↗

Ex: add(dst="2001:db8:cafe:f000::/56") add(dst="2001:db8:cafe:f000::/56", gw="2001:db8:cafe::1") add(dst="2001:db8:cafe:f000::/64", gw="2001:db8:cafe::1", dev="eth0")

(self, *args, **kargs)

Source from the content-addressed store, hash-verified

113 return (prefix, plen, gw, dev, ifaddr, 1)
114
115 def add(self, *args, **kargs):
116 # type: (*Any, **Any) -> None
117 """Ex:
118 add(dst="2001:db8:cafe:f000::/56")
119 add(dst="2001:db8:cafe:f000::/56", gw="2001:db8:cafe::1")
120 add(dst="2001:db8:cafe:f000::/64", gw="2001:db8:cafe::1", dev="eth0")
121 """
122 self.invalidate_cache()
123 self.routes.append(self.make_route(*args, **kargs))
124
125 def remove_ipv6_iface(self, iface):
126 # type: (str) -> None

Callers 4

resyncMethod · 0.45
make_routeMethod · 0.45
ifchangeMethod · 0.45
ifaddMethod · 0.45

Calls 3

invalidate_cacheMethod · 0.95
make_routeMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected