summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-02-22 15:02:48 +0100
committerOliver Smith <osmith@sysmocom.de>2019-03-04 13:19:20 +0100
commit19ba7fa2acb52815efe5af5f17d8fbea2ebcf74d (patch)
tree98b5c99b0f13425159c2bc1c70d6166b8dcc0413
parentb1b853a8ecb32d931e1fef3feb8c3107d9425887 (diff)
WIP: add check-imei to GSUP-typesosmith/check-imei-test
-rw-r--r--library/GSUP_Types.ttcn58
1 files changed, 55 insertions, 3 deletions
diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 6cc6dde..c024d37 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -52,7 +52,10 @@ type enumerated GSUP_IEI {
OSMO_GSUP_SM_RP_UI_IE ('43'O),
OSMO_GSUP_SM_RP_CAUSE_IE ('44'O),
OSMO_GSUP_SM_RP_MMS_IE ('45'O),
- OSMO_GSUP_SM_ALERT_RSN_IE ('46'O)
+ OSMO_GSUP_SM_ALERT_RSN_IE ('46'O),
+
+ OSMO_GSUP_IMEI_IE ('50'O),
+ OSMO_GSUP_IMEI_RESULT_IE ('51'O)
} with { variant "FIELDLENGTH(8)" };
type enumerated GSUP_MessageType {
@@ -96,7 +99,11 @@ type enumerated GSUP_MessageType {
OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST ('00101100'B),
OSMO_GSUP_MSGT_READY_FOR_SM_ERROR ('00101101'B),
- OSMO_GSUP_MSGT_READY_FOR_SM_RESULT ('00101110'B)
+ OSMO_GSUP_MSGT_READY_FOR_SM_RESULT ('00101110'B),
+
+ OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST ('00110000'B),
+ OSMO_GSUP_MSGT_CHECK_IMEI_ERROR ('00110001'B),
+ OSMO_GSUP_MSGT_CHECK_IMEI_RESULT ('00110010'B)
} with { variant "FIELDLENGTH(8)" };
type enumerated GSUP_CancelType {
@@ -109,6 +116,11 @@ type enumerated GSUP_CnDomain {
OSMO_GSUP_CN_DOMAIN_CS (2)
} with { variant "FIELDLENGTH(8)" };
+type enumerated GSUP_IMEIResult {
+ OSMO_GSUP_IMEI_RESULT_ACK (0),
+ OSMO_GSUP_IMEI_RESULT_NACK (1)
+} with { variant "FIELDLENGTH(8)" };
+
type enumerated GSUP_SessionState {
OSMO_GSUP_SESSION_STATE_NONE (0),
OSMO_GSUP_SESSION_STATE_BEGIN (1),
@@ -121,6 +133,11 @@ type record GSUP_MSISDN {
hexstring digits optional
} with { variant (len) "LENGTHTO(digits)" };
+type record GSUP_IMEI {
+ uint8_t len,
+ hexstring digits optional
+} with { variant (len) "LENGTHTO(digits)" };
+
type record GSUP_IE {
GSUP_IEI tag,
uint8_t len,
@@ -156,6 +173,8 @@ type record GSUP_IE {
sm_rp_cause, tag = OSMO_GSUP_SM_RP_CAUSE_IE;
sm_rp_mms, tag = OSMO_GSUP_SM_RP_MMS_IE;
sm_alert_rsn, tag = OSMO_GSUP_SM_ALERT_RSN_IE;
+ imei, tag = OSMO_GSUP_IMEI_IE;
+ imei_result, tag = OSMO_GSUP_IMEI_RESULT_IE;
)"
};
@@ -197,7 +216,10 @@ type union GSUP_IeValue {
octetstring sm_rp_ui,
OCT1 sm_rp_cause,
OCT1 sm_rp_mms,
- GSUP_SM_ALERT_RSN_Type sm_alert_rsn
+ GSUP_SM_ALERT_RSN_Type sm_alert_rsn,
+
+ GSUP_IMEI imei,
+ GSUP_IMEIResult imei_result
};
type record GSUP_PDU {
@@ -674,6 +696,36 @@ template GSUP_IE tr_GSUP_IE_SM_RP_MMS(template OCT1 mms) := {
}
}
+template (value) GSUP_IE ts_GSUP_IE_IMEI_IE(GSUP_IMEI imei) := {
+ tag := OSMO_GSUP_IMEI_IE,
+ len := 0, /* overwritten */
+ val := {
+ imei := imei
+ }
+}
+template GSUP_IE tr_GSUP_IE_IMEI_IE(template GSUP_IMEI imei) := {
+ tag := OSMO_GSUP_IMEI_IE,
+ len := ?,
+ val := {
+ imei := imei
+ }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_IMEI_RESULT_IE(GSUP_IMEIResult result) := {
+ tag := OSMO_GSUP_IMEI_RESULT_IE,
+ len := 0, /* overwritten */
+ val := {
+ imei_result := result
+ }
+}
+template GSUP_IE tr_GSUP_IE_IMEI_RESULT_IE(template GSUP_IMEIResult result) := {
+ tag := OSMO_GSUP_IMEI_RESULT_IE,
+ len := ?,
+ val := {
+ imei_result := result
+ }
+}
+
/* Possible identity types for SM-RP-{OA|DA} IEs */
type enumerated GSUP_SM_RP_ODA_IdType {
OSMO_GSUP_SM_RP_ODA_ID_NONE ('00'O),