diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/protocol/Makefile.am | 1 | ||||
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_29_018.h | 134 |
2 files changed, 135 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/Makefile.am b/include/osmocom/gsm/protocol/Makefile.am index 5c8e2a68..6b8c5930 100644 --- a/include/osmocom/gsm/protocol/Makefile.am +++ b/include/osmocom/gsm/protocol/Makefile.am @@ -15,6 +15,7 @@ osmogsmproto_HEADERS = \ gsm_23_003.h \ gsm_23_041.h \ gsm_25_415.h \ + gsm_29_018.h \ gsm_29_118.h \ gsm_44_004.h \ gsm_44_060.h \ diff --git a/include/osmocom/gsm/protocol/gsm_29_018.h b/include/osmocom/gsm/protocol/gsm_29_018.h new file mode 100644 index 00000000..e52faffe --- /dev/null +++ b/include/osmocom/gsm/protocol/gsm_29_018.h @@ -0,0 +1,134 @@ +#pragma once + +/* Definitions for the BSSAP+ protocol of the Gs interface as per 3GPP TS 29.018 V15.0.0 */ + +#include <osmocom/core/utils.h> + +/* TS 29.018 Section 18.2 */ +enum bssapp_msg_type { + BSSAPP_PAGING_REQ = 0x01, + BSSAPP_PAGING_REJ = 0x02, + BSSAPP_DL_TUNNEL_REQ = 0x07, + BSSAPP_UL_TUNNEL_REQ = 0x08, + BSSAPP_LOC_UPD_REQ = 0x09, + BSSAPP_LOC_UPD_ACC = 0x0a, + BSSAPP_LOC_UPD_REJ = 0x0b, + BSSAPP_TMSI_REALL_CMPL = 0x0c, + BSSAPP_ALERT_REQ = 0x0d, + BSSAPP_ALERT_ACK = 0x0e, + BSSAPP_ALERT_REJ = 0x0f, + BSSAPP_MS_ACTIVITY_IND = 0x10, + BSSAPP_GPRS_DETACH_IND = 0x11, + BSSAPP_GPRS_DETACH_ACK = 0x12, + BSSAPP_IMSI_DETACH_IND = 0x13, + BSSAPP_IMSI_DETACH_ACK = 0x14, + BSSAPP_RESET_IND = 0x15, + BSSAPP_RESET_ACK = 0x16, + BSSAPP_MS_INFO_REQ = 0x17, + BSSAPP_MS_INFO_RESP = 0x18, + BSSAPP_MM_INFO_REQ = 0x1a, + BSSAPP_MOBILE_STATUS = 0x1d, + BSSAPP_MS_UNREACHABLE = 0x1f, +}; +extern const struct value_string bssapp_msg_type_names[]; +static inline const char *bssapp_msg_type_name(enum bssapp_msg_type msgt) { + return get_value_string(bssapp_msg_type_names, msgt); +} + + +/* TS 29.018 Section 18.3 */ +enum bssapp_iei { + BSSAPP_IEI_IMSI = 0x01, + BSSAPP_IEI_VLR_NUMBER = 0x02, + BSSAPP_IEI_TMSI = 0x03, + BSSAPP_IEI_LAI = 0x04, + BSSAPP_IEI_CHAN_NEEDED = 0x05, + BSSAPP_IEI_eMLPP_PRIORITY = 0x06, + BSSAPP_IEI_TMSI_STATUS = 0x07, + BSSAPP_IEI_Gs_CAUSE = 0x08, + BSSAPP_IEI_SGSN_NUMBER = 0x09, + BSSAPP_IEI_GPRS_LU_TYPE = 0x0a, + BSSAPP_IEI_GLOBAL_CN_ID = 0x0b, + BSSAPP_IEI_MS_CLASSMARK_1 = 0x0d, + BSSAPP_IEI_MOBILE_ID = 0x0e, + BSSAPP_IEI_REJECT_CAUSE = 0x0f, + BSSAPP_IEI_IMSI_DET_FROM_GPRS_TYPE = 0x10, + BSSAPP_IEI_IMSI_DET_FROM_NON_GPRS_TYPE = 0x11, + BSSAPP_IEI_INFORMATION_REQUESTED = 0x12, + BSSAPP_IEI_PTMSI = 0x13, + BSSAPP_IEI_IMEI = 0x14, + BSSAPP_IEI_IMEISV = 0x15, + BSSAPP_IEI_MM_INFORMATION = 0x17, + BSSAPP_IEI_CGI = 0x18, + BSSAPP_IEI_LOC_INFO_AGE = 0x19, + BSSAPP_IEI_MS_STATE = 0x1a, + BSSAPP_IEI_ERRONEOUS_MSG = 0x1b, + BSSAPP_IEI_DL_TUN_PAYLOAD_CTRL_INFO = 0x1c, + BSSAPP_IEI_UL_TUN_PAYLOAD_CTRL_INFO = 0x1d, + BSSAPP_IEI_SAI = 0x1e, + BSSAPP_IEI_TMSI_BASED_NRI_CONTAINER = 0x1f, +}; +extern const struct value_string bssapp_iei_names[]; +static inline const char *bssapp_iei_name(enum bssapp_iei iei) { + return get_value_string(bssapp_iei_names, iei); +} + + +/* TS 29.018 Section 18.4.6 */ +enum bssapp_gprs_lu_type { + BSSAPP_LU_T_IMSI_ATTACH = 0x01, + BSSAPP_LU_T_NORMAL = 0x02, +}; + +/* TS 29.018 Section 18.4.7 */ +enum bssapp_gs_cause { + BSSAPP_GSC_IMSI_DET_FOR_GPRS = 0x01, + BSSAPP_GSC_IMSI_DET_FOR_GPRS_AND_NON = 0x02, + BSSAPP_GSC_IMSI_UNKNOWN = 0x03, + BSSAPP_GSC_IMSI_DET_FOR_NON_GPRS = 0x04, + BSSAPP_GSC_IMSI_IMPL_DET_FOR_NON_GPRS = 0x05, + BSSAPP_GSC_MS_UNREACHABLE = 0x06, + BSSAPP_GSC_MSG_INCOMP_PROT_STATE = 0x07, + BSSAPP_GSC_MISSING_MAND_IE = 0x08, + BSSAPP_GSC_INVAL_MAND_IE = 0x09, + BSSAPP_GSC_COND_IE_ERR = 0x0a, + BSSAPP_GSC_SEM_INCORR_MSG = 0x0b, + BSSAPP_GSC_MSG_UNKNOWN = 0x0c, + BSSAPP_GSC_ADDR_ERROR = 0x0d, + BSSAPP_GSC_TOM_NOT_SUPPORTED = 0x0e, + BSSAPP_GSC_CIPH_REQ_CANT_ACCOMM = 0x0f, +}; + +/* TS 29.018 Section 18.4.12 */ +enum bssapp_imsi_det_non_gprs_type { + BSSAPP_IDNGT_EXPL_MO_IMSI_DET_NON_GPRS = 0x01, + BSSAPP_IDNGT_COMB_EXPL_MO_IMSI_DET_GPRS_AND_NON = 0x02, + BSSAPP_IDNGT_IMPL_MT_IMSI_DET_GPRS_AND_NON = 0x03, +}; + + +/* TS 29.018 Section 18.4.13 */ +enum bssapp_info_req { + BSSAPP_INFO_PTMSI = 0x01, + BSSAPP_INFO_IMEI = 0x02, + BSSAPP_INFO_IMEISV = 0x03, + BSSAPP_INFO_PTMSI_AND_IMEI = 0x04, + BSSAPP_INFO_PTMSI_AND_IMEISV = 0x05, + BSSAPP_INFO_IMEI_AND_IMEISV = 0x06, + BSSAPP_INFO_PTMSI_IMEI_AND_IMEISV = 0x07, + BSSAPP_INFO_MOBILE_LOC_INFO = 0x08, + BSSAPP_INFO_TMSI = 0x09, +}; + +/* TS 29.018 Mobile station state */ +enum bssapp_ms_state { + BSSAPP_MS_ST_IDLE_OR_PMM_DETACHED = 0x00, + BSSAPP_MS_ST_STANDBY_OR_PMM_IDLE_NO_PDP = 0x01, + BSSAPP_MS_ST_STANDBY_OR_PMM_IDLE_PDP = 0x02, + BSSAPP_MS_ST_SUSPENDED_NO_PDP = 0x03, + BSSAPP_MS_ST_SUSPENDED_PDP = 0x04, + BSSAPP_MS_ST_READY_OR_PMM_CONN_NO_PDP = 0x05, + BSSAPP_MS_ST_READY_OR_PMM_CONN_PDP = 0x06, + BSSAPP_MS_ST_IMSI_UNKNOWN = 0x07, + BSSAPP_MS_ST_INFO_REQ_NOTSUPP = 0x08, +}; |