Change in osmo-bsc[master]: bssap: Detect MSC Osmux support on RESET (ACK) recv

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:26:28 UTC 2019


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

Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv
......................................................................

bssap: Detect MSC Osmux support on RESET (ACK) recv

Related: OS#2551
Depends on: libosmocore I28f83e2e32b9533c99e65ccc1562900ac2aec74e
Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528
---
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 271bdd4..4720845 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -133,6 +133,8 @@
 
 	/* Whether we want to use Osmux against this MSC. Controlled via VTY */
 	enum osmux_usage use_osmux;
+	/* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */
+	bool remote_supports_osmux;
 };
 
 /*
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index e79a344..9dee265 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -51,6 +51,25 @@
  * helpers for the assignment command
  */
 
+/* We expect MSC to provide use with an Osmocom extension TLV in BSSMAP_RESET to
+ * announce Osmux support */
+static void update_msc_osmux_support(struct bsc_msc_data *msc,
+				      struct msgb *msg, unsigned int length)
+{
+	struct tlv_parsed tp;
+	int rc;
+	bool old_value = msc->remote_supports_osmux;
+
+	rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, length - 1, 0, 0);
+	if (rc < 0)
+		LOGP(DMSC, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n");
+
+	msc->remote_supports_osmux = !!TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT);
+
+	if (old_value != msc->remote_supports_osmux)
+		LOGP(DMSC, LOGL_INFO, "MSC detected AoIP Osmux support changed: %d->%d\n",
+		     old_value,  msc->remote_supports_osmux);
+}
 
 static int bssmap_handle_reset_ack(struct bsc_msc_data *msc,
 				   struct msgb *msg, unsigned int length)
@@ -63,6 +82,8 @@
 	 * that we have successfully received the reset-ack message */
 	a_reset_ack_confirm(msc);
 
+	update_msc_osmux_support(msc, msg, length);
+
 	return 0;
 }
 
@@ -81,6 +102,8 @@
 	/* Drop all ongoing paging requests that this MSC has created on any BTS */
 	paging_flush_network(msc->network, msc);
 
+	update_msc_osmux_support(msc, msg, length);
+
 	/* Inform the MSC that we have received the reset request and
 	 * that we acted accordingly */
 	osmo_bsc_sigtran_tx_reset_ack(msc);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528
Gerrit-Change-Number: 13923
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190519/bb95c660/attachment.htm>


More information about the gerrit-log mailing list