[PATCH] libosmocore[master]: gsm_04_08.h: add struct with R99 names for SI3 Ctrl Chan Descr

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Feb 21 14:03:47 UTC 2017


Review at  https://gerrit.osmocom.org/1859

gsm_04_08.h: add struct with R99 names for SI3 Ctrl Chan Descr

Rename current gsm48_control_channel_descr to &_r98, add &_r99 with adjusted
naming and add a #define to direct to &_r99; this is like found further below
in this file for gsm48_hdr_msg_type().

Assuming that no-one is using the spare bits, redirecting to R99 like this
will not cause any code conflicts.

In the r99 struct, spare1 and spare2 are in different places, so rather rename
them to spare_1 and spare_2 to make sure we get a compiler barf *if* anyone
tries to use them with the wrong _r9x struct.

Motivation: the R99 Control Channel Description defines MSCR to indicate
whether the MSC is R99+ or not. To use UMTS AKA on GSM networks, we want to
indicate that our libmsc is capable of R99, like OsmoSGSN already does.

Change-Id: If87e07b5d04e1617155383e14c98d2125fdd0608
---
M include/osmocom/gsm/protocol/gsm_04_08.h
1 file changed, 16 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/1859/1

diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index bbc2774..fb38c03 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -619,7 +619,7 @@
 } __attribute__ ((packed));
 
 /* Section 10.5.2.11 Control Channel Description , Figure 10.5.33 */
-struct gsm48_control_channel_descr {
+struct gsm48_control_channel_descr_r98 {
 	uint8_t ccch_conf :3,
 		bs_ag_blks_res :3,
 		att :1,
@@ -629,6 +629,21 @@
 	uint8_t t3212;
 } __attribute__ ((packed));
 
+/* 3GPP TS 44.018 Section 10.5.2.11 Control Channel Description */
+struct gsm48_control_channel_descr_r99 {
+	uint8_t ccch_conf :3,
+		bs_ag_blks_res :3,
+		att :1,
+		mscr :1;
+	uint8_t bs_pa_mfrms : 3,
+		spare_1 :2,
+		cbq3 :2,
+		spare_2 :1;
+	uint8_t t3212;
+} __attribute__ ((packed));
+
+#define gsm48_control_channel_descr gsm48_control_channel_descr_r99
+
 enum gsm48_dtx_mode {
 	GSM48_DTX_MAY_BE_USED,
 	GSM48_DTX_SHALL_BE_USED,

-- 
To view, visit https://gerrit.osmocom.org/1859
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If87e07b5d04e1617155383e14c98d2125fdd0608
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list