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

Change-Id: Ibdc63f6b695c08e4ddf5894c22767d07acf21311
This commit is contained in:
Pau Espin 2020-11-03 17:36:30 +01:00
parent 5abfded61e
commit e5e64c1246
1 changed files with 8 additions and 3 deletions

View File

@ -902,7 +902,10 @@ runs on MS_BTS_IFACE_CT {
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 @@ runs on MS_BTS_IFACE_CT {
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 */