Exemple #1
0
 def setUp(self):
     b = BPF(arg1, arg2, debug=0)
     fn = b.load_func("on_packet", BPF.SOCKET_FILTER)
     BPF.attach_raw_socket(fn, "eth0")
     self.stats = b.get_table("stats", Key, Leaf)
Exemple #2
0
 def setUp(self):
     b = BPF(arg1, arg2, debug=0)
     fn = b.load_func("on_packet", BPF.SOCKET_FILTER)
     BPF.attach_raw_socket(fn, "eth0")
     self.stats = b.get_table("stats", Key, Leaf)