[PATCH] libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types

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

dexter gerrit-no-reply at lists.osmocom.org
Thu Oct 13 09:27:53 UTC 2016


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

gsm0408: Completing GSM 04.08 RR message types

- Add missing message types to be up to date with the
  latest specification release (3GPP TS 04.18)

- Add value strings to translate RR message type identifiers
  into human readable strings. (see gsm48_rr_msg_name() in
  gsm48.h

Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6
---
M include/osmocom/gsm/gsm48.h
M include/osmocom/gsm/protocol/gsm_04_08.h
M src/gsm/gsm48.c
3 files changed, 124 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/1056/1

diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h
index d6e58c2..6a52c2d 100644
--- a/include/osmocom/gsm/gsm48.h
+++ b/include/osmocom/gsm/gsm48.h
@@ -20,6 +20,7 @@
 extern const struct tlv_definition gsm48_mm_att_tlvdef;
 const char *gsm48_cc_state_name(uint8_t state);
 const char *gsm48_cc_msg_name(uint8_t msgtype);
+const char *gsm48_rr_msg_name(uint8_t msgtype);
 const char *rr_cause_name(uint8_t cause);
 
 int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc,
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index fa2bb06..767aa3d 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1021,6 +1021,10 @@
 #define GSM48_MT_RR_IMM_ASS		0x3f
 #define GSM48_MT_RR_IMM_ASS_EXT		0x39
 #define GSM48_MT_RR_IMM_ASS_REJ		0x3a
+#define GSM48_MT_RR_DTM_ASS_FAIL	0x48
+#define GSM48_MT_RR_DTM_REJECT		0x49
+#define GSM48_MT_RR_DTM_REQUEST		0x4A
+#define GSM48_MT_RR_PACKET_ASS		0x4B
 
 #define GSM48_MT_RR_CIPH_M_CMD		0x35
 #define GSM48_MT_RR_CIPH_M_COMPL	0x32
@@ -1036,6 +1040,8 @@
 #define GSM48_MT_RR_HANDO_COMPL		0x2c
 #define GSM48_MT_RR_HANDO_FAIL		0x28
 #define GSM48_MT_RR_HANDO_INFO		0x2d
+#define GSM48_MT_RR_HANDO_INFO		0x2d
+#define GSM48_MT_RR_DTM_ASS_CMD		0x4c
 
 #define GSM48_MT_RR_CELL_CHG_ORDER	0x08
 #define GSM48_MT_RR_PDCH_ASS_CMD	0x23
@@ -1049,9 +1055,9 @@
 #define GSM48_MT_RR_PAG_REQ_3		0x24
 #define GSM48_MT_RR_PAG_RESP		0x27
 #define GSM48_MT_RR_NOTIF_NCH		0x20
-#define GSM48_MT_RR_NOTIF_FACCH		0x25
+#define GSM48_MT_RR_NOTIF_FACCH		0x25 /* (Reserved) */
 #define GSM48_MT_RR_NOTIF_RESP		0x26
-
+#define GSM48_MT_RR_PACKET_NOTIF	0x4e
 #define GSM48_MT_RR_UTRAN_CLSM_CHG	0x60
 #define GSM48_MT_RR_CDMA2K_CLSM_CHG	0x62
 #define GSM48_MT_RR_IS_TO_UTRAN_HANDO	0x63
@@ -1077,6 +1083,10 @@
 #define GSM48_MT_RR_SYSINFO_16		0x3d
 #define GSM48_MT_RR_SYSINFO_17		0x3e
 
+#define GSM48_MT_RR_SYSINFO_18		0x40
+#define GSM48_MT_RR_SYSINFO_19		0x41
+#define GSM48_MT_RR_SYSINFO_20		0x42
+
 #define GSM48_MT_RR_CHAN_MODE_MODIF	0x10
 #define GSM48_MT_RR_STATUS		0x12
 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK	0x17
@@ -1087,6 +1097,7 @@
 #define GSM48_MT_RR_EXT_MEAS_REP	0x36
 #define GSM48_MT_RR_EXT_MEAS_REP_ORD	0x37
 #define GSM48_MT_RR_GPRS_SUSP_REQ	0x34
+#define GSM48_MT_RR_DTM_INFO		0x4d
 
 #define GSM48_MT_RR_VGCS_UPL_GRANT	0x09
 #define GSM48_MT_RR_UPLINK_RELEASE	0x0e
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index b4740cf..aab3091 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -162,6 +162,11 @@
 	{ 0,					NULL },
 };
 
+const char *rr_cause_name(uint8_t cause)
+{
+	return get_value_string(rr_cause_names, cause);
+}
+
 /* FIXME: convert to value_string */
 static const char *cc_state_names[32] = {
 	"NULL",
@@ -250,11 +255,114 @@
 	return get_value_string(cc_msg_names, msgtype);
 }
 
