diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-06-08 16:28:04 +0200 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2011-11-04 12:27:09 +0100 |
commit | 2a27deb18d2cf066336c02001aaeaa33e09efc51 (patch) | |
tree | 84f01ecbf6be823d629bac083f3bafad43de48b2 | |
parent | af3a00dbf0d15304d4f2bcd80c9b21008277c58c (diff) |
bsc: Add vty function for the MSC type
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_vty.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index dfbdaa22a..356ed2808 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -114,6 +114,9 @@ static void write_msc(struct vty *vty, struct osmo_msc_data *msc) llist_for_each_entry(dest, &msc->dests, list) vty_out(vty, " dest %s %d %d%s", dest->ip, dest->port, dest->dscp, VTY_NEWLINE); + + vty_out(vty, " type %s%s", msc->type == MSC_CON_TYPE_NORMAL ? + "normal" : "local", VTY_NEWLINE); } static int config_write_msc(struct vty *vty) @@ -332,6 +335,22 @@ DEFUN(cfg_net_msc_welcome_ussd, return CMD_SUCCESS; } +DEFUN(cfg_net_msc_type, + cfg_net_msc_type_cmd, + "type (normal|local)", + "Select the MSC type\n" + "Plain GSM MSC\n" "Special MSC for local call routing\n") +{ + struct osmo_msc_data *data = osmo_msc_data(vty); + + if (strcmp(argv[0], "normal") == 0) + data->type = MSC_CON_TYPE_NORMAL; + else if (strcmp(argv[0], "local") == 0) + data->type = MSC_CON_TYPE_LOCAL; + + return CMD_SUCCESS; +} + DEFUN(cfg_net_bsc_mid_call_text, cfg_net_bsc_mid_call_text_cmd, "mid-call-text .TEXT", @@ -402,6 +421,7 @@ int bsc_vty_init_extra(void) install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd); install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd); install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd); + install_element(MSC_NODE, &cfg_net_msc_type_cmd); install_element_ve(&show_statistics_cmd); |