<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11412">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">SGsAP protocol definitions (header + C file)<br><br>Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109<br>---<br>M include/Makefile.am<br>A include/osmocom/gsm/protocol/gsm_29_118.h<br>M src/gsm/Makefile.am<br>A src/gsm/gsm29118.c<br>M src/gsm/libosmogsm.map<br>5 files changed, 304 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/Makefile.am b/include/Makefile.am</span><br><span>index 19695d1..59a5fed 100644</span><br><span>--- a/include/Makefile.am</span><br><span>+++ b/include/Makefile.am</span><br><span>@@ -114,6 +114,7 @@</span><br><span> osmocom/gsm/protocol/gsm_09_02.h \</span><br><span> osmocom/gsm/protocol/gsm_12_21.h \</span><br><span> osmocom/gsm/protocol/gsm_23_003.h \</span><br><span style="color: hsl(120, 100%, 40%);">+ osmocom/gsm/protocol/gsm_29_118.h \</span><br><span> osmocom/gsm/protocol/gsm_44_318.h \</span><br><span> osmocom/gsm/protocol/ipaccess.h \</span><br><span> osmocom/gsm/protocol/smpp34_osmocom.h \</span><br><span>diff --git a/include/osmocom/gsm/protocol/gsm_29_118.h b/include/osmocom/gsm/protocol/gsm_29_118.h</span><br><span>new file mode 100644</span><br><span>index 0000000..24e9de2</span><br><span>--- /dev/null</span><br><span>+++ b/include/osmocom/gsm/protocol/gsm_29_118.h</span><br><span>@@ -0,0 +1,169 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#pragma once</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_msg_type {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* unassigned */</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_PAGING_REQ = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_PAGING_REJ = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+ /* unassigned */</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_SERVICE_REQ = 0x06,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_DL_UD = 0x07,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_UL_UD = 0x08,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_LOC_UPD_REQ = 0x09,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_LOC_UPD_ACK = 0x0a,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_LOC_UPD_REJ = 0x0b,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_TMSI_REALL_CMPL = 0x0c,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_ALERT_REQ = 0x0d,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_ALERT_ACK = 0x0e,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_ALERT_REJ = 0x0f,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_UE_ACT_IND = 0x10,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_EPS_DET_IND = 0x11,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_EPS_DET_ACK = 0x12,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_IMSI_DET_IND = 0x13,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_IMSI_DET_ACK = 0x14,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_RESET_IND = 0x15,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_RESET_ACK = 0x16,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_SERVICE_ABORT_REQ = 0x17,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_MO_CSFB_IND = 0x18,</span><br><span style="color: hsl(120, 100%, 40%);">+ /* unassigned */</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_MM_INFO_REQ = 0x1a,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_RELEASE_REQ = 0x1b,</span><br><span style="color: hsl(120, 100%, 40%);">+ /* unassigned */</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_STATUS = 0x1d,</span><br><span style="color: hsl(120, 100%, 40%);">+ /* unassigned */</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_MSGT_UE_UNREACHABLE = 0x1f,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_msg_type_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_msg_type_name(enum sgsap_msg_type msgt) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_msg_type_names, msgt);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.3 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_iei {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_IMSI = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_VLR_NAME = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_TMSI = 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_LAI = 0x04,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_CHAN_NEEDED = 0x05,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_EMLPP_PRIORITY = 0x06,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_TMSI_STATUS = 0x07,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_SGS_CAUSE = 0x08,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_MME_NAME = 0x09,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_EPS_LU_TYPE = 0x0a,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_GLOBAL_CN_ID = 0x0b,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_MOBILE_ID = 0x0e,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_REJECT_CAUSE = 0x0f,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_IMSI_DET_EPS_TYPE = 0x10,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_IMSI_DET_NONEPS_TYPE = 0x11,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_IMEISV = 0x15,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_NAS_MSG_CONTAINER = 0x16,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_MM_INFO = 0x17,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_ERR_MSG = 0x1b,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_CLI = 0x1c,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_LCS_CLIENT_ID = 0x1d,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_LCS_INDICATOR = 0x1e,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_SS_CODE = 0x1f,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_SERVICE_INDICATOR = 0x20,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_UE_TIMEZONE = 0x21,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_MS_CLASSMARK2 = 0x22,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_TAI = 0x23,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_EUTRAN_CGI = 0x24,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_UE_EMM_MODE = 0x25,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_ADDL_PAGING_INDICATORS = 0x26,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_IE_TMSI_BASED_NRI_CONT = 0x27,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.4.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_eps_lu_type {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_EPS_LUT_IMSI_ATTACH = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_EPS_LUT_NORMAL = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_eps_lu_type_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_eps_lu_type_name(enum sgsap_eps_lu_type lut) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_eps_lu_type_names, lut);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.4.7 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_imsi_det_eps_type {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_ID_EPS_T_NETWORK_INITIATED = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_ID_EPS_T_UE_INITIATED = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_ID_EPS_T_EPS_NOT_ALLOWED = 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_ismi_det_eps_type_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_imsi_det_eps_type_name(enum sgsap_imsi_det_eps_type idt) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_ismi_det_eps_type_names, idt);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.4.8 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_imsi_det_noneps_type {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_ID_NONEPS_T_EXPLICIT_UE_NONEPS = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_ID_NONEPS_T_COMBINED_UE_EPS_NONEPS = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_ID_NONEPS_T_IMPLICIT_UE_EPS_NONEPS = 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_ismi_det_noneps_type_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_imsi_det_noneps_type_name(enum sgsap_imsi_det_noneps_type idt) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_ismi_det_noneps_type_names, idt);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.4.17 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_service_ind {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SERV_IND_CS_CALL = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SERV_IND_SMS = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_service_ind_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_service_ind_name(enum sgsap_service_ind si) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_service_ind_names, si);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.4.18 */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_sgs_cause {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_IMSI_DET_EPS = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_IMSI_DET_EPS_NONEPS = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_IMSI_UNKNOWN = 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_IMSI_DET_NON_EPS = 0x04,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_IMSI_IMPL_DET_NON_EPS = 0x05,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_UE_UNREACHABLE = 0x06,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_MSG_INCOMP_STATE = 0x07,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_MISSING_MAND_IE = 0x08,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_INVALID_MAND_IE = 0x09,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_COND_IE_ERROR = 0x0a,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_SEMANT_INCORR_MSG = 0x0b,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_MSG_UNKNOWN = 0x0c,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_MT_CSFB_REJ_USER = 0x0d,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_SGS_CAUSE_UE_TEMP_UNREACHABLE = 0x0e,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_sgs_cause_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_sgs_cause_name(enum sgsap_sgs_cause cause) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_sgs_cause_names, cause);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 9.4.21c */</span><br><span style="color: hsl(120, 100%, 40%);">+enum sgsap_ue_emm_mode {</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_UE_EMM_MODE_IDLE = 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+ SGSAP_UE_EMM_MODE_CONNECTED = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_ue_emm_mode_names[];</span><br><span style="color: hsl(120, 100%, 40%);">+static inline const char *sgsap_ue_emm_mode_name(enum sgsap_ue_emm_mode mode) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return get_value_string(sgsap_ue_emm_mode_names, mode);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 10.1 Table 10.1.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_TS5_DEFAULT 10 /* Guards the Paging Procedure at the VLR */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_TS6_2_DEFAULT 40 /* Guards the TMSI reallocation procedure */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_TS7_DEFAULT 4 /* Guards the non-EPS alert procedure */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_TS11_DEFAULT 4 /* Guards the VLR reset procedure */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_TS14_DEFAULT 10 /* Guards the UE fallback to UTRAN/GERAN */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_TS15_DEFAULT 10 /* Guards the MO UE fallback to UTRAN/GERAN */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 10.2 Table 10.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_NS7_DEFAULT 2</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_NS11_DEFAULT 2</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 29.118 Section 10.2 Table 10.2.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_NS8_DEFAULT 2</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_NS9_DEFAULT 2</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_NS10_DEFAULT 2</span><br><span style="color: hsl(120, 100%, 40%);">+#define SGS_NS12_DEFAULT 2</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct tlv_definition sgsap_ie_tlvdef;</span><br><span>diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am</span><br><span>index 29299a6..e28ea33 100644</span><br><span>--- a/src/gsm/Makefile.am</span><br><span>+++ b/src/gsm/Makefile.am</span><br><span>@@ -30,7 +30,8 @@</span><br><span> milenage/aes-internal.c milenage/aes-internal-enc.c \</span><br><span> milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \</span><br><span> gsup.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \</span><br><span style="color: hsl(0, 100%, 40%);">- gsm23003.c mncc.c bts_features.c oap_client.c</span><br><span style="color: hsl(120, 100%, 40%);">+ gsm23003.c mncc.c bts_features.c oap_client.c \</span><br><span style="color: hsl(120, 100%, 40%);">+ gsm29118.c</span><br><span> libgsmint_la_LDFLAGS = -no-undefined</span><br><span> libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la</span><br><span> </span><br><span>diff --git a/src/gsm/gsm29118.c b/src/gsm/gsm29118.c</span><br><span>new file mode 100644</span><br><span>index 0000000..de625a9</span><br><span>--- /dev/null</span><br><span>+++ b/src/gsm/gsm29118.c</span><br><span>@@ -0,0 +1,123 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/utils.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/tlv.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/protocol/gsm_29_118.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_msg_type_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_PAGING_REQ, "PAGING-REQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_PAGING_REJ, "PAGING-REJECT" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_SERVICE_REQ, "SERVICE-REQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_DL_UD, "DOWNLINK-UNITDATA" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_UL_UD, "UPLINK-UNITDATA" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_LOC_UPD_REQ, "LOCATION-UPDATE-REQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_LOC_UPD_ACK, "LOCATION-UPDATE-ACCEPT" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_LOC_UPD_REJ, "LOCATION-UPDATE-REJECT" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_TMSI_REALL_CMPL, "TMSI-REALLOCATION-COMPLETE" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_ALERT_REQ, "ALERT-REQQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_ALERT_ACK, "ALERT-ACK" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_ALERT_REJ, "ALERT-REJECT" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_UE_ACT_IND, "UE-ACTIVITY-INDICATION" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_EPS_DET_IND, "EPS-DETACH-INDICATION" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_EPS_DET_ACK, "EPS-DETACH-ACK" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_IMSI_DET_IND, "IMSI-DETACH-INDICATION" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_IMSI_DET_ACK, "IMSI-DETACH-ACK" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_RESET_IND, "RESET-INDICATION" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_RESET_ACK, "RESET-ACK" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_SERVICE_ABORT_REQ, "SERVICE-ABORT-REQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_MO_CSFB_IND, "MO-CSFB-INDICATION" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_MM_INFO_REQ, "MM-INFO-REQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_RELEASE_REQ, "RELEASE-REQUEST" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_STATUS, "STATUS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_MSGT_UE_UNREACHABLE, "UE-UNREACHABLE" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_eps_lu_type_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_EPS_LUT_IMSI_ATTACH, "IMSI Attach" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_EPS_LUT_NORMAL, "Normal" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_ismi_det_eps_type_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_ID_EPS_T_NETWORK_INITIATED, "Network initiated IMSI detach from EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_ID_EPS_T_UE_INITIATED, "UE initiated IMSI detach from EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_ID_EPS_T_EPS_NOT_ALLOWED, "EPS not allowed" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_ismi_det_noneps_type_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_ID_NONEPS_T_EXPLICIT_UE_NONEPS,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Explicit UE initiated IMSI detach from non-EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_ID_NONEPS_T_COMBINED_UE_EPS_NONEPS,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Combined UE initiated IMSI detach from EPS and non-EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_ID_NONEPS_T_IMPLICIT_UE_EPS_NONEPS,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Implicit network initiated IMSI detach from EPS and non-EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_service_ind_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SERV_IND_CS_CALL, "CS Call" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SERV_IND_SMS, "SMS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_sgs_cause_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_IMSI_DET_EPS, "IMSI detached for EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_IMSI_DET_EPS_NONEPS, "IMSI detached for EPS and non-EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_IMSI_UNKNOWN, "IMSI unknown" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_IMSI_DET_NON_EPS, "IMSI detached for non-EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_IMSI_IMPL_DET_NON_EPS,"IMSI implicitly detached for non-EPS" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_UE_UNREACHABLE, "UE unreachable" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_MSG_INCOMP_STATE, "Message not compatible with protocol state" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_MISSING_MAND_IE, "Missing mandatory IE" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_INVALID_MAND_IE, "Invalid mandatory IE" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_COND_IE_ERROR, "Conditional IE error" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_SEMANT_INCORR_MSG, "Semantically incorrect message" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_MSG_UNKNOWN, "Message unknown" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_MT_CSFB_REJ_USER, "MT CSFB call rejected by user" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_SGS_CAUSE_UE_TEMP_UNREACHABLE, "UE temporarily unreachable" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct value_string sgsap_ue_emm_mode_names[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_UE_EMM_MODE_IDLE, "EMM-IDLE" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { SGSAP_UE_EMM_MODE_CONNECTED, "EMM-CONNECTED" },</span><br><span style="color: hsl(120, 100%, 40%);">+ { 0, NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const struct tlv_definition sgsap_ie_tlvdef = {</span><br><span style="color: hsl(120, 100%, 40%);">+ .def = {</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_IMSI] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_VLR_NAME] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_TMSI] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_LAI] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_CHAN_NEEDED] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_EMLPP_PRIORITY] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_TMSI_STATUS] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_SGS_CAUSE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_MME_NAME] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_EPS_LU_TYPE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_GLOBAL_CN_ID] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_MOBILE_ID] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_REJECT_CAUSE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_IMSI_DET_EPS_TYPE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_IMSI_DET_NONEPS_TYPE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_IMEISV] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_NAS_MSG_CONTAINER] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_MM_INFO] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_ERR_MSG] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_CLI] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_LCS_CLIENT_ID] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_LCS_INDICATOR] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_SS_CODE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_SERVICE_INDICATOR] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_UE_TIMEZONE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_MS_CLASSMARK2] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_TAI] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_EUTRAN_CGI] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_UE_EMM_MODE] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_ADDL_PAGING_INDICATORS]={ TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ [SGSAP_IE_TMSI_BASED_NRI_CONT] = { TLV_TYPE_TLV },</span><br><span style="color: hsl(120, 100%, 40%);">+ },</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span>diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map</span><br><span>index dcc491d..3cc2ec5 100644</span><br><span>--- a/src/gsm/libosmogsm.map</span><br><span>+++ b/src/gsm/libosmogsm.map</span><br><span>@@ -505,5 +505,14 @@</span><br><span> osmo_oap_client_init;</span><br><span> osmo_oap_client_register;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_msg_type_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_eps_lu_type_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_ismi_det_eps_type_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_ismi_det_noneps_type_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_service_ind_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_sgs_cause_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_ue_emm_mode_names;</span><br><span style="color: hsl(120, 100%, 40%);">+sgsap_ie_tlvdef;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> local: *;</span><br><span> };</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11412">change 11412</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11412"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109 </div>
<div style="display:none"> Gerrit-Change-Number: 11412 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>