aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/osmo_msc_data.h1
-rw-r--r--openbsc/src/bsc/osmo_bsc_vty.c14
-rw-r--r--openbsc/src/gsm_data.c1
3 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index 4205c150e..c058a0ab5 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -41,6 +41,7 @@ struct osmo_msc_data {
struct timer_list ping_timer;
struct timer_list pong_timer;
struct bsc_msc_connection *msc_con;
+ int core_ncc;
/* mgcp agent */
struct write_queue mgcp_agent;
diff --git a/openbsc/src/bsc/osmo_bsc_vty.c b/openbsc/src/bsc/osmo_bsc_vty.c
index be6e4c6a4..edd17fcee 100644
--- a/openbsc/src/bsc/osmo_bsc_vty.c
+++ b/openbsc/src/bsc/osmo_bsc_vty.c
@@ -54,6 +54,9 @@ static int config_write_msc(struct vty *vty)
vty_out(vty, " msc%s", VTY_NEWLINE);
if (data->bsc_token)
vty_out(vty, " token %s%s", data->bsc_token, VTY_NEWLINE);
+ if (data->core_ncc != -1)
+ vty_out(vty, " core-mobile-network-code %d%s",
+ data->core_ncc, VTY_NEWLINE);
vty_out(vty, " ip %s%s", data->msc_ip, VTY_NEWLINE);
vty_out(vty, " port %d%s", data->msc_port, VTY_NEWLINE);
vty_out(vty, " ip-dscp %d%s", data->msc_ip_dscp, VTY_NEWLINE);
@@ -76,6 +79,16 @@ DEFUN(cfg_net_bsc_token,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_bsc_ncc,
+ cfg_net_bsc_ncc_cmd,
+ "core-mobile-network-code <0-255>",
+ "Use this network code for the backbone\n" "NCC value\n")
+{
+ struct osmo_msc_data *data = osmo_msc_data(vty);
+ data->core_ncc = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_net_msc_ip,
cfg_net_msc_ip_cmd,
"ip A.B.C.D", "Set the MSC/MUX IP address.")
@@ -148,6 +161,7 @@ int bsc_vty_init_extra(void)
install_node(&msc_node, config_write_msc);
install_default(MSC_NODE);
install_element(MSC_NODE, &cfg_net_bsc_token_cmd);
+ install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd);
install_element(MSC_NODE, &cfg_net_msc_ip_cmd);
install_element(MSC_NODE, &cfg_net_msc_port_cmd);
install_element(MSC_NODE, &cfg_net_msc_prio_cmd);
diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c
index e26673acc..5a51ac679 100644
--- a/openbsc/src/gsm_data.c
+++ b/openbsc/src/gsm_data.c
@@ -317,6 +317,7 @@ struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_c
net->msc_data->msc_port = 5000;
net->msc_data->ping_timeout = 20;
net->msc_data->pong_timeout = 5;
+ net->msc_data->core_ncc = -1;
gsm_net_update_ctype(net);