aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmgcp/mgcpgw_client_vty.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-04-09 12:32:51 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-30 14:09:31 +0200
commit39f62bbcbf4309492a6d5bc07213cd74f650d41e (patch)
tree6d56d892a52151c67452c9ac08c898a152181c68 /src/libmgcp/mgcpgw_client_vty.c
parent88d8bcb752a611c2c23fb442362665ecd7e31ba0 (diff)
Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)
This was originally a long series of commits converging to the final result seen in this patch. It does not make much sense to review the smaller steps' trial and error, we need to review this entire change as a whole. Implement AoIP in osmo-msc and osmo-bsc. Change over to the new libosmo-sigtran API with support for proper SCCP/M3UA/SCTP stacking, as mandated by 3GPP specifications for the IuCS and IuPS interfaces. From here on, a separate osmo-stp process is required for SCCP routing between OsmoBSC / OsmoHNBGW <-> OsmoMSC / OsmoSGSN jenkins.sh: build from libosmo-sccp and osmo-iuh master branches now for new M3UA SIGTRAN. Patch-by: pmaier, nhofmeyr, laforge Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
Diffstat (limited to 'src/libmgcp/mgcpgw_client_vty.c')
-rw-r--r--src/libmgcp/mgcpgw_client_vty.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/libmgcp/mgcpgw_client_vty.c b/src/libmgcp/mgcpgw_client_vty.c
index a42ee4e5d..806800078 100644
--- a/src/libmgcp/mgcpgw_client_vty.c
+++ b/src/libmgcp/mgcpgw_client_vty.c
@@ -79,10 +79,46 @@ DEFUN(cfg_mgcpgw_remote_port, cfg_mgcpgw_remote_port_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_mgcpgw_endpoint_range, cfg_mgcpgw_endpoint_range_cmd,
+ "mgcpgw endpoint-range <1-65534> <1-65534>",
+ MGCPGW_STR "usable range of endpoint identifiers\n"
+ "set first useable endpoint identifier\n"
+ "set the last useable endpoint identifier\n")
+{
+ uint16_t first_endpoint = atoi(argv[0]);
+ uint16_t last_endpoint = atoi(argv[1]);
+
+ if (last_endpoint < first_endpoint) {
+ vty_out(vty, "last endpoint must be greater than first endpoint!%s",
+ VTY_NEWLINE);
+ return CMD_SUCCESS;
+ }
+
+ global_mgcpgw_client_conf->first_endpoint = first_endpoint;
+ global_mgcpgw_client_conf->last_endpoint = last_endpoint;
+ return CMD_SUCCESS;
+}
+
+#define BTS_START_STR "First UDP port allocated for the BTS side\n"
+#define UDP_PORT_STR "UDP Port number\n"
+DEFUN(cfg_mgcp_rtp_bts_base_port,
+ cfg_mgcp_rtp_bts_base_port_cmd,
+ "mgcpgw bts-base <0-65534>",
+ MGCPGW_STR
+ BTS_START_STR
+ UDP_PORT_STR)
+{
+ global_mgcpgw_client_conf->bts_base = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
int mgcpgw_client_config_write(struct vty *vty, const char *indent)
{
const char *addr;
int port;
+ uint16_t first_endpoint;
+ uint16_t last_endpoint;
+ uint16_t bts_base;
addr = global_mgcpgw_client_conf->local_addr;
if (addr)
@@ -102,6 +138,19 @@ int mgcpgw_client_config_write(struct vty *vty, const char *indent)
vty_out(vty, "%smgcpgw remote-port %u%s", indent,
(uint16_t)port, VTY_NEWLINE);
+ first_endpoint = global_mgcpgw_client_conf->first_endpoint;
+ last_endpoint = global_mgcpgw_client_conf->last_endpoint;
+ if (last_endpoint != 0) {
+ vty_out(vty, "%smgcpgw endpoint-range %u %u%s", indent,
+ first_endpoint, last_endpoint, VTY_NEWLINE);
+ }
+
+ bts_base = global_mgcpgw_client_conf->bts_base;
+ if (bts_base) {
+ vty_out(vty, "%smgcpgw bts-base %u%s", indent,
+ bts_base, VTY_NEWLINE);
+ }
+
return CMD_SUCCESS;
}
@@ -113,4 +162,6 @@ void mgcpgw_client_vty_init(int node, struct mgcpgw_client_conf *conf)
install_element(node, &cfg_mgcpgw_local_port_cmd);
install_element(node, &cfg_mgcpgw_remote_ip_cmd);
install_element(node, &cfg_mgcpgw_remote_port_cmd);
+ install_element(node, &cfg_mgcpgw_endpoint_range_cmd);
+ install_element(node, &cfg_mgcp_rtp_bts_base_port_cmd);
}