This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9378 ) Change subject: gsm0808: Add encoding functions for LCLS BSSMAP messages ...................................................................... gsm0808: Add encoding functions for LCLS BSSMAP messages Change-Id: Ib83143e467df068b7d462a8e51d94b9d961ce18f --- M include/osmocom/gsm/gsm0808.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 68 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 5c03400..8402957 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -80,6 +80,11 @@ const struct gsm0808_cell_id_list *cil, const uint8_t *chan_needed) OSMO_DEPRECATED("use gsm0808_create_paging2 instead"); +struct msgb *gsm0808_create_lcls_conn_ctrl(enum gsm0808_lcls_config *config, + enum gsm0808_lcls_control *control); +struct msgb *gsm0808_create_lcls_conn_ctrl_ack(enum gsm0808_lcls_status status); +struct msgb *gsm0808_create_lcls_notification(enum gsm0808_lcls_status status, bool break_req); + /*! 3GPP TS 48.008 §3.2.2.5.8 Old BSS to New BSS information */ struct gsm0808_old_bss_to_new_bss_info { diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 5af53ee..347e985 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -282,6 +282,66 @@ return msg; } +/*! Create BSSMAP LCLS CONNECT CONTROL message (TS 48.008 3.2.1.91). + * \param[in] config LCLS Configuration + * \param[in] control LCLS Connection Status Control + * \returns callee-allocated msgb with BSSMAP LCLS NOTIFICATION */ +struct msgb *gsm0808_create_lcls_conn_ctrl(enum gsm0808_lcls_config *config, + enum gsm0808_lcls_control *control) +{ + struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, + "bssmap: LCLS CONN CTRL"); + if (!msg) + return NULL; + + msgb_v_put(msg, BSS_MAP_MSG_LCLS_CONNECT_CTRL); + if (config) + msgb_tv_put(msg, GSM0808_IE_LCLS_CONFIG, *config); + if (control) + msgb_tv_put(msg, GSM0808_IE_LCLS_CONFIG, *control); + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + +/*! Create BSSMAP LCLS CONNECT CONTROL ACK message (TS 48.008 3.2.1.92). + * \param[in] status LCLS BSS Status + * \returns callee-allocated msgb with BSSMAP LCLS NOTIFICATION */ +struct msgb *gsm0808_create_lcls_conn_ctrl_ack(enum gsm0808_lcls_status status) +{ + struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, + "bssmap: LCLS CONN CTRL ACK"); + if (!msg) + return NULL; + + msgb_v_put(msg, BSS_MAP_MSG_LCLS_CONNECT_CTRL_ACK); + msgb_tv_put(msg, GSM0808_IE_LCLS_BSS_STATUS, status); + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + +/*! Create BSSMAP LCLS NOTIFICATION message (TS 48.008 3.2.1.93). + * \param[in] status LCLS BSS Status + * \param[in] break_req Include the LCLS BREAK REQ IE (true) or not (false) + * \returns callee-allocated msgb with BSSMAP LCLS NOTIFICATION */ +struct msgb *gsm0808_create_lcls_notification(enum gsm0808_lcls_status status, bool break_req) +{ + struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, + "bssmap: LCLS NOTIFICATION"); + if (!msg) + return NULL; + + msgb_v_put(msg, BSS_MAP_MSG_LCLS_NOTIFICATION); + msgb_tv_put(msg, GSM0808_IE_LCLS_BSS_STATUS, status); + if (break_req) + msgb_v_put(msg, GSM0808_IE_LCLS_BREAK_REQ); + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + + /*! Create BSSMAP Classmark Update message * \param[in] cm2 Classmark 2 * \param[in] cm2_len length (in octets) of \a cm2 diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 3b9fbfd..c05b4ee 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -158,6 +158,9 @@ gsm0808_create_layer3; gsm0808_create_layer3_aoip; gsm0808_create_layer3_2; +gsm0808_create_lcls_conn_ctrl; +gsm0808_create_lcls_conn_ctrl_ack; +gsm0808_create_lcls_notification; gsm0808_create_reset; gsm0808_create_reset_ack; gsm0808_create_sapi_reject; -- To view, visit https://gerrit.osmocom.org/9378 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib83143e467df068b7d462a8e51d94b9d961ce18f Gerrit-Change-Number: 9378 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180529/5a0d4196/attachment.htm>