bsc: Readd the core network code setting

This will instruct the BSC to patch messages and replace
the old network code with the new one.
This commit is contained in:
Holger Hans Peter Freyther 2010-11-03 13:12:18 +01:00
parent 5b848f37cf
commit 4de1116356
3 changed files with 16 additions and 0 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);