/external/bcc/examples/networking/vlan_learning/ |
vlan_learning.py | 7 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 14 ipdb = IPDB(nl=ipr) variable 28 def __init__(self, ipdb): 29 super(VlanSimulation, self).__init__(ipdb) 41 with self.ipdb.create(ifname="eth0a", kind="veth", peer="eth0b") as v: 43 self.ipdb.interfaces.eth0b.up().commit() 47 v = self.ipdb.interfaces["eth0b"] 63 idx = self.ipdb.interfaces["worker%da" % i]["index"] 70 client_ifc = self.ipdb.create(ifname="eth0a.%d" % i, kind="vlan" [all...] |
/external/bcc/tests/python/ |
test_brb2.py | 59 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 69 ipdb = IPDB(nl=ipr) variable 70 sim = Simulation(ipdb) 72 allocated_interfaces = set(ipdb.interfaces.keys()) 86 with ipdb.create(ifname=veth_pem_2_br, kind="veth", peer=veth_br_2_pem) as v: 88 ipdb.interfaces[veth_br_2_pem].up().commit() 93 with ipdb.create(ifname=br, kind="bridge") as br1: 94 br1.add_port(ipdb.interfaces[veth_pem_2_br]) 95 br1.add_port(ipdb.interfaces[veth_rt_2_br] [all...] |
test_brb.py | 67 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 76 ipdb = IPDB(nl=ipr) variable 77 sim = Simulation(ipdb) 216 ipdb.release()
|
/external/bcc/examples/networking/distributed_bridge/ |
main.py | 7 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 30 ipdb = IPDB(nl=ipr) variable 36 def __init__(self, ipdb): 37 super(TunnelSimulation, self).__init__(ipdb) 53 with self.ipdb.create(ifname="br-fabric", kind="bridge") as br: 81 sim = TunnelSimulation(ipdb) 89 if "br-fabric" in ipdb.interfaces: ipdb.interfaces["br-fabric"].remove().commit() 91 ipdb.release( [all...] |
tunnel_mesh.py | 12 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 30 ipdb = IPDB(nl=ipr) variable 32 ifc = ipdb.interfaces.eth0 43 with ipdb.create(ifname="gretap1", kind="gretap", gre_ikey=0, gre_okey=0, 49 with ipdb.create(ifname="vxlan0", kind="vxlan", vxlan_id=0, 64 with ipdb.create(ifname="br%d" % j, kind="bridge") as br: 67 v = ipdb.create(ifname="dummy%d%d" % (j , i), kind="dummy").up().commit() 95 br = ipdb.interfaces["br%d" % j] 96 with ipdb.create(ifname=v1, kind="veth", peer=v2) as v [all...] |
tunnel.py | 12 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 27 ipdb = IPDB(nl=ipr) variable 29 ifc = ipdb.interfaces.eth0 36 ipdb.routes.add({"dst": "224.0.0.0/4", "oif": ifc.index}).commit() 37 with ipdb.create(ifname="vxlan0", kind="vxlan", vxlan_id=0, 53 with ipdb.create(ifname="br%d" % i, kind="bridge") as br: 54 v = ipdb.create(ifname="dummy%d" % i, kind="dummy").up().commit() 72 ipdb.release()
|
/external/bcc/examples/networking/neighbor_sharing/ |
tc_neighbor_sharing.py | 6 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 13 ipdb = IPDB(nl=ipr) variable 26 def __init__(self, ipdb): 27 super(SharedNetSimulation, self).__init__(ipdb) 58 with ipdb.create(ifname="br100", kind="bridge") as br100: 67 sim = SharedNetSimulation(ipdb) 76 if "br100" in ipdb.interfaces: ipdb.interfaces.br100.remove().commit() 77 ipdb.release( [all...] |
/external/bcc/examples/networking/ |
simulation.py | 4 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 12 def __init__(self, ipdb): 13 self.ipdb = ipdb 36 ns_ipdb = IPDB(nl) 55 out_ifc = self.ipdb.create(ifname="%sa" % ifc_base_name, kind="veth", 57 in_ifc = self.ipdb.interfaces[out_ifc.peer] 64 if out_ifname in self.ipdb.interfaces: self.ipdb.interfaces[out_ifname].remove().commit() 81 self.ipdb.nl.tc("add", "ingress", out_ifc["index"], "ffff:" [all...] |
/external/bcc/examples/networking/tunnel_monitor/ |
main.py | 9 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 17 ipdb = IPDB(nl=ipr) variable 24 def __init__(self, ipdb): 25 super(TunnelSimulation, self).__init__(ipdb) 36 with self.ipdb.create(ifname="br100", kind="bridge") as br100: 79 sim = TunnelSimulation(ipdb) 84 if "br100" in ipdb.interfaces: ipdb.interfaces.br100.remove().commit() 86 ipdb.release( [all...] |
monitor.py | 10 from pyroute2 import IPRoute, NetNS, IPDB, NSPopen 15 ipdb = IPDB(nl=ipr) variable 28 ifc = ipdb.interfaces.eth0 79 ipdb.release()
|
/external/bcc/examples/networking/xdp/ |
xdp_drop_count.py | 139 ipdb = pyroute2.IPDB(nl=ip) variable 140 idx = ipdb.interfaces[device].index 166 ipdb.release()
|