Change in libosmocore[master]: SGsAP protocol definitions (header + C file)

2018-10-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11412 )

Change subject: SGsAP protocol definitions (header + C file)
..

SGsAP protocol definitions (header + C file)

Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
---
M include/Makefile.am
A include/osmocom/gsm/protocol/gsm_29_118.h
M src/gsm/Makefile.am
A src/gsm/gsm29118.c
M src/gsm/libosmogsm.map
5 files changed, 304 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/Makefile.am b/include/Makefile.am
index 19695d1..59a5fed 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -114,6 +114,7 @@
osmocom/gsm/protocol/gsm_09_02.h \
osmocom/gsm/protocol/gsm_12_21.h \
   osmocom/gsm/protocol/gsm_23_003.h \
+  osmocom/gsm/protocol/gsm_29_118.h \
osmocom/gsm/protocol/gsm_44_318.h \
osmocom/gsm/protocol/ipaccess.h \
osmocom/gsm/protocol/smpp34_osmocom.h \
diff --git a/include/osmocom/gsm/protocol/gsm_29_118.h 
b/include/osmocom/gsm/protocol/gsm_29_118.h
new file mode 100644
index 000..24e9de2
--- /dev/null
+++ b/include/osmocom/gsm/protocol/gsm_29_118.h
@@ -0,0 +1,169 @@
+#pragma once
+
+
+/* TS 29.118 Section 9.2 */
+enum sgsap_msg_type {
+   /* unassigned */
+   SGSAP_MSGT_PAGING_REQ   = 0x01,
+   SGSAP_MSGT_PAGING_REJ   = 0x02,
+   /* unassigned */
+   SGSAP_MSGT_SERVICE_REQ  = 0x06,
+   SGSAP_MSGT_DL_UD= 0x07,
+   SGSAP_MSGT_UL_UD= 0x08,
+   SGSAP_MSGT_LOC_UPD_REQ  = 0x09,
+   SGSAP_MSGT_LOC_UPD_ACK  = 0x0a,
+   SGSAP_MSGT_LOC_UPD_REJ  = 0x0b,
+   SGSAP_MSGT_TMSI_REALL_CMPL  = 0x0c,
+   SGSAP_MSGT_ALERT_REQ= 0x0d,
+   SGSAP_MSGT_ALERT_ACK= 0x0e,
+   SGSAP_MSGT_ALERT_REJ= 0x0f,
+   SGSAP_MSGT_UE_ACT_IND   = 0x10,
+   SGSAP_MSGT_EPS_DET_IND  = 0x11,
+   SGSAP_MSGT_EPS_DET_ACK  = 0x12,
+   SGSAP_MSGT_IMSI_DET_IND = 0x13,
+   SGSAP_MSGT_IMSI_DET_ACK = 0x14,
+   SGSAP_MSGT_RESET_IND= 0x15,
+   SGSAP_MSGT_RESET_ACK= 0x16,
+   SGSAP_MSGT_SERVICE_ABORT_REQ= 0x17,
+   SGSAP_MSGT_MO_CSFB_IND  = 0x18,
+   /* unassigned */
+   SGSAP_MSGT_MM_INFO_REQ  = 0x1a,
+   SGSAP_MSGT_RELEASE_REQ  = 0x1b,
+   /* unassigned */
+   SGSAP_MSGT_STATUS   = 0x1d,
+   /* unassigned */
+   SGSAP_MSGT_UE_UNREACHABLE   = 0x1f,
+};
+const struct value_string sgsap_msg_type_names[];
+static inline const char *sgsap_msg_type_name(enum sgsap_msg_type msgt) {
+   return get_value_string(sgsap_msg_type_names, msgt);
+}
+
+/* TS 29.118 Section 9.3 */
+enum sgsap_iei {
+   SGSAP_IE_IMSI   = 0x01,
+   SGSAP_IE_VLR_NAME   = 0x02,
+   SGSAP_IE_TMSI   = 0x03,
+   SGSAP_IE_LAI= 0x04,
+   SGSAP_IE_CHAN_NEEDED= 0x05,
+   SGSAP_IE_EMLPP_PRIORITY = 0x06,
+   SGSAP_IE_TMSI_STATUS= 0x07,
+   SGSAP_IE_SGS_CAUSE  = 0x08,
+   SGSAP_IE_MME_NAME   = 0x09,
+   SGSAP_IE_EPS_LU_TYPE= 0x0a,
+   SGSAP_IE_GLOBAL_CN_ID   = 0x0b,
+   SGSAP_IE_MOBILE_ID  = 0x0e,
+   SGSAP_IE_REJECT_CAUSE   = 0x0f,
+   SGSAP_IE_IMSI_DET_EPS_TYPE  = 0x10,
+   SGSAP_IE_IMSI_DET_NONEPS_TYPE   = 0x11,
+   SGSAP_IE_IMEISV = 0x15,
+   SGSAP_IE_NAS_MSG_CONTAINER  = 0x16,
+   SGSAP_IE_MM_INFO= 0x17,
+   SGSAP_IE_ERR_MSG= 0x1b,
+   SGSAP_IE_CLI= 0x1c,
+   SGSAP_IE_LCS_CLIENT_ID  = 0x1d,
+   SGSAP_IE_LCS_INDICATOR  = 0x1e,
+   SGSAP_IE_SS_CODE= 0x1f,
+   SGSAP_IE_SERVICE_INDICATOR  = 0x20,
+   SGSAP_IE_UE_TIMEZONE= 0x21,
+   SGSAP_IE_MS_CLASSMARK2  = 0x22,
+   SGSAP_IE_TAI= 0x23,
+   SGSAP_IE_EUTRAN_CGI = 0x24,
+   SGSAP_IE_UE_EMM_MODE= 0x25,
+   SGSAP_IE_ADDL_PAGING_INDICATORS = 0x26,
+   SGSAP_IE_TMSI_BASED_NRI_CONT= 0x27,
+};
+
+
+/* TS 29.118 

Change in libosmocore[master]: SGsAP protocol definitions (header + C file)

2018-10-21 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11412 )

Change subject: SGsAP protocol definitions (header + C file)
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11412
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
Gerrit-Change-Number: 11412
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 21 Oct 2018 12:21:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: SGsAP protocol definitions (header + C file)

2018-10-21 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11412 )

Change subject: SGsAP protocol definitions (header + C file)
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11412
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
Gerrit-Change-Number: 11412
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 21 Oct 2018 12:21:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: SGsAP protocol definitions (header + C file)

2018-10-21 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/11412


Change subject: SGsAP protocol definitions (header + C file)
..

SGsAP protocol definitions (header + C file)

Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
---
M include/Makefile.am
A include/osmocom/gsm/protocol/gsm_29_118.h
M src/gsm/Makefile.am
A src/gsm/gsm29118.c
M src/gsm/libosmogsm.map
5 files changed, 304 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/11412/1

diff --git a/include/Makefile.am b/include/Makefile.am
index 19695d1..59a5fed 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -114,6 +114,7 @@
osmocom/gsm/protocol/gsm_09_02.h \
osmocom/gsm/protocol/gsm_12_21.h \
   osmocom/gsm/protocol/gsm_23_003.h \
+  osmocom/gsm/protocol/gsm_29_118.h \
osmocom/gsm/protocol/gsm_44_318.h \
osmocom/gsm/protocol/ipaccess.h \
osmocom/gsm/protocol/smpp34_osmocom.h \
diff --git a/include/osmocom/gsm/protocol/gsm_29_118.h 
b/include/osmocom/gsm/protocol/gsm_29_118.h
new file mode 100644
index 000..24e9de2
--- /dev/null
+++ b/include/osmocom/gsm/protocol/gsm_29_118.h
@@ -0,0 +1,169 @@
+#pragma once
+
+
+/* TS 29.118 Section 9.2 */
+enum sgsap_msg_type {
+   /* unassigned */
+   SGSAP_MSGT_PAGING_REQ   = 0x01,
+   SGSAP_MSGT_PAGING_REJ   = 0x02,
+   /* unassigned */
+   SGSAP_MSGT_SERVICE_REQ  = 0x06,
+   SGSAP_MSGT_DL_UD= 0x07,
+   SGSAP_MSGT_UL_UD= 0x08,
+   SGSAP_MSGT_LOC_UPD_REQ  = 0x09,
+   SGSAP_MSGT_LOC_UPD_ACK  = 0x0a,
+   SGSAP_MSGT_LOC_UPD_REJ  = 0x0b,
+   SGSAP_MSGT_TMSI_REALL_CMPL  = 0x0c,
+   SGSAP_MSGT_ALERT_REQ= 0x0d,
+   SGSAP_MSGT_ALERT_ACK= 0x0e,
+   SGSAP_MSGT_ALERT_REJ= 0x0f,
+   SGSAP_MSGT_UE_ACT_IND   = 0x10,
+   SGSAP_MSGT_EPS_DET_IND  = 0x11,
+   SGSAP_MSGT_EPS_DET_ACK  = 0x12,
+   SGSAP_MSGT_IMSI_DET_IND = 0x13,
+   SGSAP_MSGT_IMSI_DET_ACK = 0x14,
+   SGSAP_MSGT_RESET_IND= 0x15,
+   SGSAP_MSGT_RESET_ACK= 0x16,
+   SGSAP_MSGT_SERVICE_ABORT_REQ= 0x17,
+   SGSAP_MSGT_MO_CSFB_IND  = 0x18,
+   /* unassigned */
+   SGSAP_MSGT_MM_INFO_REQ  = 0x1a,
+   SGSAP_MSGT_RELEASE_REQ  = 0x1b,
+   /* unassigned */
+   SGSAP_MSGT_STATUS   = 0x1d,
+   /* unassigned */
+   SGSAP_MSGT_UE_UNREACHABLE   = 0x1f,
+};
+const struct value_string sgsap_msg_type_names[];
+static inline const char *sgsap_msg_type_name(enum sgsap_msg_type msgt) {
+   return get_value_string(sgsap_msg_type_names, msgt);
+}
+
+/* TS 29.118 Section 9.3 */
+enum sgsap_iei {
+   SGSAP_IE_IMSI   = 0x01,
+   SGSAP_IE_VLR_NAME   = 0x02,
+   SGSAP_IE_TMSI   = 0x03,
+   SGSAP_IE_LAI= 0x04,
+   SGSAP_IE_CHAN_NEEDED= 0x05,
+   SGSAP_IE_EMLPP_PRIORITY = 0x06,
+   SGSAP_IE_TMSI_STATUS= 0x07,
+   SGSAP_IE_SGS_CAUSE  = 0x08,
+   SGSAP_IE_MME_NAME   = 0x09,
+   SGSAP_IE_EPS_LU_TYPE= 0x0a,
+   SGSAP_IE_GLOBAL_CN_ID   = 0x0b,
+   SGSAP_IE_MOBILE_ID  = 0x0e,
+   SGSAP_IE_REJECT_CAUSE   = 0x0f,
+   SGSAP_IE_IMSI_DET_EPS_TYPE  = 0x10,
+   SGSAP_IE_IMSI_DET_NONEPS_TYPE   = 0x11,
+   SGSAP_IE_IMEISV = 0x15,
+   SGSAP_IE_NAS_MSG_CONTAINER  = 0x16,
+   SGSAP_IE_MM_INFO= 0x17,
+   SGSAP_IE_ERR_MSG= 0x1b,
+   SGSAP_IE_CLI= 0x1c,
+   SGSAP_IE_LCS_CLIENT_ID  = 0x1d,
+   SGSAP_IE_LCS_INDICATOR  = 0x1e,
+   SGSAP_IE_SS_CODE= 0x1f,
+   SGSAP_IE_SERVICE_INDICATOR  = 0x20,
+   SGSAP_IE_UE_TIMEZONE= 0x21,
+   SGSAP_IE_MS_CLASSMARK2  = 0x22,
+   SGSAP_IE_TAI= 0x23,
+   SGSAP_IE_EUTRAN_CGI = 0x24,
+   SGSAP_IE_UE_EMM_MODE= 0x25,
+   SGSAP_IE_ADDL_PAGING_INDICATORS = 0x26,
+   SGSAP_IE_TMSI_BASED_NRI_CONT= 0x27,
+};
+
+
+/* TS 29.118 Section 9.4.2