summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2018-12-14 16:14:34 +0100
committerOliver Smith <osmith@sysmocom.de>2018-12-21 13:13:30 +0100
commit10db2817e5ce76eebd61dd6b607a6dfad57fa417 (patch)
tree5425929afda0ed0330d9e20670a5686fbc4b0b12 /include
parent19742408cf3d83bb67e4b8c2fc3b0cbbee7bee59 (diff)
GSUP: add CHECK-IMEI message
Implement necessary messages for Procedure Check_IMEI_VLR (TS 23.018 Chapter 7.1.2.9). This lets the VLR ask the EIR to check if an IMEI is valid. In the Osmocom stack, we don't have an EIR and this request will be handled by the HLR. We will be able to store the IMEI in the HLR as side-effect (OS#2541). This is roughly based on TS 29.002 8.7.1 MAP_CHECK_IMEI service, but only implements the bare minimum required IEs (imei and imei_result). Related: OS#3733 Change-Id: I085819df0ea7f3bfeb0cabebb5fd1942a23c6155
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/gsup.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index 37e474c2..6adb0bfd 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -99,6 +99,9 @@ enum osmo_gsup_iei {
OSMO_GSUP_SM_RP_MMS_IE = 0x45,
OSMO_GSUP_SM_ALERT_RSN_IE = 0x46,
+ OSMO_GSUP_IMEI_IE = 0x50,
+ OSMO_GSUP_IMEI_RESULT_IE = 0x51,
+
_OSMO_GSUP_IEI_END_MARKER
};
@@ -145,6 +148,10 @@ enum osmo_gsup_message_type {
OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST = 0b00101100,
OSMO_GSUP_MSGT_READY_FOR_SM_ERROR = 0b00101101,
OSMO_GSUP_MSGT_READY_FOR_SM_RESULT = 0b00101110,
+
+ OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST = 0b00110000,
+ OSMO_GSUP_MSGT_CHECK_IMEI_ERROR = 0b00110001,
+ OSMO_GSUP_MSGT_CHECK_IMEI_RESULT = 0b00110010,
};
#define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00)
@@ -166,6 +173,11 @@ enum osmo_gsup_cn_domain {
OSMO_GSUP_CN_DOMAIN_CS = 2,
};
+enum osmo_gsup_imei_result {
+ OSMO_GSUP_IMEI_RESULT_ACK = 1,
+ OSMO_GSUP_IMEI_RESULT_NACK = 2,
+};
+
/*! TCAP-like session state */
enum osmo_gsup_session_state {
/*! Undefined session state */
@@ -259,6 +271,10 @@ struct osmo_gsup_message {
const uint8_t *sm_rp_mms;
/*! Alert reason (see 3GPP TS 29.002, 7.6.8.8) */
enum osmo_gsup_sms_sm_alert_rsn_t sm_alert_rsn;
+
+ const uint8_t *imei_enc;
+ size_t imei_enc_len;
+ enum osmo_gsup_imei_result imei_result;
};
int osmo_gsup_decode(const uint8_t *data, size_t data_len,