Change in osmo-ttcn3-hacks[master]: pcu: Implement check for expected (M)CS in received data block

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/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Nov 3 20:12:59 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21034 )


Change subject: pcu: Implement check for expected (M)CS in received data block
......................................................................

pcu: Implement check for expected (M)CS in received data block

Change-Id: Ibdc63f6b695c08e4ddf5894c22767d07acf21311
---
M pcu/GPRS_Components.ttcn
1 file changed, 8 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/21034/1

diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index f9697a1..234d910 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -902,7 +902,10 @@
 		f_shutdown(__BFILE__, __LINE__);
 	}
 
-	/* TODO: check exp_cs */
+	if (not match(data_block.cs, exp_cs)) {
+		setverdict(fail, "Failed to match ", data_block.cs, " vs exp ", exp_cs);
+		f_shutdown(__BFILE__, __LINE__);
+	}
 }
 
 /* This function does what could probably be done with templates */
@@ -934,8 +937,10 @@
 		f_shutdown(__BFILE__, __LINE__);
 	}
 
-	/* TODO: Check exp_cs. In the case of EGPRS, first check mac_hdr.header_type and then decode CPS = exp_cs based on mac_hdr.header_type.
-		See wireshark's egprs_Header_type1_coding_puncturing_scheme_to_mcs. */
+	if (not match(data_block.mcs, exp_cs)) {
+		setverdict(fail, "Failed to match ", data_block.mcs, " vs exp ", exp_cs);
+		f_shutdown(__BFILE__, __LINE__);
+	}
 }
 
 /* High level (task specific) helper for receiving and matching GPRS/EGPRS data blocks */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21034
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibdc63f6b695c08e4ddf5894c22767d07acf21311
Gerrit-Change-Number: 21034
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201103/a66188cd/attachment.htm>


More information about the gerrit-log mailing list