aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-05 19:43:07 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-15 20:06:48 +0100
commit2a8675e49a5fac26778f6397696bd98981422f21 (patch)
treee4996757da258981d6d0fa176a2dcd8bd9fa1b64 /openbsc/src/bsc
parent52d42abdb7b75d41b9291ca266d5d71610b2088b (diff)
bsc: Add a mobile country code setting for the backbone.
Diffstat (limited to 'openbsc/src/bsc')
-rw-r--r--openbsc/src/bsc/osmo_bsc_filter.c3
-rw-r--r--openbsc/src/bsc/osmo_bsc_vty.c14
2 files changed, 16 insertions, 1 deletions
diff --git a/openbsc/src/bsc/osmo_bsc_filter.c b/openbsc/src/bsc/osmo_bsc_filter.c
index 2503cfbf8..24710fabd 100644
--- a/openbsc/src/bsc/osmo_bsc_filter.c
+++ b/openbsc/src/bsc/osmo_bsc_filter.c
@@ -101,7 +101,8 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
net = conn->bts->network;
if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) {
- if (net->msc_data->core_ncc != -1) {
+ if (net->msc_data->core_ncc != -1 ||
+ net->msc_data->core_mcc != -1) {
if (msgb_l3len(msg) >= sizeof(*gh) + sizeof(*lai)) {
lai = (struct gsm48_loc_area_id *) &gh->data[0];
gsm48_generate_lai(lai, net->country_code,
diff --git a/openbsc/src/bsc/osmo_bsc_vty.c b/openbsc/src/bsc/osmo_bsc_vty.c
index ba6bc1e95..a76a7e103 100644
--- a/openbsc/src/bsc/osmo_bsc_vty.c
+++ b/openbsc/src/bsc/osmo_bsc_vty.c
@@ -60,6 +60,9 @@ static int config_write_msc(struct vty *vty)
if (data->core_ncc != -1)
vty_out(vty, " core-mobile-network-code %d%s",
data->core_ncc, VTY_NEWLINE);
+ if (data->core_mcc != -1)
+ vty_out(vty, " core-mobile-country-code %d%s",
+ data->core_mcc, VTY_NEWLINE);
vty_out(vty, " ip.access rtp-payload %d%s",
data->rtp_payload, VTY_NEWLINE);
vty_out(vty, " ip.access rtp-base %d%s", data->rtp_base, VTY_NEWLINE);
@@ -112,6 +115,16 @@ DEFUN(cfg_net_bsc_ncc,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_bsc_mcc,
+ cfg_net_bsc_mcc_cmd,
+ "core-mobile-country-code <0-255>",
+ "Use this country code for the backbone\n" "MCC value\n")
+{
+ struct osmo_msc_data *data = osmo_msc_data(vty);
+ data->core_mcc = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_net_bsc_rtp_payload,
cfg_net_bsc_rtp_payload_cmd,
"ip.access rtp-payload <0-255>",
@@ -269,6 +282,7 @@ int bsc_vty_init_extra(void)
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_bsc_mcc_cmd);
install_element(MSC_NODE, &cfg_net_bsc_rtp_payload_cmd);
install_element(MSC_NODE, &cfg_net_bsc_rtp_base_cmd);
install_element(MSC_NODE, &cfg_net_bsc_codec_list_cmd);