Skip to content

Commit 72e43f0

Browse files
committed
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
1 parent ada0042 commit 72e43f0

File tree

4 files changed

+123
-2
lines changed

4 files changed

+123
-2
lines changed

include/osmocom/gsm/gsm48.h

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extern const struct tlv_definition gsm48_rr_att_tlvdef;
2020
extern const struct tlv_definition gsm48_mm_att_tlvdef;
2121
const char *gsm48_cc_state_name(uint8_t state);
2222
const char *gsm48_cc_msg_name(uint8_t msgtype);
23+
const char *gsm48_rr_msg_name(uint8_t msgtype);
2324
const char *rr_cause_name(uint8_t cause);
2425

2526
int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc,

include/osmocom/gsm/protocol/gsm_04_08.h

+13-2
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,10 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
10211021
#define GSM48_MT_RR_IMM_ASS 0x3f
10221022
#define GSM48_MT_RR_IMM_ASS_EXT 0x39
10231023
#define GSM48_MT_RR_IMM_ASS_REJ 0x3a
1024+
#define GSM48_MT_RR_DTM_ASS_FAIL 0x48
1025+
#define GSM48_MT_RR_DTM_REJECT 0x49
1026+
#define GSM48_MT_RR_DTM_REQUEST 0x4A
1027+
#define GSM48_MT_RR_PACKET_ASS 0x4B
10241028

10251029
#define GSM48_MT_RR_CIPH_M_CMD 0x35
10261030
#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,
10361040
#define GSM48_MT_RR_HANDO_COMPL 0x2c
10371041
#define GSM48_MT_RR_HANDO_FAIL 0x28
10381042
#define GSM48_MT_RR_HANDO_INFO 0x2d
1043+
#define GSM48_MT_RR_HANDO_INFO 0x2d
1044+
#define GSM48_MT_RR_DTM_ASS_CMD 0x4c
10391045

10401046
#define GSM48_MT_RR_CELL_CHG_ORDER 0x08
10411047
#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,
10491055
#define GSM48_MT_RR_PAG_REQ_3 0x24
10501056
#define GSM48_MT_RR_PAG_RESP 0x27
10511057
#define GSM48_MT_RR_NOTIF_NCH 0x20
1052-
#define GSM48_MT_RR_NOTIF_FACCH 0x25
1058+
#define GSM48_MT_RR_NOTIF_FACCH 0x25 /* (Reserved) */
10531059
#define GSM48_MT_RR_NOTIF_RESP 0x26
1054-
1060+
#define GSM48_MT_RR_PACKET_NOTIF 0x4e
10551061
#define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60
10561062
#define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62
10571063
#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,
10771083
#define GSM48_MT_RR_SYSINFO_16 0x3d
10781084
#define GSM48_MT_RR_SYSINFO_17 0x3e
10791085

1086+
#define GSM48_MT_RR_SYSINFO_18 0x40
1087+
#define GSM48_MT_RR_SYSINFO_19 0x41
1088+
#define GSM48_MT_RR_SYSINFO_20 0x42
1089+
10801090
#define GSM48_MT_RR_CHAN_MODE_MODIF 0x10
10811091
#define GSM48_MT_RR_STATUS 0x12
10821092
#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,
10871097
#define GSM48_MT_RR_EXT_MEAS_REP 0x36
10881098
#define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37
10891099
#define GSM48_MT_RR_GPRS_SUSP_REQ 0x34
1100+
#define GSM48_MT_RR_DTM_INFO 0x4d
10901101

10911102
#define GSM48_MT_RR_VGCS_UPL_GRANT 0x09
10921103
#define GSM48_MT_RR_UPLINK_RELEASE 0x0e

src/gsm/gsm48.c

+108
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,114 @@ const char *gsm48_cc_msg_name(uint8_t msgtype)
255255
return get_value_string(cc_msg_names, msgtype);
256256
}
257257

