Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 1 | /* Osmo BSC VTY Configuration */ |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 2 | /* (C) 2009-2011 by Holger Hans Peter Freyther |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 3 | * (C) 2009-2011 by On-Waves |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 4 | * All Rights Reserved |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
Harald Welte | 9af6ddf | 2011-01-01 15:25:50 +0100 | [diff] [blame] | 7 | * it under the terms of the GNU Affero General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Harald Welte | 9af6ddf | 2011-01-01 15:25:50 +0100 | [diff] [blame] | 14 | * GNU Affero General Public License for more details. |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 15 | * |
Harald Welte | 9af6ddf | 2011-01-01 15:25:50 +0100 | [diff] [blame] | 16 | * You should have received a copy of the GNU Affero General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 18 | * |
| 19 | */ |
| 20 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 21 | #include <openbsc/gsm_data.h> |
| 22 | #include <openbsc/osmo_msc_data.h> |
| 23 | #include <openbsc/vty.h> |
| 24 | |
Pablo Neira Ayuso | 136f453 | 2011-03-22 16:47:59 +0100 | [diff] [blame] | 25 | #include <osmocom/core/talloc.h> |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 26 | |
Holger Hans Peter Freyther | fe16622 | 2010-11-03 13:32:48 +0100 | [diff] [blame] | 27 | |
| 28 | #define IPA_STR "IP.ACCESS specific\n" |
| 29 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 30 | extern struct gsm_network *bsc_gsmnet; |
| 31 | |
| 32 | static struct osmo_msc_data *osmo_msc_data(struct vty *vty) |
| 33 | { |
| 34 | return bsc_gsmnet->msc_data; |
| 35 | } |
| 36 | |
| 37 | static struct cmd_node msc_node = { |
| 38 | MSC_NODE, |
| 39 | "%s(msc)#", |
| 40 | 1, |
| 41 | }; |
| 42 | |
| 43 | DEFUN(cfg_net_msc, cfg_net_msc_cmd, |
| 44 | "msc", "Configure MSC details") |
| 45 | { |
| 46 | vty->index = bsc_gsmnet; |
| 47 | vty->node = MSC_NODE; |
| 48 | |
| 49 | return CMD_SUCCESS; |
| 50 | } |
| 51 | |
| 52 | static int config_write_msc(struct vty *vty) |
| 53 | { |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 54 | struct bsc_msc_dest *dest; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 55 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 56 | |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 57 | vty_out(vty, "msc%s", VTY_NEWLINE); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 58 | if (data->bsc_token) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 59 | vty_out(vty, " token %s%s", data->bsc_token, VTY_NEWLINE); |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 60 | if (data->core_ncc != -1) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 61 | vty_out(vty, " core-mobile-network-code %d%s", |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 62 | data->core_ncc, VTY_NEWLINE); |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 63 | if (data->core_mcc != -1) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 64 | vty_out(vty, " core-mobile-country-code %d%s", |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 65 | data->core_mcc, VTY_NEWLINE); |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 66 | vty_out(vty, " ip.access rtp-base %d%s", data->rtp_base, VTY_NEWLINE); |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 67 | vty_out(vty, " timeout-ping %d%s", data->ping_timeout, VTY_NEWLINE); |
| 68 | vty_out(vty, " timeout-pong %d%s", data->pong_timeout, VTY_NEWLINE); |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 69 | if (data->mid_call_txt) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 70 | vty_out(vty, " mid-call-text %s%s", data->mid_call_txt, VTY_NEWLINE); |
| 71 | vty_out(vty, " mid-call-timeout %d%s", data->mid_call_timeout, VTY_NEWLINE); |
Holger Hans Peter Freyther | fbceea4 | 2010-11-26 00:11:34 +0100 | [diff] [blame] | 72 | if (data->ussd_welcome_txt) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 73 | vty_out(vty, " bsc-welcome-text %s%s", data->ussd_welcome_txt, VTY_NEWLINE); |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 74 | if (data->rf_ctrl_name) |
| 75 | vty_out(vty, " bsc-rf-socket %s%s", |
| 76 | data->rf_ctrl_name, VTY_NEWLINE); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 77 | |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 78 | if (data->audio_length != 0) { |
| 79 | int i; |
| 80 | |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 81 | vty_out(vty, " codec-list "); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 82 | for (i = 0; i < data->audio_length; ++i) { |
| 83 | if (i != 0) |
| 84 | vty_out(vty, ", "); |
| 85 | |
| 86 | if (data->audio_support[i]->hr) |
| 87 | vty_out(vty, "hr%.1u", data->audio_support[i]->ver); |
| 88 | else |
| 89 | vty_out(vty, "fr%.1u", data->audio_support[i]->ver); |
| 90 | } |
| 91 | vty_out(vty, "%s", VTY_NEWLINE); |
| 92 | |
| 93 | } |
| 94 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 95 | llist_for_each_entry(dest, &data->dests, list) |
| 96 | vty_out(vty, " dest %s %d %d%s", dest->ip, dest->port, |
| 97 | dest->dscp, VTY_NEWLINE); |
| 98 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 99 | return CMD_SUCCESS; |
| 100 | } |
| 101 | |
Holger Hans Peter Freyther | 5b848f3 | 2010-11-03 13:11:14 +0100 | [diff] [blame] | 102 | DEFUN(cfg_net_bsc_token, |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 103 | cfg_net_bsc_token_cmd, |
| 104 | "token TOKEN", |
| 105 | "A token for the BSC to be sent to the MSC") |
| 106 | { |
| 107 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 108 | |
Holger Hans Peter Freyther | 3e9a7f8 | 2010-10-12 23:21:54 +0200 | [diff] [blame] | 109 | bsc_replace_string(data, &data->bsc_token, argv[0]); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 110 | return CMD_SUCCESS; |
| 111 | } |
| 112 | |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 113 | DEFUN(cfg_net_bsc_ncc, |
| 114 | cfg_net_bsc_ncc_cmd, |
Holger Hans Peter Freyther | 6e1a676 | 2011-02-10 11:37:13 +0100 | [diff] [blame] | 115 | "core-mobile-network-code <1-999>", |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 116 | "Use this network code for the backbone\n" "NCC value\n") |
| 117 | { |
| 118 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 119 | data->core_ncc = atoi(argv[0]); |
| 120 | return CMD_SUCCESS; |
| 121 | } |
| 122 | |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 123 | DEFUN(cfg_net_bsc_mcc, |
| 124 | cfg_net_bsc_mcc_cmd, |
Holger Hans Peter Freyther | 6e1a676 | 2011-02-10 11:37:13 +0100 | [diff] [blame] | 125 | "core-mobile-country-code <1-999>", |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 126 | "Use this country code for the backbone\n" "MCC value\n") |
| 127 | { |
| 128 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 129 | data->core_mcc = atoi(argv[0]); |
| 130 | return CMD_SUCCESS; |
| 131 | } |
| 132 | |
Holger Hans Peter Freyther | fe16622 | 2010-11-03 13:32:48 +0100 | [diff] [blame] | 133 | DEFUN(cfg_net_bsc_rtp_base, |
| 134 | cfg_net_bsc_rtp_base_cmd, |
| 135 | "ip.access rtp-base <1-65000>", |
| 136 | IPA_STR |
| 137 | "Set the rtp-base port for the RTP stream\n" |
| 138 | "Port number\n") |
| 139 | { |
| 140 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 141 | data->rtp_base = atoi(argv[0]); |
| 142 | return CMD_SUCCESS; |
| 143 | } |
| 144 | |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 145 | DEFUN(cfg_net_bsc_codec_list, |
| 146 | cfg_net_bsc_codec_list_cmd, |
| 147 | "codec-list .LIST", |
| 148 | "Set the allowed audio codecs\n" |
| 149 | "List of audio codecs\n") |
| 150 | { |
| 151 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 152 | int saw_fr, saw_hr; |
| 153 | int i; |
| 154 | |
| 155 | saw_fr = saw_hr = 0; |
| 156 | |
| 157 | /* free the old list... if it exists */ |
| 158 | if (data->audio_support) { |
| 159 | talloc_free(data->audio_support); |
| 160 | data->audio_support = NULL; |
| 161 | data->audio_length = 0; |
| 162 | } |
| 163 | |
| 164 | /* create a new array */ |
| 165 | data->audio_support = |
| 166 | talloc_zero_array(data, struct gsm_audio_support *, argc); |
| 167 | data->audio_length = argc; |
| 168 | |
| 169 | for (i = 0; i < argc; ++i) { |
| 170 | /* check for hrX or frX */ |
| 171 | if (strlen(argv[i]) != 3 |
| 172 | || argv[i][1] != 'r' |
| 173 | || (argv[i][0] != 'h' && argv[i][0] != 'f') |
| 174 | || argv[i][2] < 0x30 |
| 175 | || argv[i][2] > 0x39) |
| 176 | goto error; |
| 177 | |
| 178 | data->audio_support[i] = talloc_zero(data->audio_support, |
| 179 | struct gsm_audio_support); |
| 180 | data->audio_support[i]->ver = atoi(argv[i] + 2); |
| 181 | |
| 182 | if (strncmp("hr", argv[i], 2) == 0) { |
| 183 | data->audio_support[i]->hr = 1; |
| 184 | saw_hr = 1; |
| 185 | } else if (strncmp("fr", argv[i], 2) == 0) { |
| 186 | data->audio_support[i]->hr = 0; |
| 187 | saw_fr = 1; |
| 188 | } |
| 189 | |
| 190 | if (saw_hr && saw_fr) { |
| 191 | vty_out(vty, "Can not have full-rate and half-rate codec.%s", |
| 192 | VTY_NEWLINE); |
| 193 | return CMD_ERR_INCOMPLETE; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | return CMD_SUCCESS; |
| 198 | |
| 199 | error: |
| 200 | vty_out(vty, "Codec name must be hrX or frX. Was '%s'%s", |
| 201 | argv[i], VTY_NEWLINE); |
| 202 | return CMD_ERR_INCOMPLETE; |
| 203 | } |
| 204 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 205 | DEFUN(cfg_net_msc_dest, |
| 206 | cfg_net_msc_dest_cmd, |
| 207 | "dest A.B.C.D <1-65000> <0-255>", |
| 208 | "Add a destination to a MUX/MSC\n" |
| 209 | "IP Address\n" "Port\n" "DSCP\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 210 | { |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 211 | struct bsc_msc_dest *dest; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 212 | struct osmo_msc_data *data = osmo_msc_data(vty); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 213 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 214 | dest = talloc_zero(data, struct bsc_msc_dest); |
| 215 | if (!dest) { |
| 216 | vty_out(vty, "%%Failed to create structure.%s", VTY_NEWLINE); |
| 217 | return CMD_WARNING; |
| 218 | } |
| 219 | |
| 220 | dest->ip = talloc_strdup(data, argv[0]); |
| 221 | if (!dest->ip) { |
| 222 | vty_out(vty, "%%Failed to copy dest ip.%s", VTY_NEWLINE); |
| 223 | talloc_free(dest); |
| 224 | return CMD_WARNING; |
| 225 | } |
| 226 | |
| 227 | dest->port = atoi(argv[1]); |
| 228 | dest->dscp = atoi(argv[2]); |
| 229 | llist_add_tail(&dest->list, &data->dests); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 230 | return CMD_SUCCESS; |
| 231 | } |
| 232 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 233 | DEFUN(cfg_net_msc_no_dest, |
| 234 | cfg_net_msc_no_dest_cmd, |
| 235 | "no dest A.B.C.D <1-65000> <0-255>", |
| 236 | NO_STR "Remove a destination to a MUX/MSC\n" |
| 237 | "IP Address\n" "Port\n" "DSCP\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 238 | { |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 239 | struct bsc_msc_dest *dest, *tmp; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 240 | struct osmo_msc_data *data = osmo_msc_data(vty); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 241 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 242 | int port = atoi(argv[1]); |
| 243 | int dscp = atoi(argv[2]); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 244 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 245 | llist_for_each_entry_safe(dest, tmp, &data->dests, list) { |
| 246 | if (port != dest->port || dscp != dest->dscp |
| 247 | || strcmp(dest->ip, argv[0]) != 0) |
| 248 | continue; |
| 249 | |
| 250 | llist_del(&dest->list); |
| 251 | talloc_free(dest); |
| 252 | } |
| 253 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 254 | return CMD_SUCCESS; |
| 255 | } |
| 256 | |
| 257 | DEFUN(cfg_net_msc_ping_time, |
| 258 | cfg_net_msc_ping_time_cmd, |
| 259 | "timeout-ping NR", |
| 260 | "Set the PING interval, negative for not sending PING") |
| 261 | { |
| 262 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 263 | data->ping_timeout = atoi(argv[0]); |
| 264 | return CMD_SUCCESS; |
| 265 | } |
| 266 | |
| 267 | DEFUN(cfg_net_msc_pong_time, |
| 268 | cfg_net_msc_pong_time_cmd, |
| 269 | "timeout-pong NR", |
| 270 | "Set the time to wait for a PONG.") |
| 271 | { |
| 272 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 273 | data->pong_timeout = atoi(argv[0]); |
| 274 | return CMD_SUCCESS; |
| 275 | } |
| 276 | |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 277 | DEFUN(cfg_net_msc_mid_call_text, |
| 278 | cfg_net_msc_mid_call_text_cmd, |
| 279 | "mid-call-text .TEXT", |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 280 | "Set the USSD notifcation to be send.\n" "Text to be sent\n") |
| 281 | { |
| 282 | struct osmo_msc_data *data = osmo_msc_data(vty); |
Holger Hans Peter Freyther | 414bc4a | 2010-11-22 22:27:39 +0100 | [diff] [blame] | 283 | char *txt = argv_concat(argv, argc, 0); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 284 | if (!txt) |
| 285 | return CMD_WARNING; |
| 286 | |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 287 | bsc_replace_string(data, &data->mid_call_txt, txt); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 288 | talloc_free(txt); |
| 289 | return CMD_SUCCESS; |
| 290 | } |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 291 | |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 292 | DEFUN(cfg_net_msc_mid_call_timeout, |
| 293 | cfg_net_msc_mid_call_timeout_cmd, |
| 294 | "mid-call-timeout NR", |
Holger Hans Peter Freyther | 625b6e4 | 2010-11-22 18:25:02 +0100 | [diff] [blame] | 295 | "Switch from Grace to Off in NR seconds.\n" "Timeout in seconds\n") |
| 296 | { |
| 297 | struct osmo_msc_data *data = osmo_msc_data(vty); |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 298 | data->mid_call_timeout = atoi(argv[0]); |
Holger Hans Peter Freyther | 625b6e4 | 2010-11-22 18:25:02 +0100 | [diff] [blame] | 299 | return CMD_SUCCESS; |
| 300 | } |
| 301 | |
Holger Hans Peter Freyther | fbceea4 | 2010-11-26 00:11:34 +0100 | [diff] [blame] | 302 | DEFUN(cfg_net_msc_welcome_ussd, |
| 303 | cfg_net_msc_welcome_ussd_cmd, |
| 304 | "bsc-welcome-text .TEXT", |
| 305 | "Set the USSD notification to be sent.\n" "Text to be sent\n") |
| 306 | { |
| 307 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 308 | char *str = argv_concat(argv, argc, 0); |
| 309 | if (!str) |
| 310 | return CMD_WARNING; |
| 311 | |
| 312 | bsc_replace_string(data, &data->ussd_welcome_txt, str); |
| 313 | talloc_free(str); |
| 314 | return CMD_SUCCESS; |
| 315 | } |
Holger Hans Peter Freyther | 625b6e4 | 2010-11-22 18:25:02 +0100 | [diff] [blame] | 316 | |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 317 | DEFUN(cfg_net_rf_socket, |
| 318 | cfg_net_rf_socket_cmd, |
| 319 | "bsc-rf-socket PATH", |
| 320 | "Set the filename for the RF control interface.\n" "RF Control path\n") |
| 321 | { |
| 322 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 323 | |
| 324 | bsc_replace_string(data, &data->rf_ctrl_name, argv[0]); |
| 325 | return CMD_SUCCESS; |
| 326 | } |
| 327 | |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 328 | int bsc_vty_init_extra(void) |
| 329 | { |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 330 | install_element(CONFIG_NODE, &cfg_net_msc_cmd); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 331 | install_node(&msc_node, config_write_msc); |
| 332 | install_default(MSC_NODE); |
| 333 | install_element(MSC_NODE, &cfg_net_bsc_token_cmd); |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 334 | install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd); |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 335 | install_element(MSC_NODE, &cfg_net_bsc_mcc_cmd); |
Holger Hans Peter Freyther | fe16622 | 2010-11-03 13:32:48 +0100 | [diff] [blame] | 336 | install_element(MSC_NODE, &cfg_net_bsc_rtp_base_cmd); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 337 | install_element(MSC_NODE, &cfg_net_bsc_codec_list_cmd); |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 338 | install_element(MSC_NODE, &cfg_net_msc_dest_cmd); |
| 339 | install_element(MSC_NODE, &cfg_net_msc_no_dest_cmd); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 340 | install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd); |
| 341 | install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd); |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 342 | install_element(MSC_NODE, &cfg_net_msc_mid_call_text_cmd); |
| 343 | install_element(MSC_NODE, &cfg_net_msc_mid_call_timeout_cmd); |
Holger Hans Peter Freyther | fbceea4 | 2010-11-26 00:11:34 +0100 | [diff] [blame] | 344 | install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd); |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 345 | install_element(MSC_NODE, &cfg_net_rf_socket_cmd); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 346 | |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 347 | return 0; |
| 348 | } |