aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/pcap_recorder.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo_gsm_tester/pcap_recorder.py')
-rw-r--r--src/osmo_gsm_tester/pcap_recorder.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/osmo_gsm_tester/pcap_recorder.py b/src/osmo_gsm_tester/pcap_recorder.py
index 8b1fe82..3b3c307 100644
--- a/src/osmo_gsm_tester/pcap_recorder.py
+++ b/src/osmo_gsm_tester/pcap_recorder.py
@@ -26,13 +26,13 @@ from . import log, util, config, template, process, osmo_ctrl
class PcapRecorder(log.Origin):
- def __init__(self, suite_run, run_dir, iface=None, addr=None):
+ def __init__(self, suite_run, run_dir, iface=None, filters=''):
self.suite_run = suite_run
self.run_dir = run_dir
self.iface = iface
if not self.iface:
self.iface = "any"
- self.addr = addr
+ self.filters = filters
self.set_log_category(log.C_RUN)
self.set_name('pcap-recorder_%s' % self.iface)
self.start()
@@ -44,17 +44,10 @@ class PcapRecorder(log.Origin):
('tcpdump', '-n',
'-i', self.iface,
'-w', dumpfile,
- self.gen_filter())
- )
+ self.filters))
self.suite_run.remember_to_stop(self.process)
self.process.launch()
- def gen_filter(self):
- filter = ""
- if self.addr:
- filter += 'host ' + self.addr
- return filter
-
def running(self):
return not self.process.terminated()