summaryrefslogtreecommitdiffstats
path: root/src/gsm/gsup.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-03-31 05:23:09 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-05-31 16:12:14 +0000
commit36c7b33ccc66eee29efa98120e00952532c8e122 (patch)
tree13b207fdb20dca1a0dd78ed8441c70178351e424 /src/gsm/gsup.c
parent72696040dfac41512c672f71f2b3712656641a7f (diff)
GSUP: introduce new messages for SS/USSD payloads
In order to be able to transfer SS/USSD messages via GSUP, this change introduces the following new message types: - OSMO_GSUP_MSGT_PROC_SS_*, and the following new IE: - OSMO_GSUP_SS_INFO_IE which represents an ASN.1 encoded MAP payload coming to/from the mobile station 'as is', without any transcoding. Change-Id: Ie17a78043a35fffbdd59e80fd2b2da39cce5e532 Related: OS#1597
Diffstat (limited to 'src/gsm/gsup.c')
-rw-r--r--src/gsm/gsup.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 8663f449..b4b60b20 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -62,6 +62,11 @@ const struct value_string osmo_gsup_message_type_names[] = {
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST),
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR),
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT),
+
+ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_PROC_SS_REQUEST),
+ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_PROC_SS_ERROR),
+ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_PROC_SS_RESULT),
+
{ 0, NULL }
};
@@ -393,6 +398,11 @@ int osmo_gsup_decode(const uint8_t *const_data, size_t data_len,
gsup_msg->session_state = *value;
break;
+ case OSMO_GSUP_SS_INFO_IE:
+ gsup_msg->ss_info = value;
+ gsup_msg->ss_info_len = value_len;
+ break;
+
default:
LOGP(DLGSUP, LOGL_NOTICE,
"GSUP IE type %d unknown\n", iei);
@@ -580,6 +590,11 @@ int osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg)
msgb_tlv_put(msg, OSMO_GSUP_SESSION_STATE_IE, sizeof(u8), &u8);
}
+ if (gsup_msg->ss_info) {
+ msgb_tlv_put(msg, OSMO_GSUP_SS_INFO_IE,
+ gsup_msg->ss_info_len, gsup_msg->ss_info);
+ }
+
return 0;
}