Change in libosmocore[master]: GSUP: introduce new InvokeID Information Element

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue Nov 6 15:29:59 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/11633


Change subject: GSUP: introduce new InvokeID Information Element
......................................................................

GSUP: introduce new InvokeID Information Element

Each invoke component in TCAP is identified by an unique InvokeID,
assigned by the application that originates the invoke. The
InvokeID is returned in the response, and allows the originator
to correlate the reply with the invoke operation to which
it belongs.

Since GSUP has no TCAP layer, there are optional SESSION_ID and
SESSION_STATE IEs aimed to 'emulate' the dialog. This change
introduces the new optional INVOKE_ID IE.

InvokeID is required in order to support multy-part SMS over GSUP.

Change-Id: If14006b035ff465b73b39ea4cd59e5fd16a4d7ff
Related: OS#3587
---
M TODO-RELEASE
M include/osmocom/gsm/gsup.h
M src/gsm/gsup.c
M tests/gsup/gsup_test.c
M tests/gsup/gsup_test.err
5 files changed, 33 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/11633/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index a4c48ca..4bed90d 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -11,3 +11,4 @@
 libosmogsm	gsm48_push_l3hdr()	(re)introduced in gsm/gsm48.h (GSM 04.08 API)
 libosmogsm	gsm48_push_l3hdr_tid()	a wrapper around gsm48_push_l3hdr()
 libosmogsm	osmo_gsup_message	extended with SMS related fields
+libosmogsm	osmo_gsup_message	extended with InvokeID
diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index f314672..867b409 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -86,6 +86,7 @@
 
 	OSMO_GSUP_SESSION_ID_IE			= 0x30,
 	OSMO_GSUP_SESSION_STATE_IE		= 0x31,
+	OSMO_GSUP_INVOKE_ID_IE			= 0x32,
 
 	/*! Supplementary Services payload */
 	OSMO_GSUP_SS_INFO_IE			= 0x35,
@@ -223,6 +224,9 @@
 	/*! Unique session identifier and origination flag.
 	 * Encoded only when \ref session_state != 0x00 */
 	uint32_t			session_id;
+	/*! InvokeID, maps REQ/RES pairs within a single session.
+	 * Encoded only when \ref invoke_id != NULL */
+	int8_t				*invoke_id;
 
 	/*! ASN.1 encoded MAP payload for Supplementary Services */
 	uint8_t				*ss_info;
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index dbab424..5555d68 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -448,6 +448,10 @@
 			gsup_msg->session_state = *value;
 			break;
 
+		case OSMO_GSUP_INVOKE_ID_IE:
+			gsup_msg->invoke_id = (int8_t *) value;
+			break;
+
 		case OSMO_GSUP_SS_INFO_IE:
 			gsup_msg->ss_info = value;
 			gsup_msg->ss_info_len = value_len;
@@ -657,6 +661,12 @@
 		msgb_tlv_put(msg, OSMO_GSUP_SESSION_STATE_IE, sizeof(u8), &u8);
 	}
 
