<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13578">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BSSMAP: add messages for inter-BSC and inter-MSC Handover<br><br>Change-Id: I9dac375331f6bea744769e973725d58e35f87226<br>---<br>M include/osmocom/gsm/gsm0808.h<br>M src/gsm/gsm0808.c<br>M src/gsm/libosmogsm.map<br>3 files changed, 241 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/13578/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h</span><br><span>index a6c5239..b31f07d 100644</span><br><span>--- a/include/osmocom/gsm/gsm0808.h</span><br><span>+++ b/include/osmocom/gsm/gsm0808.h</span><br><span>@@ -27,6 +27,7 @@</span><br><span> #include <osmocom/gsm/protocol/gsm_08_08.h></span><br><span> #include <osmocom/gsm/gsm0808_utils.h></span><br><span> #include <osmocom/gsm/gsm23003.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/gsm/protocol/gsm_23_003.h></span><br><span> #include <osmocom/core/utils.h></span><br><span> </span><br><span> #define BSSMAP_MSG_SIZE 1024</span><br><span>@@ -143,6 +144,56 @@</span><br><span> };</span><br><span> struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_required *params);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! 3GPP TS 48.008 §3.2.1.37 HANDOVER REQUIRED REJECT */</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm0808_handover_required_reject {</span><br><span style="color: hsl(120, 100%, 40%);">+      uint16_t cause;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* more items are defined in the spec and may be added later */</span><br><span style="color: hsl(120, 100%, 40%);">+       bool more_items; /*< always set this to false */</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_required_reject(const struct gsm0808_handover_required_reject *params);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! 3GPP TS 48.008 §3.2.1.8 HANDOVER REQUEST */</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm0808_handover_request {</span><br><span style="color: hsl(120, 100%, 40%);">+  struct gsm0808_channel_type channel_type;</span><br><span style="color: hsl(120, 100%, 40%);">+     struct gsm0808_encrypt_info encryption_information;</span><br><span style="color: hsl(120, 100%, 40%);">+   struct osmo_gsm48_classmark classmark_information;</span><br><span style="color: hsl(120, 100%, 40%);">+    struct gsm0808_cell_id cell_identifier_serving;</span><br><span style="color: hsl(120, 100%, 40%);">+       struct gsm0808_cell_id cell_identifier_target;</span><br><span style="color: hsl(120, 100%, 40%);">+        enum gsm0808_cause cause;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   bool current_channel_type_1_present;</span><br><span style="color: hsl(120, 100%, 40%);">+  uint8_t current_channel_type_1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     enum gsm0808_permitted_speech speech_version_used;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  uint8_t chosen_encryption_algorithm_serving;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /*! Pass either old_bss_to_new_bss_info or old_bss_to_new_bss_info_raw. */</span><br><span style="color: hsl(120, 100%, 40%);">+    bool old_bss_to_new_bss_info_present;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info;</span><br><span style="color: hsl(120, 100%, 40%);">+       /*! To feed the Old BSS to New BSS Information IE unchanged from the Handover Required message without having to</span><br><span style="color: hsl(120, 100%, 40%);">+       * decode it. Pass either old_bss_to_new_bss_info or old_bss_to_new_bss_info_raw. Omit the TL part. */</span><br><span style="color: hsl(120, 100%, 40%);">+        const uint8_t *old_bss_to_new_bss_info_raw;</span><br><span style="color: hsl(120, 100%, 40%);">+   uint8_t old_bss_to_new_bss_info_raw_len;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    const char *imsi;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   const struct sockaddr_storage *aoip_transport_layer;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        const struct gsm0808_speech_codec_list *codec_list_msc_preferred;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   bool call_id_present;</span><br><span style="color: hsl(120, 100%, 40%);">+ uint32_t call_id;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   const uint8_t *global_call_reference;</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t global_call_reference_len;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* more items are defined in the spec and may be added later */</span><br><span style="color: hsl(120, 100%, 40%);">+       bool more_items; /*!< always set this to false */</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> struct gsm0808_handover_request_ack {</span><br><span>    const uint8_t *l3_info;</span><br><span>      uint8_t l3_info_len;</span><br><span>@@ -170,7 +221,22 @@</span><br><span>                                           uint8_t chosen_channel, uint8_t chosen_encr_alg,</span><br><span>                                             uint8_t chosen_speech_version);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm0808_handover_command {</span><br><span style="color: hsl(120, 100%, 40%);">+       const uint8_t *l3_info;</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t l3_info_len;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        struct gsm0808_cell_id cell_identifier;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     const uint8_t *new_bss_to_old_bss_info_raw;</span><br><span style="color: hsl(120, 100%, 40%);">+   size_t new_bss_to_old_bss_info_raw_len;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* more items are defined in the spec and may be added later */</span><br><span style="color: hsl(120, 100%, 40%);">+       bool more_items; /*!< always set this to false */</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_command(const struct gsm0808_handover_command *params);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> struct msgb *gsm0808_create_handover_detect();</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_succeeded();</span><br><span> </span><br><span> struct gsm0808_handover_complete {</span><br><span>      bool rr_cause_present;</span><br><span>diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c</span><br><span>index b46977b..3c77c77 100644</span><br><span>--- a/src/gsm/gsm0808.c</span><br><span>+++ b/src/gsm/gsm0808.c</span><br><span>@@ -857,6 +857,129 @@</span><br><span>      return msg;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! Create BSSMAP HANDOVER REQUIRED REJECT message.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \returns newly allocated msgb with BSSMAP HANDOVER REQUIRED REJECT message. */</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_required_reject(const struct gsm0808_handover_required_reject *params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  struct msgb *msg;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-REQUIRED-REJECT");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!msg)</span><br><span style="color: hsl(120, 100%, 40%);">+             return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Message Type, 3.2.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_REQUIRED_REJECT);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Cause, 3.2.2.5 */</span><br><span style="color: hsl(120, 100%, 40%);">+  gsm0808_enc_cause(msg, params->cause);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* prepend the header */</span><br><span style="color: hsl(120, 100%, 40%);">+      msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return msg;</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%);">+/*! Create BSSMAP HANDOVER REQUEST message, 3GPP TS 48.008 3.2.1.8.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Sent from the MSC to the potential new target cell during inter-BSC handover, or to the target MSC during inter-MSC</span><br><span style="color: hsl(120, 100%, 40%);">+ * handover.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      struct msgb *msg;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-REQUEST");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!msg)</span><br><span style="color: hsl(120, 100%, 40%);">+             return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Message Type, 3.2.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_RQST);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Channel Type 3.2.2.11 */</span><br><span style="color: hsl(120, 100%, 40%);">+   gsm0808_enc_channel_type(msg, &params->channel_type);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Encryption Information 3.2.2.10 */</span><br><span style="color: hsl(120, 100%, 40%);">+ gsm0808_enc_encrypt_info(msg, &params->encryption_information);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Classmark Information 1 3.2.2.30 or Classmark Information 2 3.2.2.19 (Classmark 2 wins) */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (params->classmark_information.classmark2_len) {</span><br><span style="color: hsl(120, 100%, 40%);">+                msgb_tlv_put(msg, GSM0808_IE_CLASSMARK_INFORMATION_T2,</span><br><span style="color: hsl(120, 100%, 40%);">+                             params->classmark_information.classmark2_len,</span><br><span style="color: hsl(120, 100%, 40%);">+                      (const uint8_t*)&params->classmark_information.classmark2);</span><br><span style="color: hsl(120, 100%, 40%);">+       } else if (params->classmark_information.classmark1_set) {</span><br><span style="color: hsl(120, 100%, 40%);">+         msgb_tlv_put(msg, GSM0808_IE_CLASSMARK_INFORMATION_TYPE_1,</span><br><span style="color: hsl(120, 100%, 40%);">+                         sizeof(params->classmark_information.classmark1),</span><br><span style="color: hsl(120, 100%, 40%);">+                          (const uint8_t*)&params->classmark_information.classmark1);</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+     /* (Classmark 3 possibly follows below) */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Cell Identifier (Serving) , 3.2.2.17 */</span><br><span style="color: hsl(120, 100%, 40%);">+    gsm0808_enc_cell_id(msg, &params->cell_identifier_serving);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Cell Identifier (Target) , 3.2.2.17 */</span><br><span style="color: hsl(120, 100%, 40%);">+     gsm0808_enc_cell_id(msg, &params->cell_identifier_target);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Cause, 3.2.2.5 */</span><br><span style="color: hsl(120, 100%, 40%);">+  gsm0808_enc_cause(msg, params->cause);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Classmark Information 3 3.2.2.20 */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (params->classmark_information.classmark3_len) {</span><br><span style="color: hsl(120, 100%, 40%);">+                msgb_tlv_put(msg, GSM0808_IE_CLASSMARK_INFORMATION_T3,</span><br><span style="color: hsl(120, 100%, 40%);">+                             params->classmark_information.classmark3_len,</span><br><span style="color: hsl(120, 100%, 40%);">+                      (const uint8_t*)&params->classmark_information.classmark3);</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%);">+   /* Current Channel type 1 3.2.2.49 */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (params->current_channel_type_1_present)</span><br><span style="color: hsl(120, 100%, 40%);">+                msgb_tv_fixed_put(msg, GSM0808_IE_CURRENT_CHANNEL_TYPE_1, 1, &params->current_channel_type_1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Speech Version (Used), 3.2.2.51 */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (params->speech_version_used) {</span><br><span style="color: hsl(120, 100%, 40%);">+         msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, params->speech_version_used);</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%);">+   /* Chosen Encryption Algorithm (Serving) 3.2.2.44 */</span><br><span style="color: hsl(120, 100%, 40%);">+  if (params->chosen_encryption_algorithm_serving)</span><br><span style="color: hsl(120, 100%, 40%);">+           msgb_tv_put(msg, GSM0808_IE_CHOSEN_ENCR_ALG, params->chosen_encryption_algorithm_serving);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Old BSS to New BSS Information 3.2.2.58 */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (params->old_bss_to_new_bss_info_raw && params->old_bss_to_new_bss_info_raw_len) {</span><br><span style="color: hsl(120, 100%, 40%);">+           msgb_tlv_put(msg, GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION,</span><br><span style="color: hsl(120, 100%, 40%);">+                       params->old_bss_to_new_bss_info_raw_len,</span><br><span style="color: hsl(120, 100%, 40%);">+                           params->old_bss_to_new_bss_info_raw);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (params->old_bss_to_new_bss_info_present) {</span><br><span style="color: hsl(120, 100%, 40%);">+              put_old_bss_to_new_bss_information(msg, &params->old_bss_to_new_bss_info);</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%);">+   /* IMSI 3.2.2.6 */</span><br><span style="color: hsl(120, 100%, 40%);">+    if (params->imsi) {</span><br><span style="color: hsl(120, 100%, 40%);">+                uint8_t mid_buf[GSM48_MI_SIZE + 2];</span><br><span style="color: hsl(120, 100%, 40%);">+           int mid_len = gsm48_generate_mid_from_imsi(mid_buf, params->imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+         msgb_tlv_put(msg, GSM0808_IE_IMSI, mid_len - 2, mid_buf + 2);</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 (params->aoip_transport_layer)</span><br><span style="color: hsl(120, 100%, 40%);">+          gsm0808_enc_aoip_trasp_addr(msg, params->aoip_transport_layer);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  if (params->codec_list_msc_preferred)</span><br><span style="color: hsl(120, 100%, 40%);">+              gsm0808_enc_speech_codec_list(msg, params->codec_list_msc_preferred);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    if (params->call_id_present) {</span><br><span style="color: hsl(120, 100%, 40%);">+             uint8_t val[4];</span><br><span style="color: hsl(120, 100%, 40%);">+               osmo_store32le(params->call_id, val);</span><br><span style="color: hsl(120, 100%, 40%);">+              msgb_tv_fixed_put(msg, GSM0808_IE_CALL_ID, 4, val);</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 (params->global_call_reference && params->global_call_reference_len) {</span><br><span style="color: hsl(120, 100%, 40%);">+               msgb_tlv_put(msg, GSM0808_IE_GLOBAL_CALL_REF,</span><br><span style="color: hsl(120, 100%, 40%);">+                      params->global_call_reference_len, params->global_call_reference);</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%);">+   /* prepend header with final length */</span><br><span style="color: hsl(120, 100%, 40%);">+        msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return msg;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10.</span><br><span>  * Sent from the MT BSC back to the MSC when it has allocated an lchan to handover to.</span><br><span>  * l3_info is the RR Handover Command that the MO BSC sends to the MS to move over. */</span><br><span>@@ -914,6 +1037,35 @@</span><br><span>     return gsm0808_create_handover_request_ack2(&params);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! Create BSSMAP HANDOVER COMMAND message, 3GPP TS 48.008 3.2.1.11.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Sent from the MSC to the old BSS to transmit the RR Handover Command received from the new BSS. */</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_command(const struct gsm0808_handover_command *params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       struct msgb *msg;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-COMMAND");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!msg)</span><br><span style="color: hsl(120, 100%, 40%);">+             return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Message Type, 3.2.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_CMD);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  msgb_tlv_put(msg, GSM0808_IE_LAYER_3_INFORMATION, params->l3_info_len, params->l3_info);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      if (params->cell_identifier.id_discr != CELL_IDENT_NO_CELL)</span><br><span style="color: hsl(120, 100%, 40%);">+                gsm0808_enc_cell_id(msg, &params->cell_identifier);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  if (params->new_bss_to_old_bss_info_raw</span><br><span style="color: hsl(120, 100%, 40%);">+        && params->new_bss_to_old_bss_info_raw_len)</span><br><span style="color: hsl(120, 100%, 40%);">+            msgb_tlv_put(msg, GSM0808_IE_NEW_BSS_TO_OLD_BSS_INFO, params->new_bss_to_old_bss_info_raw_len,</span><br><span style="color: hsl(120, 100%, 40%);">+                          params->new_bss_to_old_bss_info_raw);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* prepend header with final length */</span><br><span style="color: hsl(120, 100%, 40%);">+        msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return msg;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40.</span><br><span>  * Sent from the MT BSC back to the MSC when the MS has sent a handover RACH request and the MT BSC has</span><br><span>  * received the Handover Detect message. */</span><br><span>@@ -934,6 +1086,25 @@</span><br><span>    return msg;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.008 3.2.1.13.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Sent from the MSC back to the old BSS to notify that the MS has successfully accessed the new BSS. */</span><br><span style="color: hsl(120, 100%, 40%);">+struct msgb *gsm0808_create_handover_succeeded()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   struct msgb *msg;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-DETECT");</span><br><span style="color: hsl(120, 100%, 40%);">+  if (!msg)</span><br><span style="color: hsl(120, 100%, 40%);">+             return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Message Type, 3.2.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_SUCCEEDED);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* prepend header with final length */</span><br><span style="color: hsl(120, 100%, 40%);">+        msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        return msg;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.008 3.2.1.12.</span><br><span>  * Sent from the MT BSC back to the MSC when the MS has fully settled into the new lchan. */</span><br><span> struct msgb *gsm0808_create_handover_complete(const struct gsm0808_handover_complete *params)</span><br><span>diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map</span><br><span>index 5e1b58e..1e40af7 100644</span><br><span>--- a/src/gsm/libosmogsm.map</span><br><span>+++ b/src/gsm/libosmogsm.map</span><br><span>@@ -183,9 +183,13 @@</span><br><span> gsm0808_create_reset_ack;</span><br><span> gsm0808_create_sapi_reject;</span><br><span> gsm0808_create_handover_required;</span><br><span style="color: hsl(120, 100%, 40%);">+gsm0808_create_handover_required_reject;</span><br><span style="color: hsl(120, 100%, 40%);">+gsm0808_create_handover_request;</span><br><span> gsm0808_create_handover_request_ack;</span><br><span> gsm0808_create_handover_request_ack2;</span><br><span style="color: hsl(120, 100%, 40%);">+gsm0808_create_handover_command;</span><br><span> gsm0808_create_handover_detect;</span><br><span style="color: hsl(120, 100%, 40%);">+gsm0808_create_handover_succeeded;</span><br><span> gsm0808_create_handover_complete;</span><br><span> gsm0808_create_handover_failure;</span><br><span> gsm0808_create_handover_performed;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13578">change 13578</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/13578"/><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: I9dac375331f6bea744769e973725d58e35f87226 </div>
<div style="display:none"> Gerrit-Change-Number: 13578 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>