katnip.monitors.network module¶
Network monitor
-
class
katnip.monitors.network.
NetworkMonitor
(interface, dir_path, name, logger=None)¶ Bases:
kitty.monitors.base.BaseMonitor
NetworkMonitor is a monitor for network activity on a specific interface. It runs on a separate thread, and currently requires root permissions or CAP_NET_RAW capabilities on Linux.
-
__init__
(interface, dir_path, name, logger=None)¶ Parameters: - interface – name of interface to listen to
- dir_path – path to store captured pcaps
- name – name of the monitor
- logger – logger for the monitor instance
-
post_test
()¶ Store the pcap.
-
pre_test
(test_number)¶ Clean the packet list.
-
setup
()¶ Open the L2socket.
-
teardown
()¶ Close the L2socket.
-