summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/GSUP_Types.ttcn156
1 files changed, 153 insertions, 3 deletions
diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 4c2aac0..359e272 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -39,7 +39,11 @@ type enumerated GSUP_IEI {
OSMO_GSUP_AUTN_IE ('25'O),
OSMO_GSUP_AUTS_IE ('26'O),
OSMO_GSUP_RES_IE ('27'O),
- OSMO_GSUP_CN_DOMAIN_IE ('28'O)
+ OSMO_GSUP_CN_DOMAIN_IE ('28'O),
+
+ OSMO_GSUP_SESSION_ID_IE ('30'O),
+ OSMO_GSUP_SESSION_STATE_IE ('31'O),
+ OSMO_GSUP_SS_INFO_IE ('35'O)
} with { variant "FIELDLENGTH(8)" };
type enumerated GSUP_MessageType {
@@ -67,7 +71,11 @@ type enumerated GSUP_MessageType {
OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST ('00011100'B),
OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR ('00011101'B),
- OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT ('00011110'B)
+ OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT ('00011110'B),
+
+ OSMO_GSUP_MSGT_PROC_SS_REQUEST ('00100000'B),
+ OSMO_GSUP_MSGT_PROC_SS_ERROR ('00100001'B),
+ OSMO_GSUP_MSGT_PROC_SS_RESULT ('00100010'B)
} with { variant "FIELDLENGTH(8)" };
type enumerated GSUP_CancelType {
@@ -80,6 +88,13 @@ type enumerated GSUP_CnDomain {
OSMO_GSUP_CN_DOMAIN_CS (2)
} with { variant "FIELDLENGTH(8)" };
+type enumerated GSUP_SessionState {
+ OSMO_GSUP_SESSION_STATE_NONE (0),
+ OSMO_GSUP_SESSION_STATE_BEGIN (1),
+ OSMO_GSUP_SESSION_STATE_CONTINUE (2),
+ OSMO_GSUP_SESSION_STATE_END (3)
+} with { variant "FIELDLENGTH(8)" };
+
type record GSUP_MSISDN {
uint8_t len,
hexstring digits optional
@@ -110,6 +125,9 @@ type record GSUP_IE {
pdp_qos, tag = OSMO_GSUP_PDP_QOS_IE;
pdp_type, tag = OSMO_GSUP_PDP_TYPE_IE;
charg_char, tag = OSMO_GSUP_CHARG_CHAR_IE;
+ session_state, tag = OSMO_GSUP_SESSION_STATE_IE;
+ session_id, tag = OSMO_GSUP_SESSION_ID_IE;
+ ss_info, tag = OSMO_GSUP_SS_INFO_IE;
)"
};
@@ -138,7 +156,12 @@ type union GSUP_IeValue {
octetstring apn,
octetstring pdp_qos,
OCT2 pdp_type,
- octetstring charg_char
+ octetstring charg_char,
+ /* Session information */
+ GSUP_SessionState session_state,
+ OCT4 session_id,
+ /* Supplementary Services */
+ octetstring ss_info
};
type record GSUP_PDU {
@@ -513,5 +536,132 @@ template (value) GSUP_IE ts_GSUP_IE_CnDomain(GSUP_CnDomain dom) := {
}
}
+template (value) GSUP_IE ts_GSUP_IE_SessionId(OCT4 sid) := {
+ tag := OSMO_GSUP_SESSION_ID_IE,
+ len := 0, /* overwritten */
+ val := {
+ session_id := sid
+ }
+}
+template GSUP_IE tr_GSUP_IE_SessionId(template OCT4 sid) := {
+ tag := OSMO_GSUP_SESSION_ID_IE,
+ len := ?,
+ val := {
+ session_id := sid
+ }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_SessionState(GSUP_SessionState state) := {
+ tag := OSMO_GSUP_SESSION_STATE_IE,
+ len := 0, /* overwritten */
+ val := {
+ session_state := state
+ }
+}
+template GSUP_IE tr_GSUP_IE_SessionState(template GSUP_SessionState state) := {
+ tag := OSMO_GSUP_SESSION_STATE_IE,
+ len := ?,
+ val := {
+ session_state := state
+ }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_SSInfo(octetstring ss) := {
+ tag := OSMO_GSUP_SS_INFO_IE,
+ len := 0, /* overwritten */
+ val := {
+ ss_info := ss
+ }
+}
+template GSUP_IE tr_GSUP_IE_SSInfo(template octetstring ss) := {
+ tag := OSMO_GSUP_SS_INFO_IE,
+ len := ?,
+ val := {
+ ss_info := ss
+ }
+}
+
+template (value) GSUP_PDU ts_GSUP_PROC_SS_REQ(
+ hexstring imsi,
+ OCT4 sid,
+ GSUP_SessionState state,
+ octetstring ss
+) := ts_GSUP(
+ OSMO_GSUP_MSGT_PROC_SS_REQUEST,
+ {
+ valueof(ts_GSUP_IE_IMSI(imsi)),
+ valueof(ts_GSUP_IE_SessionId(sid)),
+ valueof(ts_GSUP_IE_SessionState(state)),
+ valueof(ts_GSUP_IE_SSInfo(ss))
+ }
+);
+template GSUP_PDU tr_GSUP_PROC_SS_REQ(
+ template hexstring imsi,
+ template OCT4 sid := ?,
+ template GSUP_SessionState state := ?,
+ template octetstring ss := ?
+) := tr_GSUP(
+ OSMO_GSUP_MSGT_PROC_SS_REQUEST,
+ {
+ tr_GSUP_IE_IMSI(imsi),
+ tr_GSUP_IE_SessionId(sid),
+ tr_GSUP_IE_SessionState(state),
+ tr_GSUP_IE_SSInfo(ss)
+ }
+);
+
+template (value) GSUP_PDU ts_GSUP_PROC_SS_RES(
+ hexstring imsi,
+ OCT4 sid,
+ GSUP_SessionState state,
+ octetstring ss
+) := ts_GSUP(
+ OSMO_GSUP_MSGT_PROC_SS_RESULT,
+ {
+ valueof(ts_GSUP_IE_IMSI(imsi)),
+ valueof(ts_GSUP_IE_SessionId(sid)),
+ valueof(ts_GSUP_IE_SessionState(state)),
+ valueof(ts_GSUP_IE_SSInfo(ss))
+ }
+);
+template GSUP_PDU tr_GSUP_PROC_SS_RES(
+ template hexstring imsi,
+ template OCT4 sid := ?,
+ template GSUP_SessionState state := ?,
+ template octetstring ss := ?
+) := tr_GSUP(
+ OSMO_GSUP_MSGT_PROC_SS_RESULT,
+ {
+ tr_GSUP_IE_IMSI(imsi),
+ tr_GSUP_IE_SessionId(sid),
+ tr_GSUP_IE_SessionState(state),
+ tr_GSUP_IE_SSInfo(ss)
+ }
+);
+
+template (value) GSUP_PDU ts_GSUP_PROC_SS_ERR(
+ hexstring imsi,
+ OCT4 sid,
+ integer cause
+) := ts_GSUP(
+ OSMO_GSUP_MSGT_PROC_SS_ERROR,
+ {
+ valueof(ts_GSUP_IE_IMSI(imsi)),
+ valueof(ts_GSUP_IE_SessionId(sid)),
+ valueof(ts_GSUP_IE_Cause(cause))
+ }
+);
+template GSUP_PDU tr_GSUP_PROC_SS_ERR(
+ template hexstring imsi,
+ template OCT4 sid := ?,
+ template integer cause := ?
+) := tr_GSUP(
+ OSMO_GSUP_MSGT_PROC_SS_ERROR,
+ {
+ tr_GSUP_IE_IMSI(imsi),
+ tr_GSUP_IE_SessionId(sid),
+ tr_GSUP_IE_Cause(cause)
+ }
+);
} with { encode "RAW"; variant "FIELDORDER(msb)" }