@@ -22,7 +22,7 @@ class NetsniffRecorder:
22
22
interface: Network interface to capture traffic on.
23
23
interface_index (int): Index of the network interface if not specified by interface.
24
24
silent (bool): Whether to run netsniff-ng in silent mode (no stdout) (default: True).
25
- filter (str): Optional filter to apply to the capture. (default: None)
25
+ capture_filter (str): Optional filter to apply to the capture. (default: None)
26
26
"""
27
27
28
28
def __init__ (
@@ -33,7 +33,7 @@ def __init__(
33
33
interface = None ,
34
34
interface_index : int = 0 ,
35
35
silent : bool = True ,
36
- filter : str | None = None ,
36
+ capture_filter : str | None = None ,
37
37
):
38
38
self .host = host
39
39
self .test_name = test_name
@@ -45,7 +45,7 @@ def __init__(
45
45
self .interface = self .host .network_interfaces [interface_index ].name
46
46
self .netsniff_process = None
47
47
self .silent = silent
48
- self .filter = filter
48
+ self .capture_filter = capture_filter
49
49
50
50
def start (self , startup_wait = STARTUP_WAIT ):
51
51
"""
@@ -61,7 +61,7 @@ def start(self, startup_wait=STARTUP_WAIT):
61
61
str (self .interface ),
62
62
"--out" ,
63
63
self .pcap_file ,
64
- f"-f \" { self .filter } \" " if self .filter else "" ,
64
+ f"-f \" { self .capture_filter } \" " if self .capture_filter else "" ,
65
65
]
66
66
logger .info (f"Running command: { ' ' .join (cmd )} " )
67
67
self .netsniff_process = connection .start_process (
0 commit comments