Change in osmo-msc[master]: a_iface: Announce Osmux support on RESET (ACK) send

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.org
Sun May 19 07:28:03 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14040 )

Change subject: a_iface: Announce Osmux support on RESET (ACK) send
......................................................................

a_iface: Announce Osmux support on RESET (ACK) send

Related: OS#2551
Depends: libosmocore.git I28f83e2e32b9533c99e65ccc1562900ac2aec74e
Change-Id: Id607f60749e923755cb38179bc283a7957670653
---
M src/libmsc/ran_msg_a.c
1 file changed, 24 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 805308c..64590a1 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -34,6 +34,7 @@
 #include <osmocom/msc/debug.h>
 #include <osmocom/msc/ran_msg_a.h>
 #include <osmocom/msc/sccp_ran.h>
+#include <osmocom/msc/gsm_data.h>
 
 #define LOG_RAN_A_DEC(RAN_DEC, level, fmt, args...) \
 	LOG_RAN_DEC(RAN_DEC, DBSSAP, level, "BSSMAP: " fmt, ## args)
@@ -1239,16 +1240,37 @@
 	}
 }
 
+/* Patch regular BSSMAP RESET to add extra T to announce Osmux support (osmocom extension) */
+static void _gsm0808_extend_announce_osmux(struct msgb *msg)
+{
+	OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */
+	msgb_put_u8(msg, GSM0808_IE_OSMO_OSMUX_SUPPORT);
+	msg->l3h[1] = msgb_l3len(msg) - 2;
+}
+
 struct msgb *bssmap_make_reset_msg(const struct sccp_ran_inst *sri, enum reset_msg_type type)
 {
+	struct gsm_network *net = sri->user_data;
+	struct msgb *msg;
+
 	switch (type) {
 	case SCCP_RAN_MSG_RESET:
-		return gsm0808_create_reset();
+		msg = gsm0808_create_reset();
+		break;
 	case SCCP_RAN_MSG_RESET_ACK:
-		return gsm0808_create_reset_ack();
+		msg = gsm0808_create_reset_ack();
+		break;
 	default:
 		return NULL;
 	}
+
+	if (!msg)
+		return NULL;
+
+	if (net->use_osmux != OSMUX_USAGE_OFF)
+		_gsm0808_extend_announce_osmux(msg);
+
+	return msg;
 }
 
 struct msgb *bssmap_make_paging_msg(const struct sccp_ran_inst *sri, const struct gsm0808_cell_id *page_cell_id,

-- 
To view, visit https://gerrit.osmocom.org/14040
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id607f60749e923755cb38179bc283a7957670653
Gerrit-Change-Number: 14040
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190519/f3601d6f/attachment.htm>


More information about the gerrit-log mailing list