aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-01-07 03:17:01 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-01-07 03:17:01 +0100
commit2aa0b45cc03ab8c91fabdaf585cb8b17c3f26c2c (patch)
tree75ded078559c30c3152d0c25d052737a15352ff6 /openbsc/src/vty_interface.c
parent619df61ad27093a4a0305b7af9a8e36719a6d474 (diff)
[bssap] Allow to use a different country code too
* Be able to have a country code in the air but use a different country code when talking to the core network. * Now both country and network code can be different on air and on the MSC communication.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r--openbsc/src/vty_interface.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 78636aa7e..e53e7c6f9 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -294,6 +294,8 @@ static int config_write_net(struct vty *vty)
{
vty_out(vty, "network%s", VTY_NEWLINE);
vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE);
+ if (gsmnet->core_country_code > 0)
+ vty_out(vty, " core network country code %u%s", gsmnet->core_country_code, VTY_NEWLINE);
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE);
if (gsmnet->core_network_code > 0)
vty_out(vty, " core mobile network code %u%s", gsmnet->core_network_code, VTY_NEWLINE);
@@ -845,6 +847,16 @@ DEFUN(cfg_net_ncc,
return CMD_SUCCESS;
}
+DEFUN(cfg_core_net_ncc,
+ cfg_core_net_ncc_cmd,
+ "core network country code <1-999>",
+ "Set the GSM country code to be used in the MSC connection")
+{
+ gsmnet->core_country_code = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_net_mnc,
cfg_net_mnc_cmd,
"mobile network code <1-999>",
@@ -1596,6 +1608,7 @@ int bsc_vty_init(struct gsm_network *net)
install_node(&net_node, config_write_net);
install_default(GSMNET_NODE);
install_element(GSMNET_NODE, &cfg_net_ncc_cmd);
+ install_element(GSMNET_NODE, &cfg_core_net_ncc_cmd);
install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
install_element(GSMNET_NODE, &cfg_core_net_mnc_cmd);
install_element(GSMNET_NODE, &cfg_net_name_short_cmd);