<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12860">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">GSUP: add inter-MSC handover related msgs and IEs<br><br>Based on a draft created by Neels, which is the result of reading a MAP<br>trace of two MSCs negotiating inter-MSC handovers, and of reading the<br>TS 29.002, TS 29.010 and related specs:<br>https://lists.osmocom.org/pipermail/openbsc/2019-January/012653.html<br><br>I figured out that the "Handover Number" mentioned in the specifications<br>is the same as the MSISDN IE that we already have, so we can use that<br>instead of creating a new IE (example usage in tests/gsup/gsup_test.c).<br><br>Related: OS#3774<br>Change-Id: Ic00b0601eacff6d72927cea51767801142ee75db<br>---<br>M include/osmocom/gsm/gsup.h<br>A include/osmocom/gsm/gsup_handover.h<br>M src/gsm/Makefile.am<br>M src/gsm/gsup.c<br>A src/gsm/gsup_handover.c<br>M src/gsm/libosmogsm.map<br>M tests/gsup/gsup_test.c<br>M tests/gsup/gsup_test.err<br>M tests/gsup/gsup_test.ok<br>9 files changed, 599 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/12860/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h</span><br><span>index 29ea11a..8cd737b 100644</span><br><span>--- a/include/osmocom/gsm/gsup.h</span><br><span>+++ b/include/osmocom/gsm/gsup.h</span><br><span>@@ -40,9 +40,12 @@</span><br><span> </span><br><span> #include <stdint.h></span><br><span> #include <osmocom/core/msgb.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/gsup_handover.h></span><br><span> #include <osmocom/gsm/gsup_sms.h></span><br><span> #include <osmocom/gsm/protocol/gsm_23_003.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/protocol/gsm_03_40.h></span><br><span> #include <osmocom/gsm/protocol/gsm_04_08_gprs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/protocol/gsm_08_08.h></span><br><span> #include <osmocom/crypt/auth.h></span><br><span> </span><br><span> #define OSMO_GSUP_PORT 4222</span><br><span>@@ -102,6 +105,14 @@</span><br><span>         OSMO_GSUP_IMEI_IE                       = 0x50,</span><br><span>      OSMO_GSUP_IMEI_RESULT_IE                = 0x51,</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   /* Inter-MSC handover related */</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_GSUP_SOURCE_NAME_IE                = 0x60,</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_GSUP_DESTINATION_NAME_IE           = 0x61,</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_GSUP_AN_APDU_IE                    = 0x62,</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_GSUP_CAUSE_RR_IE                   = 0x63,</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_GSUP_CAUSE_BSSAP_IE                = 0x64,</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_GSUP_CAUSE_SM_IE                   = 0x65,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    _OSMO_GSUP_IEI_END_MARKER</span><br><span> };</span><br><span> </span><br><span>@@ -163,6 +174,27 @@</span><br><span>   OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST       = 0b00110000,</span><br><span>        OSMO_GSUP_MSGT_CHECK_IMEI_ERROR         = 0b00110001,</span><br><span>        OSMO_GSUP_MSGT_CHECK_IMEI_RESULT        = 0b00110010,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST               = 0b001100100,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_ERROR                 = 0b001100101,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_RESULT                = 0b001100110,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_REQUEST    = 0b001101000,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_ERROR      = 0b001101001,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_RESULT     = 0b001101010,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_REQUEST        = 0b001101100,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_ERROR          = 0b001101101,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_RESULT         = 0b001101110,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_REQUEST      = 0b001110000,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_ERROR        = 0b001110010,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_REQUEST      = 0b001110100,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_ERROR        = 0b001110110,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_GSUP_MSGT_E_CLOSE                                  = 0b001110111,</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_GSUP_MSGT_E_ABORT                                  = 0b001111011,</span><br><span> };</span><br><span> </span><br><span> #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00)</span><br><span>@@ -189,6 +221,12 @@</span><br><span>       OSMO_GSUP_IMEI_RESULT_NACK              = 2, /* on wire: 1 */</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* 3GPP 29.002 AccessNetworkProtocolId */</span><br><span style="color: hsl(120, 100%, 40%);">+enum osmo_gsup_access_network_protocol {</span><br><span style="color: hsl(120, 100%, 40%);">+  OSMO_GSUP_ACCESS_NETWORK_PROTOCOL_TS3G_48006 = 1,</span><br><span style="color: hsl(120, 100%, 40%);">+     OSMO_GSUP_ACCESS_NETWORK_PROTOCOL_TS3G_25413 = 2,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! TCAP-like session state */</span><br><span> enum osmo_gsup_session_state {</span><br><span>  /*! Undefined session state */</span><br><span>@@ -229,6 +267,12 @@</span><br><span>        size_t                          pdp_charg_enc_len;</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+struct osmo_gsup_an_apdu {</span><br><span style="color: hsl(120, 100%, 40%);">+      enum osmo_gsup_access_network_protocol access_network_proto;</span><br><span style="color: hsl(120, 100%, 40%);">+  void *data;</span><br><span style="color: hsl(120, 100%, 40%);">+   size_t data_len;</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! parsed/decoded GSUP protocol message */</span><br><span> struct osmo_gsup_message {</span><br><span>  enum osmo_gsup_message_type     message_type;</span><br><span>@@ -286,6 +330,15 @@</span><br><span>         const uint8_t                   *imei_enc;</span><br><span>   size_t                          imei_enc_len;</span><br><span>        enum osmo_gsup_imei_result      imei_result;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        const uint8_t                   *source_name;</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t                          source_name_len;</span><br><span style="color: hsl(120, 100%, 40%);">+      const uint8_t                   *destination_name;</span><br><span style="color: hsl(120, 100%, 40%);">+    size_t                          destination_name_len;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct osmo_gsup_an_apdu        an_apdu;</span><br><span style="color: hsl(120, 100%, 40%);">+      uint8_t                         cause_rr;</span><br><span style="color: hsl(120, 100%, 40%);">+     enum gsm0808_cause              cause_bssap;</span><br><span style="color: hsl(120, 100%, 40%);">+  enum gsm48_gsm_cause            cause_sm;</span><br><span> };</span><br><span> </span><br><span> int osmo_gsup_decode(const uint8_t *data, size_t data_len,</span><br><span>diff --git a/include/osmocom/gsm/gsup_handover.h b/include/osmocom/gsm/gsup_handover.h</span><br><span>new file mode 100644</span><br><span>index 0000000..acb6b65</span><br><span>--- /dev/null</span><br><span>+++ b/include/osmocom/gsm/gsup_handover.h</span><br><span>@@ -0,0 +1,21 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#pragma once</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! \addtogroup gsup</span><br><span style="color: hsl(120, 100%, 40%);">+ *  @{</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ *  This header defines the handover extensions for Osmocom GSUP (Generic</span><br><span style="color: hsl(120, 100%, 40%);">+ *  Subscriber Update Protocol). The scope of this module is defined by</span><br><span style="color: hsl(120, 100%, 40%);">+ *  3GPP TS 29.002, section 19.2.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ *  \file gsup_handover.h</span><br><span style="color: hsl(120, 100%, 40%);">+ *  Handover extensions for Osmocom GSUP. */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <stdint.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct osmo_gsup_message;</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int osmo_gsup_handover_encode_an_apdu(struct msgb *msg, const struct osmo_gsup_message *gsup_msg);</span><br><span style="color: hsl(120, 100%, 40%);">+int osmo_gsup_handover_decode_an_apdu(struct osmo_gsup_message *gsup_msg, uint8_t *data, size_t data_len);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! @} */</span><br><span>diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am</span><br><span>index 9066500..12d8fa0 100644</span><br><span>--- a/src/gsm/Makefile.am</span><br><span>+++ b/src/gsm/Makefile.am</span><br><span>@@ -30,7 +30,7 @@</span><br><span>                  auth_milenage.c milenage/aes-encblock.c gea.c \</span><br><span>                      milenage/aes-internal.c milenage/aes-internal-enc.c \</span><br><span>                        milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \</span><br><span style="color: hsl(0, 100%, 40%);">-                       gsup.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \</span><br><span style="color: hsl(120, 100%, 40%);">+                   gsup.c gsup_handover.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \</span><br><span>                  gsm23003.c mncc.c bts_features.c oap_client.c \</span><br><span>                      gsm29118.c</span><br><span> libgsmint_la_LDFLAGS = -no-undefined</span><br><span>diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c</span><br><span>index a089322..1df1f1b 100644</span><br><span>--- a/src/gsm/gsup.c</span><br><span>+++ b/src/gsm/gsup.c</span><br><span>@@ -83,6 +83,27 @@</span><br><span>         OSMO_VALUE_STRING(OSMO_GSUP_MSGT_CHECK_IMEI_ERROR),</span><br><span>  OSMO_VALUE_STRING(OSMO_GSUP_MSGT_CHECK_IMEI_RESULT),</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST),</span><br><span style="color: hsl(120, 100%, 40%);">+ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_ERROR),</span><br><span style="color: hsl(120, 100%, 40%);">+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_RESULT),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_REQUEST),</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_ERROR),</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_RESULT),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_REQUEST),</span><br><span style="color: hsl(120, 100%, 40%);">+  OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_ERROR),</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_RESULT),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_REQUEST),</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_ERROR),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_REQUEST),</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_ERROR),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_CLOSE),</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_ABORT),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         { 0, NULL }</span><br><span> };</span><br><span> </span><br><span>@@ -477,6 +498,35 @@</span><br><span>                         gsup_msg->imei_result = osmo_decode_big_endian(value, value_len) + 1;</span><br><span>                     break;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+            case OSMO_GSUP_SOURCE_NAME_IE:</span><br><span style="color: hsl(120, 100%, 40%);">+                        gsup_msg->source_name = value;</span><br><span style="color: hsl(120, 100%, 40%);">+                     gsup_msg->source_name_len = value_len;</span><br><span style="color: hsl(120, 100%, 40%);">+                     break;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              case OSMO_GSUP_DESTINATION_NAME_IE:</span><br><span style="color: hsl(120, 100%, 40%);">+                   gsup_msg->destination_name = value;</span><br><span style="color: hsl(120, 100%, 40%);">+                        gsup_msg->destination_name_len = value_len;</span><br><span style="color: hsl(120, 100%, 40%);">+                        break;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              case OSMO_GSUP_AN_APDU_IE:</span><br><span style="color: hsl(120, 100%, 40%);">+                    rc = osmo_gsup_handover_decode_an_apdu(gsup_msg, value, value_len);</span><br><span style="color: hsl(120, 100%, 40%);">+                   if (rc)</span><br><span style="color: hsl(120, 100%, 40%);">+                               return rc;</span><br><span style="color: hsl(120, 100%, 40%);">+                    break;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              case OSMO_GSUP_CAUSE_RR_IE:</span><br><span style="color: hsl(120, 100%, 40%);">+                   gsup_msg->cause_rr = osmo_decode_big_endian(value, value_len);</span><br><span style="color: hsl(120, 100%, 40%);">+                     break;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              case OSMO_GSUP_CAUSE_BSSAP_IE:</span><br><span style="color: hsl(120, 100%, 40%);">+                        gsup_msg->cause_bssap = osmo_decode_big_endian(value, value_len);</span><br><span style="color: hsl(120, 100%, 40%);">+                  break;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              case OSMO_GSUP_CAUSE_SM_IE:</span><br><span style="color: hsl(120, 100%, 40%);">+                   gsup_msg->cause_sm = osmo_decode_big_endian(value, value_len);</span><br><span style="color: hsl(120, 100%, 40%);">+                     break;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>           default:</span><br><span>                     LOGP(DLGSUP, LOGL_NOTICE,</span><br><span>                         "GSUP IE type %d unknown\n", iei);</span><br><span>@@ -718,6 +768,31 @@</span><br><span>             msgb_tlv_put(msg, OSMO_GSUP_IMEI_RESULT_IE, sizeof(u8), &u8);</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (gsup_msg->source_name)</span><br><span style="color: hsl(120, 100%, 40%);">+         msgb_tlv_put(msg, OSMO_GSUP_SOURCE_NAME_IE, gsup_msg->source_name_len, gsup_msg->source_name);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        if (gsup_msg->destination_name)</span><br><span style="color: hsl(120, 100%, 40%);">+            msgb_tlv_put(msg, OSMO_GSUP_DESTINATION_NAME_IE, gsup_msg->destination_name_len,</span><br><span style="color: hsl(120, 100%, 40%);">+                        gsup_msg->destination_name);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        if (gsup_msg->an_apdu.access_network_proto || gsup_msg->an_apdu.data_len) {</span><br><span style="color: hsl(120, 100%, 40%);">+             rc = osmo_gsup_handover_encode_an_apdu(msg, gsup_msg);</span><br><span style="color: hsl(120, 100%, 40%);">+                if (rc) {</span><br><span style="color: hsl(120, 100%, 40%);">+                     LOGP(DLGSUP, LOGL_ERROR, "Failed to encode AN-apdu IE \n");</span><br><span style="color: hsl(120, 100%, 40%);">+                 return -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if ((u8 = gsup_msg->cause_rr))</span><br><span style="color: hsl(120, 100%, 40%);">+             msgb_tlv_put(msg, OSMO_GSUP_CAUSE_RR_IE, sizeof(u8), &u8);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      if ((u8 = gsup_msg->cause_bssap))</span><br><span style="color: hsl(120, 100%, 40%);">+          msgb_tlv_put(msg, OSMO_GSUP_CAUSE_BSSAP_IE, sizeof(u8), &u8);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if ((u8 = gsup_msg->cause_sm))</span><br><span style="color: hsl(120, 100%, 40%);">+             msgb_tlv_put(msg, OSMO_GSUP_CAUSE_SM_IE, sizeof(u8), &u8);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   return 0;</span><br><span> }</span><br><span> </span><br><span>diff --git a/src/gsm/gsup_handover.c b/src/gsm/gsup_handover.c</span><br><span>new file mode 100644</span><br><span>index 0000000..a9a478f</span><br><span>--- /dev/null</span><br><span>+++ b/src/gsm/gsup_handover.c</span><br><span>@@ -0,0 +1,79 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * (C) 2019 by Oliver Smith <osmith@sysmocom.de></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * All Rights Reserved</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; either version 2 of the License, or</span><br><span style="color: hsl(120, 100%, 40%);">+ * (at your option) any later version.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * You should have received a copy of the GNU General Public License</span><br><span style="color: hsl(120, 100%, 40%);">+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <stdint.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <string.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <errno.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/logging.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/msgb.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/gsup.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/tlv.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! \addtogroup gsup</span><br><span style="color: hsl(120, 100%, 40%);">+ *  @{</span><br><span style="color: hsl(120, 100%, 40%);">+ *  \file gsup_handover.c</span><br><span style="color: hsl(120, 100%, 40%);">+ *  Handover extensions for Osmocom GSUP.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! Encode AN-apdu (see 7.6.9.1).</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[out] msg      target message buffer (caller-allocated)</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in]  gsup_msg abstract GSUP message structure</span><br><span style="color: hsl(120, 100%, 40%);">+ * \returns 0 in case of success, negative in case of error</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+int osmo_gsup_handover_encode_an_apdu(struct msgb *msg, const struct osmo_gsup_message *gsup_msg)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  const struct osmo_gsup_an_apdu an_apdu = gsup_msg->an_apdu;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Tag and total length */</span><br><span style="color: hsl(120, 100%, 40%);">+    msgb_tv_put(msg, OSMO_GSUP_AN_APDU_IE, 1 + an_apdu.data_len);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Put access_network_proto */</span><br><span style="color: hsl(120, 100%, 40%);">+        msgb_v_put(msg, an_apdu.access_network_proto);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Put data */</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t* buf = msgb_put(msg, an_apdu.data_len);</span><br><span style="color: hsl(120, 100%, 40%);">+       memcpy(buf, an_apdu.data, an_apdu.data_len);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! Decode AN-apdu (see 7.6.9.1).</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[out] gsup_msg abstract GSUP message structure</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in]  data     pointer to the raw IE payload</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in]  data_len length of IE pointed by \ref data</span><br><span style="color: hsl(120, 100%, 40%);">+ * \returns 0 in case of success, negative in case of error</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+int osmo_gsup_handover_decode_an_apdu(struct osmo_gsup_message *gsup_msg, uint8_t *data, size_t data_len)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  if (data_len < 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+                LOGP(DLGSUP, LOGL_ERROR, "Corrupted an_apdu message (length must be >= 1)\n");</span><br><span style="color: hsl(120, 100%, 40%);">+           return -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   gsup_msg->an_apdu.access_network_proto = data[0];</span><br><span style="color: hsl(120, 100%, 40%);">+  gsup_msg->an_apdu.data_len = data_len -1;</span><br><span style="color: hsl(120, 100%, 40%);">+  gsup_msg->an_apdu.data = data + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! @} */</span><br><span>diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map</span><br><span>index ae7c0a1..0c4ebbd 100644</span><br><span>--- a/src/gsm/libosmogsm.map</span><br><span>+++ b/src/gsm/libosmogsm.map</span><br><span>@@ -548,6 +548,9 @@</span><br><span> osmo_gsup_session_state_names;</span><br><span> osmo_gsup_get_err_msg_type;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+osmo_gsup_handover_encode_an_apdu;</span><br><span style="color: hsl(120, 100%, 40%);">+osmo_gsup_handover_decode_an_apdu;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> osmo_gsup_sms_encode_sm_rp_da;</span><br><span> osmo_gsup_sms_decode_sm_rp_da;</span><br><span> osmo_gsup_sms_encode_sm_rp_oa;</span><br><span>diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c</span><br><span>index 4ad7431..49981c5 100644</span><br><span>--- a/tests/gsup/gsup_test.c</span><br><span>+++ b/tests/gsup/gsup_test.c</span><br><span>@@ -9,8 +9,14 @@</span><br><span> </span><br><span> /* Tests for osmo_gsup_messages.c */</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Complete IEs used multiple times (sorted alphabetically)</span><br><span style="color: hsl(120, 100%, 40%);">+ * 1st byte: IEI from osmo_gsup_iei, 2nd byte: length */</span><br><span style="color: hsl(120, 100%, 40%);">+#define TEST_AN_APDU_IE 0x62, 0x05, 0x01, 0x42, 0x42, 0x42, 0x42</span><br><span style="color: hsl(120, 100%, 40%);">+#define TEST_DESTINATION_NAME_IE 0x61, 0x05, 'M', 'S', 'C', '-', 'B'</span><br><span> #define TEST_IMSI_IE 0x01, 0x08, 0x21, 0x43, 0x65, 0x87, 0x09, 0x21, 0x43, 0xf5</span><br><span> #define TEST_IMSI_STR "123456789012345"</span><br><span style="color: hsl(120, 100%, 40%);">+#define TEST_MSISDN_IE 0x08, 0x07, 0x91, 0x94, 0x61, 0x46, 0x32, 0x24, 0x43</span><br><span style="color: hsl(120, 100%, 40%);">+#define TEST_SOURCE_NAME_IE 0x60, 0x05, 'M', 'S', 'C', '-', 'A'</span><br><span> </span><br><span> static void test_gsup_messages_dec_enc(void)</span><br><span> {</span><br><span>@@ -64,8 +70,7 @@</span><br><span>  static const uint8_t update_location_res[] = {</span><br><span>               0x06,</span><br><span>                TEST_IMSI_IE,</span><br><span style="color: hsl(0, 100%, 40%);">-           0x08, 0x07, /* MSISDN of the subscriber */</span><br><span style="color: hsl(0, 100%, 40%);">-                      0x91, 0x94, 0x61, 0x46, 0x32, 0x24, 0x43,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_MSISDN_IE,</span><br><span>              0x09, 0x07, /* HLR-Number of the subscriber */</span><br><span>                       0x91, 0x83, 0x52, 0x38, 0x48, 0x83, 0x93,</span><br><span>            0x04, 0x00, /* PDP info complete */</span><br><span>@@ -310,6 +315,229 @@</span><br><span>                  0x00, /* OSMO_GSUP_IMEI_RESULT_ACK */</span><br><span>        };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        /* Handover related test messages. Oftentimes they only differ in the</span><br><span style="color: hsl(120, 100%, 40%);">+  * AN_APDU_IE, which is mostly a blob in GSUP. To give a better example</span><br><span style="color: hsl(120, 100%, 40%);">+        * of how the messages can be used, I've added the information an_apdu</span><br><span style="color: hsl(120, 100%, 40%);">+     * holds in brackets (see osmo-msc.git's doc/interMSC_HO_GSUP_msgs.txt).</span><br><span style="color: hsl(120, 100%, 40%);">+   * The session states are from the ASCII art in this e-mail:</span><br><span style="color: hsl(120, 100%, 40%);">+   * https://lists.osmocom.org/pipermail/openbsc/2019-January/012653.html */</span><br><span style="color: hsl(120, 100%, 40%);">+    static const uint8_t send_e_prepare_handover_req [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+               0x64, /* OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST */</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (begin) */</span><br><span style="color: hsl(120, 100%, 40%);">+            0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Request) */</span><br><span style="color: hsl(120, 100%, 40%);">+     };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_handover_err [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+               0x65, /* OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_ERROR */</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* cause_bssap */</span><br><span style="color: hsl(120, 100%, 40%);">+             0x64, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+                   0x51, /* GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_handover_res [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+               0x66, /* OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_RESULT */</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Request Ack) */</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_subsequent_handover_req [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+            0x68, /* OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_REQUEST */</span><br><span style="color: hsl(120, 100%, 40%);">+              TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (begin) */</span><br><span style="color: hsl(120, 100%, 40%);">+            0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Required) */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_subsequent_handover_err [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+            0x69, /* OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_ERROR */</span><br><span style="color: hsl(120, 100%, 40%);">+                TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* cause_bssap */</span><br><span style="color: hsl(120, 100%, 40%);">+             0x64, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+                   0x51, /* GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_subsequent_handover_res [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+            0x6A, /* OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_RESULT */</span><br><span style="color: hsl(120, 100%, 40%);">+               TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Request Ack) */</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_send_end_signal_req [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+                0x6C, /* OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_REQUEST */</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (end) */</span><br><span style="color: hsl(120, 100%, 40%);">+              0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Complete) */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_send_end_signal_err [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+                0x6D, /* OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_ERROR */</span><br><span style="color: hsl(120, 100%, 40%);">+            TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* cause_bssap */</span><br><span style="color: hsl(120, 100%, 40%);">+             0x64, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+                   0x51, /* GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_prepare_send_end_signal_res [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+                0x6E, /* OSMO_GSUP_MSGT_E_PREPARE_SEND_END_SIGNAL_RESULT */</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (end) */</span><br><span style="color: hsl(120, 100%, 40%);">+              0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Complete) */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_process_access_signalling_req [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+              0x70, /* OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_REQUEST */</span><br><span style="color: hsl(120, 100%, 40%);">+                TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (Handover Detect) */</span><br><span style="color: hsl(120, 100%, 40%);">+      };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_process_access_signalling_err [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+              0x71, /* OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_ERROR */</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* cause_bssap */</span><br><span style="color: hsl(120, 100%, 40%);">+             0x64, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+                   0x51, /* GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_forward_access_signalling_req [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+              0x74, /* OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_REQUEST */</span><br><span style="color: hsl(120, 100%, 40%);">+                TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+         TEST_MSISDN_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+             TEST_AN_APDU_IE, /* (DTAP, e.g. CC, SMS, ...) */</span><br><span style="color: hsl(120, 100%, 40%);">+      };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_forward_access_signalling_err [] = {</span><br><span style="color: hsl(120, 100%, 40%);">+              0x75, /* OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_ERROR */</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (continue) */</span><br><span style="color: hsl(120, 100%, 40%);">+         0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* cause_bssap */</span><br><span style="color: hsl(120, 100%, 40%);">+             0x64, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+                   0x51, /* GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_close[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+               0x77, /* OSMO_GSUP_MSGT_E_CLOSE */</span><br><span style="color: hsl(120, 100%, 40%);">+            TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (end) */</span><br><span style="color: hsl(120, 100%, 40%);">+              0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           TEST_SOURCE_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+          TEST_DESTINATION_NAME_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+     };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  static const uint8_t send_e_abort[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+               0x7B, /* OSMO_GSUP_MSGT_E_ABORT */</span><br><span style="color: hsl(120, 100%, 40%);">+            TEST_IMSI_IE,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Session ID and state (end) */</span><br><span style="color: hsl(120, 100%, 40%);">+              0x30, 0x04, 0xd3, 0xad, 0xbe, 0xef,</span><br><span style="color: hsl(120, 100%, 40%);">+           0x31, 0x01, 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* cause_bssap */</span><br><span style="color: hsl(120, 100%, 40%);">+             0x64, 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+                   0x51, /* GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS */</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         static const struct test {</span><br><span>           char *name;</span><br><span>          const uint8_t *data;</span><br><span>@@ -365,6 +593,36 @@</span><br><span>                  send_check_imei_err, sizeof(send_check_imei_err)},</span><br><span>           {"Check IMEI Result",</span><br><span>                      send_check_imei_res, sizeof(send_check_imei_res)},</span><br><span style="color: hsl(120, 100%, 40%);">+            {"E Prepare Handover Request",</span><br><span style="color: hsl(120, 100%, 40%);">+                      send_e_prepare_handover_req, sizeof(send_e_prepare_handover_req)},</span><br><span style="color: hsl(120, 100%, 40%);">+            {"E Prepare Handover Error",</span><br><span style="color: hsl(120, 100%, 40%);">+                        send_e_prepare_handover_err, sizeof(send_e_prepare_handover_err)},</span><br><span style="color: hsl(120, 100%, 40%);">+            {"E Prepare Handover Result",</span><br><span style="color: hsl(120, 100%, 40%);">+                       send_e_prepare_handover_res, sizeof(send_e_prepare_handover_res)},</span><br><span style="color: hsl(120, 100%, 40%);">+            {"E Prepare Subsequent Handover Request",</span><br><span style="color: hsl(120, 100%, 40%);">+                   send_e_prepare_subsequent_handover_req, sizeof(send_e_prepare_subsequent_handover_req)},</span><br><span style="color: hsl(120, 100%, 40%);">+              {"E Prepare Subsequent Handover Error",</span><br><span style="color: hsl(120, 100%, 40%);">+                     send_e_prepare_subsequent_handover_err, sizeof(send_e_prepare_subsequent_handover_err)},</span><br><span style="color: hsl(120, 100%, 40%);">+              {"E Prepare Subsequent Handover Result",</span><br><span style="color: hsl(120, 100%, 40%);">+                    send_e_prepare_subsequent_handover_res, sizeof(send_e_prepare_subsequent_handover_res)},</span><br><span style="color: hsl(120, 100%, 40%);">+              {"E Prepare Send End Signal Request",</span><br><span style="color: hsl(120, 100%, 40%);">+                       send_e_prepare_send_end_signal_req, sizeof(send_e_prepare_send_end_signal_req)},</span><br><span style="color: hsl(120, 100%, 40%);">+              {"E Prepare Send End Signal Error",</span><br><span style="color: hsl(120, 100%, 40%);">+                 send_e_prepare_send_end_signal_err, sizeof(send_e_prepare_send_end_signal_err)},</span><br><span style="color: hsl(120, 100%, 40%);">+              {"E Prepare Send End Signal Result",</span><br><span style="color: hsl(120, 100%, 40%);">+                        send_e_prepare_send_end_signal_res, sizeof(send_e_prepare_send_end_signal_res)},</span><br><span style="color: hsl(120, 100%, 40%);">+              {"E Process Access Signalling Request",</span><br><span style="color: hsl(120, 100%, 40%);">+                     send_e_process_access_signalling_req, sizeof(send_e_process_access_signalling_req)},</span><br><span style="color: hsl(120, 100%, 40%);">+          {"E Process Access Signalling Error",</span><br><span style="color: hsl(120, 100%, 40%);">+                       send_e_process_access_signalling_err, sizeof(send_e_process_access_signalling_err)},</span><br><span style="color: hsl(120, 100%, 40%);">+          {"E Forward Access Signalling Request",</span><br><span style="color: hsl(120, 100%, 40%);">+                     send_e_forward_access_signalling_req, sizeof(send_e_forward_access_signalling_req)},</span><br><span style="color: hsl(120, 100%, 40%);">+          {"E Forward Access Signalling Error",</span><br><span style="color: hsl(120, 100%, 40%);">+                       send_e_forward_access_signalling_err, sizeof(send_e_forward_access_signalling_err)},</span><br><span style="color: hsl(120, 100%, 40%);">+          {"E Close",</span><br><span style="color: hsl(120, 100%, 40%);">+                 send_e_close, sizeof(send_e_close)},</span><br><span style="color: hsl(120, 100%, 40%);">+          {"E Abort",</span><br><span style="color: hsl(120, 100%, 40%);">+                 send_e_abort, sizeof(send_e_abort)},</span><br><span>         };</span><br><span> </span><br><span>       printf("Test GSUP message decoding/encoding\n");</span><br><span>diff --git a/tests/gsup/gsup_test.err b/tests/gsup/gsup_test.err</span><br><span>index 225735e..0adb538 100644</span><br><span>--- a/tests/gsup/gsup_test.err</span><br><span>+++ b/tests/gsup/gsup_test.err</span><br><span>@@ -73,6 +73,51 @@</span><br><span>   generated message: 32 01 08 21 43 65 87 09 21 43 f5 51 01 00 </span><br><span>   original message:  32 01 08 21 43 65 87 09 21 43 f5 51 01 00 </span><br><span>   IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 64 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 01 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  64 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 01 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 65 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  65 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 66 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  66 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 68 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 01 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  68 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 01 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 69 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  69 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 6a 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  6a 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 6c 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 03 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  6c 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 03 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 6d 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  6d 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 6e 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 03 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  6e 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 03 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 70 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  70 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 71 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  71 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 74 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  74 01 08 21 43 65 87 09 21 43 f5 08 07 91 94 61 46 32 24 43 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 62 05 01 42 42 42 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 75 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  75 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 02 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 77 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 03 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  77 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 03 60 05 4d 53 43 2d 41 61 05 4d 53 43 2d 42 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span style="color: hsl(120, 100%, 40%);">+  generated message: 7b 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 03 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  original message:  7b 01 08 21 43 65 87 09 21 43 f5 30 04 d3 ad be ef 31 01 03 64 01 51 </span><br><span style="color: hsl(120, 100%, 40%);">+  IMSI:              123456789012345</span><br><span>   message 0: tested 11 truncations, 11 parse failures</span><br><span>   message 1: tested 14 truncations, 13 parse failures</span><br><span>   message 2: tested 83 truncations, 81 parse failures</span><br><span>@@ -98,19 +143,34 @@</span><br><span>   message 22: tested 22 truncations, 21 parse failures</span><br><span>   message 23: tested 14 truncations, 13 parse failures</span><br><span>   message 24: tested 14 truncations, 13 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 25: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 26: tested 37 truncations, 32 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 27: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 28: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 29: tested 37 truncations, 32 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 30: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 31: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 32: tested 37 truncations, 32 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 33: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 34: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 35: tested 37 truncations, 32 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 36: tested 50 truncations, 44 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 37: tested 37 truncations, 32 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 38: tested 34 truncations, 30 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 39: tested 23 truncations, 20 parse failures</span><br><span> DLGSUP Stopping DLGSUP logging</span><br><span>   message 0: tested 2816 modifications, 510 parse failures</span><br><span>   message 1: tested 3584 modifications, 770 parse failures</span><br><span>   message 2: tested 21248 modifications, 2575 parse failures</span><br><span>   message 3: tested 2816 modifications, 510 parse failures</span><br><span>   message 4: tested 3584 modifications, 770 parse failures</span><br><span style="color: hsl(0, 100%, 40%);">-  message 5: tested 20736 modifications, 4022 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 5: tested 20736 modifications, 4023 parse failures</span><br><span>   message 6: tested 3584 modifications, 771 parse failures</span><br><span>   message 7: tested 3584 modifications, 770 parse failures</span><br><span>   message 8: tested 2816 modifications, 510 parse failures</span><br><span>   message 9: tested 2816 modifications, 510 parse failures</span><br><span>   message 10: tested 3584 modifications, 770 parse failures</span><br><span style="color: hsl(0, 100%, 40%);">-  message 11: tested 3328 modifications, 769 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 11: tested 3328 modifications, 770 parse failures</span><br><span>   message 12: tested 54016 modifications, 4626 parse failures</span><br><span>   message 13: tested 11520 modifications, 1026 parse failures</span><br><span>   message 14: tested 5120 modifications, 1030 parse failures</span><br><span>@@ -124,3 +184,18 @@</span><br><span>   message 22: tested 5632 modifications, 771 parse failures</span><br><span>   message 23: tested 3584 modifications, 770 parse failures</span><br><span>   message 24: tested 3584 modifications, 771 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 25: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 26: tested 9472 modifications, 1804 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 27: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 28: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 29: tested 9472 modifications, 1804 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 30: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 31: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 32: tested 9472 modifications, 1804 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 33: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 34: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 35: tested 9472 modifications, 1804 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 36: tested 12800 modifications, 2058 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 37: tested 9472 modifications, 1804 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 38: tested 8704 modifications, 1547 parse failures</span><br><span style="color: hsl(120, 100%, 40%);">+  message 39: tested 5888 modifications, 1288 parse failures</span><br><span>diff --git a/tests/gsup/gsup_test.ok b/tests/gsup/gsup_test.ok</span><br><span>index 70f723c..74ca028 100644</span><br><span>--- a/tests/gsup/gsup_test.ok</span><br><span>+++ b/tests/gsup/gsup_test.ok</span><br><span>@@ -49,4 +49,34 @@</span><br><span>           Check IMEI Error OK</span><br><span>   Testing Check IMEI Result</span><br><span>           Check IMEI Result OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Handover Request</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Handover Request OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Handover Error</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Handover Error OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Handover Result</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Handover Result OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Subsequent Handover Request</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Subsequent Handover Request OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Subsequent Handover Error</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Subsequent Handover Error OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Subsequent Handover Result</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Subsequent Handover Result OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Send End Signal Request</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Send End Signal Request OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Send End Signal Error</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Send End Signal Error OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Prepare Send End Signal Result</span><br><span style="color: hsl(120, 100%, 40%);">+          E Prepare Send End Signal Result OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Process Access Signalling Request</span><br><span style="color: hsl(120, 100%, 40%);">+          E Process Access Signalling Request OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Process Access Signalling Error</span><br><span style="color: hsl(120, 100%, 40%);">+          E Process Access Signalling Error OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Forward Access Signalling Request</span><br><span style="color: hsl(120, 100%, 40%);">+          E Forward Access Signalling Request OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Forward Access Signalling Error</span><br><span style="color: hsl(120, 100%, 40%);">+          E Forward Access Signalling Error OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Close</span><br><span style="color: hsl(120, 100%, 40%);">+          E Close OK</span><br><span style="color: hsl(120, 100%, 40%);">+  Testing E Abort</span><br><span style="color: hsl(120, 100%, 40%);">+          E Abort OK</span><br><span> Done.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12860">change 12860</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12860"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic00b0601eacff6d72927cea51767801142ee75db </div>
<div style="display:none"> Gerrit-Change-Number: 12860 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>