diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-16 22:31:15 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-05-27 22:04:17 +0200 |
commit | b662b36da0bd3bd6ccad65e1614df1466a30d20d (patch) | |
tree | 7b48a77f7fc8a2893178a0cd7b4abd128918836f /src/gsm | |
parent | 70aba3ffe2e6dbff4b8bf17c0f1273d8b4387109 (diff) |
add gsm0808_create_handover_request_ack()
Related: OS#2283 (inter-BSC Handover, BSC side, MT)
Change-Id: I692292a06c7d66004404560dc4ed933ca9107f9b
Diffstat (limited to 'src/gsm')
-rw-r--r-- | src/gsm/gsm0808.c | 25 | ||||
-rw-r--r-- | src/gsm/libosmogsm.map | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 80f5e6ce..5af53ee6 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -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 */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 58a5bfe5..3b9fbfdd 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -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; |