diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-04-07 02:34:55 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-05-31 16:11:14 +0000 |
commit | 72696040dfac41512c672f71f2b3712656641a7f (patch) | |
tree | f3624970fb112e54df0a528233420b4fb3c6c736 /include/osmocom/gsm | |
parent | 64e807c4bc81624651b970290db1c6a0b03d8eef (diff) |
GSUP: implement TCAP-like session management
Unlike TCAP/MAP, GSUP is just a transport layer without the
dialogue/context. This prevents us from having session based
communication, required e.g. for USSD. But we can emulate
TCAP dialogue by adding additional IEs, which would allow
to relate each message to a particular session.
This change introduces the following IEs:
- OSMO_GSUP_SESSION_ID_IE,
- OSMO_GSUP_SESSION_STATE_IE,
which optionally can be used to indicate that the message is
related to a session with given ID, and to manage session
state, i.e. initiate, continue, and finish.
Change-Id: I1cee271fed0284a134ffed103c0d4bebbcfde2a8
Related: OS#1597
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r-- | include/osmocom/gsm/gsup.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index a7fa8208..5f456991 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -82,6 +82,9 @@ enum osmo_gsup_iei { OSMO_GSUP_AUTS_IE = 0x26, OSMO_GSUP_RES_IE = 0x27, OSMO_GSUP_CN_DOMAIN_IE = 0x28, + + OSMO_GSUP_SESSION_ID_IE = 0x30, + OSMO_GSUP_SESSION_STATE_IE = 0x31, }; /*! GSUP message type */ @@ -132,6 +135,18 @@ enum osmo_gsup_cn_domain { OSMO_GSUP_CN_DOMAIN_CS = 2, }; +/*! TCAP-like session state */ +enum osmo_gsup_session_state { + /*! Undefined session state */ + OSMO_GSUP_SESSION_STATE_NONE = 0x00, + /*! Initiation of a new session */ + OSMO_GSUP_SESSION_STATE_BEGIN = 0x01, + /*! Communication of an existing session */ + OSMO_GSUP_SESSION_STATE_CONTINUE = 0x02, + /*! Indication of the session end */ + OSMO_GSUP_SESSION_STATE_END = 0x03, +}; + /*! parsed/decoded PDP context information */ struct osmo_gsup_pdp_info { unsigned int context_id; @@ -176,6 +191,12 @@ struct osmo_gsup_message { enum osmo_gsup_cn_domain cn_domain; const uint8_t *pdp_charg_enc; size_t pdp_charg_enc_len; + + /*! Session state \ref osmo_gsup_session_state */ + enum osmo_gsup_session_state session_state; + /*! Unique session identifier and origination flag. + * Encoded only when \ref session_state != 0x00 */ + uint32_t session_id; }; int osmo_gsup_decode(const uint8_t *data, size_t data_len, |