add gsm0808_create_handover_request_ack()

Related: OS#2283 (inter-BSC Handover, BSC side, MT)
Change-Id: I692292a06c7d66004404560dc4ed933ca9107f9b
This commit is contained in:
Neels Hofmeyr 2018-04-16 22:31:15 +02:00
parent 70aba3ffe2
commit b662b36da0
3 changed files with 30 additions and 0 deletions

View File

@ -117,6 +117,10 @@ struct gsm0808_handover_required {
};
struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_required *params);
struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len,
uint8_t chosen_channel, uint8_t chosen_encr_alg,
uint8_t chosen_speech_version);
struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id);
void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id);

View File

@ -679,6 +679,31 @@ struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_requ
return msg;
}
/*! Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10. */
struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len,
uint8_t chosen_channel, uint8_t chosen_encr_alg,
uint8_t chosen_speech_version)
{
struct msgb *msg;
msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-ACCEPT-ACK");
if (!msg)
return NULL;
/* Message Type, 3.2.2.1 */
msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_RQST_ACKNOWLEDGE);
/* Layer 3 Information, 3.2.2.24 */
msgb_tlv_put(msg, GSM0808_IE_LAYER_3_INFORMATION, l3_info_len, l3_info);
msgb_tv_put(msg, GSM0808_IE_CHOSEN_CHANNEL, chosen_channel);
msgb_tv_put(msg, GSM0808_IE_CHOSEN_ENCR_ALG, chosen_encr_alg);
if (chosen_speech_version != 0)
msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, chosen_speech_version);
return msg;
}
/*! Prepend a DTAP header to given Message Buffer
* \param[in] msgb Message Buffer
* \param[in] link_id Link Identifier */

View File

@ -162,6 +162,7 @@ gsm0808_create_reset;
gsm0808_create_reset_ack;
gsm0808_create_sapi_reject;
gsm0808_create_handover_required;
gsm0808_create_handover_request_ack;
gsm0808_prepend_dtap_header;
gsm0808_enc_aoip_trasp_addr;
gsm0808_dec_aoip_trasp_addr;