aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp <pmaier@sysmocom.de>2016-10-27 13:35:20 +0200
committerPhilipp <pmaier@sysmocom.de>2016-10-27 13:36:42 +0200
commit72e43f02c3408ec85c259ee483ac75f01ecb6cad (patch)
tree1fea40aca46e34a6d5c83ec31f1440db8e63e1d0
parentada0042c587395ba1a8430504d761d532610ba5c (diff)
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
-rw-r--r--include/osmocom/gsm/gsm48.h1
-rw-r--r--include/osmocom/gsm/protocol/gsm_04_08.h15
-rw-r--r--src/gsm/gsm48.c108
-rw-r--r--src/gsm/libosmogsm.map1
4 files changed, 123 insertions, 2 deletions
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_rr_att_tlvdef;
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 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
#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 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
#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 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
#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 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
#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 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
#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 46f0b2f..b626f82 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -255,6 +255,114 @@ const char *gsm48_cc_msg_name(uint8_t msgtype)
return get_value_string(cc_msg_names, msgtype);
}
+
+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_msg_names, msgtype);
+}
+
+
const struct value_string gsm48_chan_mode_names[] = {
{ GSM48_CMODE_SIGN, "SIGNALLING" },
{ GSM48_CMODE_SPEECH_V1, "SPEECH_V1" },
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index a83f92c..f0baa21 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -151,6 +151,7 @@ gsm411_rp_cause_strs;
gsm48_att_tlvdef;
gsm48_cc_msg_name;
+gsm48_rr_msg_name;
gsm48_cc_state_name;
gsm48_construct_ra;
gsm48_hdr_gmm_cipherable;