-const char *rr_cause_name(uint8_t cause)
+
+static const struct value_string rr_msg_names[] = {
+	/* Channel establishment messages */
+	{ GSM48_MT_RR_INIT_REQ,			"RR INITIALISATION REQUEST" },
+	{ GSM48_MT_RR_ADD_ASS,			"ADDITIONAL ASSIGNMENT" },
+	{ GSM48_MT_RR_IMM_ASS,			"IMMEDIATE ASSIGNMENT" },
+	{ GSM48_MT_RR_IMM_ASS_EXT,		"MMEDIATE ASSIGNMENT EXTENDED" },
+	{ GSM48_MT_RR_IMM_ASS_REJ,		"IMMEDIATE ASSIGNMENT REJECT" },
+	{ GSM48_MT_RR_DTM_ASS_FAIL,		"DTM ASSIGNMENT FAILURE" },
+	{ GSM48_MT_RR_DTM_REJECT,		"DTM REJECT" },
+	{ GSM48_MT_RR_DTM_REQUEST,		"DTM REQUEST" },
+	{ GSM48_MT_RR_PACKET_ASS,		"PACKET ASSIGNMENT" },
+
+	/* Ciphering messages */
+	{ GSM48_MT_RR_CIPH_M_CMD,		"CIPHERING MODE COMMAND" },
+	{ GSM48_MT_RR_CIPH_M_COMPL,		"CIPHERING MODE COMPLETE" },
+
+	/* Configuration change messages */
+	{ GSM48_MT_RR_CFG_CHG_CMD,		"CONFIGURATION CHANGE COMMAND" },
+	{ GSM48_MT_RR_CFG_CHG_ACK,		"CONFIGURATION CHANGE ACK" },
+	{ GSM48_MT_RR_CFG_CHG_REJ,		"CONFIGURATION CHANGE REJECT" },
+
+	/* Handover messages */
+	{ GSM48_MT_RR_ASS_CMD,			"ASSIGNMENT COMMAND" },
+	{ GSM48_MT_RR_ASS_COMPL,		"ASSIGNMENT COMPLETE" },
+	{ GSM48_MT_RR_ASS_FAIL,			"ASSIGNMENT FAILURE" },
+	{ GSM48_MT_RR_HANDO_CMD,		"HANDOVER COMMAND" },
+	{ GSM48_MT_RR_HANDO_COMPL,		"HANDOVER COMPLETE" },
+	{ GSM48_MT_RR_HANDO_FAIL,		"HANDOVER FAILURE" },
+	{ GSM48_MT_RR_HANDO_INFO,		"PHYSICAL INFORMATION" },
+	{ GSM48_MT_RR_DTM_ASS_CMD,		"DTM ASSIGNMENT COMMAND" },
+
+	{ GSM48_MT_RR_CELL_CHG_ORDER,		"RR-CELL CHANGE ORDER" },
+	{ GSM48_MT_RR_PDCH_ASS_CMD,		"PDCH ASSIGNMENT COMMAND" },
+
+	/* Channel release messages */
+	{ GSM48_MT_RR_CHAN_REL,			"CHANNEL RELEASE" },
+	{ GSM48_MT_RR_PART_REL,			"PARTIAL RELEASE" },
+	{ GSM48_MT_RR_PART_REL_COMP,		"PARTIAL RELEASE COMPLETE" },
+
+	/* Paging and Notification messages */
+	{ GSM48_MT_RR_PAG_REQ_1,		"PAGING REQUEST TYPE 1" },
+	{ GSM48_MT_RR_PAG_REQ_2,		"PAGING REQUEST TYPE 2" },
+	{ GSM48_MT_RR_PAG_REQ_3,		"PAGING REQUEST TYPE 3" },
+	{ GSM48_MT_RR_PAG_RESP,			"PAGING RESPONSE" },
+	{ GSM48_MT_RR_NOTIF_NCH,		"NOTIFICATION/NCH" },
+	{ GSM48_MT_RR_NOTIF_FACCH,		"(Reserved)" },
+	{ GSM48_MT_RR_NOTIF_RESP,		"NOTIFICATION/RESPONSE" },
+	{ GSM48_MT_RR_PACKET_NOTIF,		"PACKET NOTIFICATION" },
+	/* 3G Specific messages */
+	{ GSM48_MT_RR_UTRAN_CLSM_CHG,		"UTRAN Classmark Change" },
+	{ GSM48_MT_RR_CDMA2K_CLSM_CHG,		"cdma 2000 Classmark Change" },
+	{ GSM48_MT_RR_IS_TO_UTRAN_HANDO,	"Inter System to UTRAN Handover Command" },
+	{ GSM48_MT_RR_IS_TO_CDMA2K_HANDO,	"Inter System to cdma2000 Handover Command" },
+
+	/* System information messages */
+	{ GSM48_MT_RR_SYSINFO_8,		"SYSTEM INFORMATION TYPE 8" },
+	{ GSM48_MT_RR_SYSINFO_1,		"SYSTEM INFORMATION TYPE 1" },
+	{ GSM48_MT_RR_SYSINFO_2,		"SYSTEM INFORMATION TYPE 2" },
+	{ GSM48_MT_RR_SYSINFO_3,		"SYSTEM INFORMATION TYPE 3" },
+	{ GSM48_MT_RR_SYSINFO_4,		"SYSTEM INFORMATION TYPE 4" },
+	{ GSM48_MT_RR_SYSINFO_5,		"SYSTEM INFORMATION TYPE 5" },
+	{ GSM48_MT_RR_SYSINFO_6,		"SYSTEM INFORMATION TYPE 6" },
+	{ GSM48_MT_RR_SYSINFO_7,		"SYSTEM INFORMATION TYPE 7" },
+	{ GSM48_MT_RR_SYSINFO_2bis,		"SYSTEM INFORMATION TYPE 2bis" },
+	{ GSM48_MT_RR_SYSINFO_2ter,		"SYSTEM INFORMATION TYPE 2ter" },
+	{ GSM48_MT_RR_SYSINFO_2quater,		"SYSTEM INFORMATION TYPE 2quater" },
+	{ GSM48_MT_RR_SYSINFO_5bis,		"SYSTEM INFORMATION TYPE 5bis" },
+	{ GSM48_MT_RR_SYSINFO_5ter,		"SYSTEM INFORMATION TYPE 5ter" },
+	{ GSM48_MT_RR_SYSINFO_9,		"SYSTEM INFORMATION TYPE 9" },
+	{ GSM48_MT_RR_SYSINFO_13,		"SYSTEM INFORMATION TYPE 13" },
+	{ GSM48_MT_RR_SYSINFO_16,		"SYSTEM INFORMATION TYPE 16" },
+	{ GSM48_MT_RR_SYSINFO_17,		"SYSTEM INFORMATION TYPE 17" },
+	{ GSM48_MT_RR_SYSINFO_18,		"SYSTEM INFORMATION TYPE 18" },
+	{ GSM48_MT_RR_SYSINFO_19,		"SYSTEM INFORMATION TYPE 19" },
+	{ GSM48_MT_RR_SYSINFO_20,		"SYSTEM INFORMATION TYPE 20" },
+
+	/* Miscellaneous messages */
+	{ GSM48_MT_RR_CHAN_MODE_MODIF,		"CHANNEL MODE MODIFY" },
+	{ GSM48_MT_RR_STATUS,			"RR STATUS" },
+	{ GSM48_MT_RR_CHAN_MODE_MODIF_ACK,	"CHANNEL MODE MODIFY ACKNOWLEDGE" },
+	{ GSM48_MT_RR_FREQ_REDEF,		"FREQUENCY REDEFINITION" },
+	{ GSM48_MT_RR_MEAS_REP,			"MEASUREMENT REPORT" },
+	{ GSM48_MT_RR_CLSM_CHG,			"CLASSMARK CHANGE" },
+	{ GSM48_MT_RR_CLSM_ENQ,			"CLASSMARK ENQUIRY" },
+	{ GSM48_MT_RR_EXT_MEAS_REP,		"EXTENDED MEASUREMENT REPORT" },
+	{ GSM48_MT_RR_EXT_MEAS_REP_ORD,		"EXTENDED MEASUREMENT ORDER" },
+	{ GSM48_MT_RR_GPRS_SUSP_REQ,		"GPRS SUSPENSION REQUEST" },
+	{ GSM48_MT_RR_DTM_INFO,			"DTM INFORMATION" },
+
+	/* VGCS uplink control messages */
+	{ GSM48_MT_RR_VGCS_UPL_GRANT,		"VGCS UPLINK GRANT" },
+	{ GSM48_MT_RR_UPLINK_RELEASE,		"UPLINK RELEASE" },
+	{ GSM48_MT_RR_UPLINK_FREE,		"0c" },
+	{ GSM48_MT_RR_UPLINK_BUSY,		"UPLINK BUSY" },
+	{ GSM48_MT_RR_TALKER_IND,		"TALKER INDICATION" },
+
+	/* Application messages */
+	{ GSM48_MT_RR_APP_INFO,			"Application Information" },
+	{ 0,				NULL }
+};
+
+const char *gsm48_rr_msg_name(uint8_t msgtype)
 {
-	return get_value_string(rr_cause_names, cause);
+	return get_value_string(rr_msg_names, msgtype);
 }
 
+
 const struct value_string gsm48_chan_mode_names[] = {
 	{ GSM48_CMODE_SIGN,		"SIGNALLING" },
 	{ GSM48_CMODE_SPEECH_V1,	"SPEECH_V1" },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list