Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon May 13 18:03:07 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14038


Change subject: vty: Add option to enable osmux towards BSCs
......................................................................

vty: Add option to enable osmux towards BSCs

Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/gsm_data.h
A include/osmocom/msc/osmux.h
M src/libmsc/msc_vty.c
4 files changed, 35 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/14038/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 9ca4c38..0d7d45c 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -28,6 +28,7 @@
 	msc_t_remote.h \
 	msub.h \
 	neighbor_ident.h \
+	osmux.h \
 	paging.h \
 	ran_conn.h \
 	ran_infra.h \
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 42bb69a..f6e3ed9 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -19,6 +19,7 @@
 #include <osmocom/msc/neighbor_ident.h>
 
 #include "gsm_data_shared.h"
+#include "osmux.h"
 
 /** annotations for msgb ownership */
 #define __uses
@@ -231,6 +232,9 @@
 		uint64_t range_end;
 		uint64_t next;
 	} handover_number;
+
+	/* Whether we want to use Osmux against BSCs. Controlled via VTY */
+	enum osmux_usage use_osmux;
 };
 
 struct osmo_esme;
diff --git a/include/osmocom/msc/osmux.h b/include/osmocom/msc/osmux.h
new file mode 100644
index 0000000..aa3d1ab
--- /dev/null
+++ b/include/osmocom/msc/osmux.h
@@ -0,0 +1,7 @@
+#pragma once
+
+enum osmux_usage {
+	OSMUX_USAGE_OFF = 0,
+	OSMUX_USAGE_ON = 1,
+	OSMUX_USAGE_ONLY = 2,
+};
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 2990735..dd3b9b5 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -59,6 +59,7 @@
 #include <osmocom/msc/gsm_04_14.h>
 #include <osmocom/msc/signal.h>
 #include <osmocom/msc/mncc_int.h>
+#include <osmocom/msc/osmux.h>
 #include <osmocom/msc/rrlp.h>
 #include <osmocom/msc/vlr_sgs.h>
 #include <osmocom/msc/sgs_vty.h>
@@ -554,6 +555,22 @@
 	return CMD_SUCCESS;
 }
 
+#define OSMUX_STR "RTP multiplexing\n"
+DEFUN(cfg_msc_osmux,
+      cfg_msc_osmux_cmd,
+      "osmux (on|off|only)",
+       OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n")
+{
+	if (strcmp(argv[0], "off") == 0)
+		gsmnet->use_osmux = OSMUX_USAGE_OFF;
+	else if (strcmp(argv[0], "on") == 0)
+		gsmnet->use_osmux = OSMUX_USAGE_ON;
+	else if (strcmp(argv[0], "only") == 0)
+		gsmnet->use_osmux = OSMUX_USAGE_ONLY;
+
+	return CMD_SUCCESS;
+}
+
 static int config_write_msc(struct vty *vty)
 {
 	vty_out(vty, "msc%s", VTY_NEWLINE);
@@ -601,6 +618,11 @@
 			gsmnet->handover_number.range_start, gsmnet->handover_number.range_end,
 			VTY_NEWLINE);
 
+	if (gsmnet->use_osmux != OSMUX_USAGE_OFF) {
+		vty_out(vty, " osmux %s%s", gsmnet->use_osmux == OSMUX_USAGE_ON ? "on" : "only",
+			VTY_NEWLINE);
+	}
+
 	mgcp_client_config_write(vty, " ");
 #ifdef BUILD_IU
 	ranap_iu_vty_config_write(vty, " ");
@@ -1746,6 +1768,7 @@
 	install_element(MSC_NODE, &cfg_msc_emergency_msisdn_cmd);
 	install_element(MSC_NODE, &cfg_msc_sms_over_gsup_cmd);
 	install_element(MSC_NODE, &cfg_msc_no_sms_over_gsup_cmd);
+	install_element(MSC_NODE, &cfg_msc_osmux_cmd);
 	install_element(MSC_NODE, &cfg_msc_handover_number_range_cmd);
 
 	neighbor_ident_vty_init(msc_network);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db
Gerrit-Change-Number: 14038
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190513/89b90f88/attachment.html>


More information about the gerrit-log mailing list