258+
259+
static const struct value_string rr_msg_names[] = {
260+
/* Channel establishment messages */
261+
{ GSM48_MT_RR_INIT_REQ, "RR INITIALISATION REQUEST" },
262+
{ GSM48_MT_RR_ADD_ASS, "ADDITIONAL ASSIGNMENT" },
263+
{ GSM48_MT_RR_IMM_ASS, "IMMEDIATE ASSIGNMENT" },
264+
{ GSM48_MT_RR_IMM_ASS_EXT, "MMEDIATE ASSIGNMENT EXTENDED" },
265+
{ GSM48_MT_RR_IMM_ASS_REJ, "IMMEDIATE ASSIGNMENT REJECT" },
266+
{ GSM48_MT_RR_DTM_ASS_FAIL, "DTM ASSIGNMENT FAILURE" },
267+
{ GSM48_MT_RR_DTM_REJECT, "DTM REJECT" },
268+
{ GSM48_MT_RR_DTM_REQUEST, "DTM REQUEST" },
269+
{ GSM48_MT_RR_PACKET_ASS, "PACKET ASSIGNMENT" },
270+
271+
/* Ciphering messages */
272+
{ GSM48_MT_RR_CIPH_M_CMD, "CIPHERING MODE COMMAND" },
273+
{ GSM48_MT_RR_CIPH_M_COMPL, "CIPHERING MODE COMPLETE" },
274+
275+
/* Configuration change messages */
276+
{ GSM48_MT_RR_CFG_CHG_CMD, "CONFIGURATION CHANGE COMMAND" },
277+
{ GSM48_MT_RR_CFG_CHG_ACK, "CONFIGURATION CHANGE ACK" },
278+
{ GSM48_MT_RR_CFG_CHG_REJ, "CONFIGURATION CHANGE REJECT" },
279+
280+
/* Handover messages */
281+
{ GSM48_MT_RR_ASS_CMD, "ASSIGNMENT COMMAND" },
282+
{ GSM48_MT_RR_ASS_COMPL, "ASSIGNMENT COMPLETE" },
283+
{ GSM48_MT_RR_ASS_FAIL, "ASSIGNMENT FAILURE" },
284+
{ GSM48_MT_RR_HANDO_CMD, "HANDOVER COMMAND" },
285+
{ GSM48_MT_RR_HANDO_COMPL, "HANDOVER COMPLETE" },
286+
{ GSM48_MT_RR_HANDO_FAIL, "HANDOVER FAILURE" },
287+
{ GSM48_MT_RR_HANDO_INFO, "PHYSICAL INFORMATION" },
288+
{ GSM48_MT_RR_DTM_ASS_CMD, "DTM ASSIGNMENT COMMAND" },
289+
290+
{ GSM48_MT_RR_CELL_CHG_ORDER, "RR-CELL CHANGE ORDER" },
291+
{ GSM48_MT_RR_PDCH_ASS_CMD, "PDCH ASSIGNMENT COMMAND" },
292+
293+
/* Channel release messages */
294+
{ GSM48_MT_RR_CHAN_REL, "CHANNEL RELEASE" },
295+
{ GSM48_MT_RR_PART_REL, "PARTIAL RELEASE" },
296+
{ GSM48_MT_RR_PART_REL_COMP, "PARTIAL RELEASE COMPLETE" },
297+
298+
/* Paging and Notification messages */
299+
{ GSM48_MT_RR_PAG_REQ_1, "PAGING REQUEST TYPE 1" },
300+
{ GSM48_MT_RR_PAG_REQ_2, "PAGING REQUEST TYPE 2" },
301+
{ GSM48_MT_RR_PAG_REQ_3, "PAGING REQUEST TYPE 3" },
302+
{ GSM48_MT_RR_PAG_RESP, "PAGING RESPONSE" },
303+
{ GSM48_MT_RR_NOTIF_NCH, "NOTIFICATION/NCH" },
304+
{ GSM48_MT_RR_NOTIF_FACCH, "(Reserved)" },
305+
{ GSM48_MT_RR_NOTIF_RESP, "NOTIFICATION/RESPONSE" },
306+
{ GSM48_MT_RR_PACKET_NOTIF, "PACKET NOTIFICATION" },
307+
/* 3G Specific messages */
308+
{ GSM48_MT_RR_UTRAN_CLSM_CHG, "UTRAN Classmark Change" },
309+
{ GSM48_MT_RR_CDMA2K_CLSM_CHG, "cdma 2000 Classmark Change" },
310+
{ GSM48_MT_RR_IS_TO_UTRAN_HANDO, "Inter System to UTRAN Handover Command" },
311+
{ GSM48_MT_RR_IS_TO_CDMA2K_HANDO, "Inter System to cdma2000 Handover Command" },
312+
313+
/* System information messages */
314+
{ GSM48_MT_RR_SYSINFO_8, "SYSTEM INFORMATION TYPE 8" },
315+
{ GSM48_MT_RR_SYSINFO_1, "SYSTEM INFORMATION TYPE 1" },
316+
{ GSM48_MT_RR_SYSINFO_2, "SYSTEM INFORMATION TYPE 2" },
317+
{ GSM48_MT_RR_SYSINFO_3, "SYSTEM INFORMATION TYPE 3" },
318+
{ GSM48_MT_RR_SYSINFO_4, "SYSTEM INFORMATION TYPE 4" },
319+
{ GSM48_MT_RR_SYSINFO_5, "SYSTEM INFORMATION TYPE 5" },
320+
{ GSM48_MT_RR_SYSINFO_6, "SYSTEM INFORMATION TYPE 6" },
321+
{ GSM48_MT_RR_SYSINFO_7, "SYSTEM INFORMATION TYPE 7" },
322+
{ GSM48_MT_RR_SYSINFO_2bis, "SYSTEM INFORMATION TYPE 2bis" },
323+
{ GSM48_MT_RR_SYSINFO_2ter, "SYSTEM INFORMATION TYPE 2ter" },
324+
{ GSM48_MT_RR_SYSINFO_2quater, "SYSTEM INFORMATION TYPE 2quater" },
325+
{ GSM48_MT_RR_SYSINFO_5bis, "SYSTEM INFORMATION TYPE 5bis" },
326+
{ GSM48_MT_RR_SYSINFO_5ter, "SYSTEM INFORMATION TYPE 5ter" },
327+
{ GSM48_MT_RR_SYSINFO_9, "SYSTEM INFORMATION TYPE 9" },
328+
{ GSM48_MT_RR_SYSINFO_13, "SYSTEM INFORMATION TYPE 13" },
329+
{ GSM48_MT_RR_SYSINFO_16, "SYSTEM INFORMATION TYPE 16" },
330+
{ GSM48_MT_RR_SYSINFO_17, "SYSTEM INFORMATION TYPE 17" },
331+
{ GSM48_MT_RR_SYSINFO_18, "SYSTEM INFORMATION TYPE 18" },
332+
{ GSM48_MT_RR_SYSINFO_19, "SYSTEM INFORMATION TYPE 19" },
333+
{ GSM48_MT_RR_SYSINFO_20, "SYSTEM INFORMATION TYPE 20" },
334+
335+
/* Miscellaneous messages */
336+
{ GSM48_MT_RR_CHAN_MODE_MODIF, "CHANNEL MODE MODIFY" },
337+
{ GSM48_MT_RR_STATUS, "RR STATUS" },
338+
{ GSM48_MT_RR_CHAN_MODE_MODIF_ACK, "CHANNEL MODE MODIFY ACKNOWLEDGE" },
339+
{ GSM48_MT_RR_FREQ_REDEF, "FREQUENCY REDEFINITION" },
340+
{ GSM48_MT_RR_MEAS_REP, "MEASUREMENT REPORT" },
341+
{ GSM48_MT_RR_CLSM_CHG, "CLASSMARK CHANGE" },
342+
{ GSM48_MT_RR_CLSM_ENQ, "CLASSMARK ENQUIRY" },
343+
{ GSM48_MT_RR_EXT_MEAS_REP, "EXTENDED MEASUREMENT REPORT" },
344+
{ GSM48_MT_RR_EXT_MEAS_REP_ORD, "EXTENDED MEASUREMENT ORDER" },
345+
{ GSM48_MT_RR_GPRS_SUSP_REQ, "GPRS SUSPENSION REQUEST" },
346+
{ GSM48_MT_RR_DTM_INFO, "DTM INFORMATION" },
347+
348+
/* VGCS uplink control messages */
349+
{ GSM48_MT_RR_VGCS_UPL_GRANT, "VGCS UPLINK GRANT" },
350+
{ GSM48_MT_RR_UPLINK_RELEASE, "UPLINK RELEASE" },
351+
{ GSM48_MT_RR_UPLINK_FREE, "0c" },
352+
{ GSM48_MT_RR_UPLINK_BUSY, "UPLINK BUSY" },
353+
{ GSM48_MT_RR_TALKER_IND, "TALKER INDICATION" },
354+
355+
/* Application messages */
356+
{ GSM48_MT_RR_APP_INFO, "Application Information" },
357+
{ 0, NULL }
358+
};
359+
360+
const char *gsm48_rr_msg_name(uint8_t msgtype)
361+
{
362+
return get_value_string(rr_msg_names, msgtype);
363+
}
364+
365+
258366
const struct value_string gsm48_chan_mode_names[] = {
259367
{ GSM48_CMODE_SIGN, "SIGNALLING" },
260368
{ GSM48_CMODE_SPEECH_V1, "SPEECH_V1" },

src/gsm/libosmogsm.map

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ gsm411_rp_cause_strs;
151151

152152
gsm48_att_tlvdef;
153153
gsm48_cc_msg_name;
154+
gsm48_rr_msg_name;
154155
gsm48_cc_state_name;
155156
gsm48_construct_ra;
156157
gsm48_hdr_gmm_cipherable;

0 commit comments

Comments
 (0)