+	if (gsup_msg->invoke_id) {
+		uint8_t *invoke_id = (uint8_t *) gsup_msg->invoke_id;
+		msgb_tlv_put(msg, OSMO_GSUP_INVOKE_ID_IE,
+				sizeof(*invoke_id), invoke_id);
+	}
+
 	if (gsup_msg->ss_info) {
 		msgb_tlv_put(msg, OSMO_GSUP_SS_INFO_IE,
 				gsup_msg->ss_info_len, gsup_msg->ss_info);
diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c
index 4eef483..a8c0b4e 100644
--- a/tests/gsup/gsup_test.c
+++ b/tests/gsup/gsup_test.c
@@ -226,6 +226,8 @@
 			0xde, 0xad, 0xbe, 0xef,
 		0x31, 0x01, /* Session state (BEGIN) */
 			0x01,
+		0x32, 0x01, /* InvokeID */
+			0xfa,
 
 		/* SM related IEs */
 		0x40, 0x09, /* SM-RP-DA (Destination Address) */
@@ -246,6 +248,8 @@
 			0xde, 0xad, 0xbe, 0xef,
 		0x31, 0x01, /* Session state (BEGIN) */
 			0x01,
+		0x32, 0x01, /* InvokeID */
+			0xfa,
 
 		/* SM related IEs */
 		0x40, 0x0a, /* SM-RP-DA (Destination Address) */
@@ -267,6 +271,8 @@
 			0xde, 0xad, 0xbe, 0xef,
 		0x31, 0x01, /* Session state (END) */
 			0x03,
+		0x32, 0x01, /* InvokeID */
+			0xfa,
 
 		/* SM related IEs */
 		0x42, 0x04, /* SM-RP-UI (TPDU) */
diff --git a/tests/gsup/gsup_test.err b/tests/gsup/gsup_test.err
index 37aa4ce..864b6af 100644
--- a/tests/gsup/gsup_test.err
+++ b/tests/gsup/gsup_test.err
@@ -49,14 +49,14 @@
   generated message: 22 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 03 35 08 a3 06 02 01 01 02 01 47 
   original message:  22 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 03 35 08 a3 06 02 01 01 02 01 47 
   IMSI:              123456789012345
-  generated message: 24 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 40 09 03 07 91 52 75 47 99 09 82 41 02 ff 00 42 04 de ad be ef 
-  original message:  24 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 40 09 03 07 91 52 75 47 99 09 82 41 02 ff 00 42 04 de ad be ef 
+  generated message: 24 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 32 01 fa 40 09 03 07 91 52 75 47 99 09 82 41 02 ff 00 42 04 de ad be ef 
+  original message:  24 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 32 01 fa 40 09 03 07 91 52 75 47 99 09 82 41 02 ff 00 42 04 de ad be ef 
   IMSI:              123456789012345
-  generated message: 28 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 40 0a 01 08 21 43 65 87 09 21 43 f5 41 09 03 07 91 52 75 47 99 09 82 42 04 de ad be ef 
-  original message:  28 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 40 0a 01 08 21 43 65 87 09 21 43 f5 41 09 03 07 91 52 75 47 99 09 82 42 04 de ad be ef 
+  generated message: 28 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 32 01 fa 40 0a 01 08 21 43 65 87 09 21 43 f5 41 09 03 07 91 52 75 47 99 09 82 42 04 de ad be ef 
+  original message:  28 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 01 32 01 fa 40 0a 01 08 21 43 65 87 09 21 43 f5 41 09 03 07 91 52 75 47 99 09 82 42 04 de ad be ef 
   IMSI:              123456789012345
-  generated message: 2a 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 03 42 04 de ad be ef 
-  original message:  2a 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 03 42 04 de ad be ef 
+  generated message: 2a 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 03 32 01 fa 42 04 de ad be ef 
+  original message:  2a 01 08 21 43 65 87 09 21 43 f5 30 04 de ad be ef 31 01 03 32 01 fa 42 04 de ad be ef 
   IMSI:              123456789012345
   message 0: tested 11 truncations, 11 parse failures
   message 1: tested 14 truncations, 13 parse failures
@@ -75,9 +75,9 @@
   message 14: tested 20 truncations, 18 parse failures
   message 15: tested 42 truncations, 39 parse failures
   message 16: tested 30 truncations, 27 parse failures
-  message 17: tested 41 truncations, 36 parse failures
-  message 18: tested 49 truncations, 44 parse failures
-  message 19: tested 26 truncations, 23 parse failures
+  message 17: tested 44 truncations, 38 parse failures
+  message 18: tested 52 truncations, 46 parse failures
+  message 19: tested 29 truncations, 25 parse failures
 DLGSUP Stopping DLGSUP logging
   message 0: tested 2816 modifications, 510 parse failures
   message 1: tested 3584 modifications, 770 parse failures
@@ -96,6 +96,6 @@
   message 14: tested 5120 modifications, 1030 parse failures
   message 15: tested 10752 modifications, 1262 parse failures
   message 16: tested 7680 modifications, 1271 parse failures
-  message 17: tested 10496 modifications, 2557 parse failures
-  message 18: tested 12544 modifications, 2304 parse failures
-  message 19: tested 6656 modifications, 1289 parse failures
+  message 17: tested 11264 modifications, 2812 parse failures
+  message 18: tested 13312 modifications, 2559 parse failures
+  message 19: tested 7424 modifications, 1546 parse failures

-- 
To view, visit https://gerrit.osmocom.org/11633
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If14006b035ff465b73b39ea4cd59e5fd16a4d7ff
Gerrit-Change-Number: 11633
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181106/cf323a54/attachment-0001.html>


More information about the gerrit-log mailing list