This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17673 )
Change subject: trx_toolkit/trx_sniff.py: pass the whole msg to burst_pass_filter()
......................................................................
trx_toolkit/trx_sniff.py: pass the whole msg to burst_pass_filter()
Change-Id: I3da62249a4d62078b79ce5e79c86923e59c1e457
---
M src/target/trx_toolkit/trx_sniff.py
1 file changed, 13 insertions(+), 12 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/target/trx_toolkit/trx_sniff.py b/src/target/trx_toolkit/trx_sniff.py
index 6671c35..5667df2 100755
--- a/src/target/trx_toolkit/trx_sniff.py
+++ b/src/target/trx_toolkit/trx_sniff.py
@@ -4,7 +4,7 @@
# TRX Toolkit
# Scapy-based TRX interface sniffer
#
-# (C) 2018-2019 by Vadim Yanitskiy <axilirator at gmail.com>
+# (C) 2018-2020 by Vadim Yanitskiy <axilirator at gmail.com>
#
# All Rights Reserved
#
@@ -22,7 +22,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-APP_CR_HOLDERS = [("2018-2019", "Vadim Yanitskiy <axilirator at gmail.com>")]
+APP_CR_HOLDERS = [("2018-2020", "Vadim Yanitskiy <axilirator at gmail.com>")]
import logging as log
import argparse
@@ -119,8 +119,7 @@
return
# Poke burst pass filter
- rc = self.burst_pass_filter(l12trx, msg.fn, msg.tn)
- if rc is False:
+ if not self.burst_pass_filter(msg):
self.cnt_burst_dropped_num += 1
return
@@ -136,25 +135,27 @@
if rc is True:
self.shutdown()
- def burst_pass_filter(self, l12trx, fn, tn):
+ def burst_pass_filter(self, msg):
# Direction filter
if self.argv.direction is not None:
- if self.argv.direction == "TRX" and not l12trx:
- return False
- elif self.argv.direction == "L1" and l12trx:
- return False
+ if self.argv.direction == "TRX": # L1 -> TRX
+ if not isinstance(msg, DATAMSG_L12TRX):
+ return False
+ elif self.argv.direction == "L1": # TRX -> L1
+ if not isinstance(msg, DATAMSG_TRX2L1):
+ return False
# Timeslot filter
if self.argv.pf_tn is not None:
- if tn != self.argv.pf_tn:
+ if msg.tn != self.argv.pf_tn:
return False
# Frame number filter
if self.argv.pf_fn_lt is not None:
- if fn > self.argv.pf_fn_lt:
+ if msg.fn > self.argv.pf_fn_lt:
return False
if self.argv.pf_fn_gt is not None:
- if fn < self.argv.pf_fn_gt:
+ if msg.fn < self.argv.pf_fn_gt:
return False
# Burst passed ;)
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17673
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3da62249a4d62078b79ce5e79c86923e59c1e457
Gerrit-Change-Number: 17673
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200330/806f3fe1/attachment.htm>