Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 1 | /* OpenBSC interface to quagga VTY */ |
| 2 | /* (C) 2009 by Harald Welte <laforge@gnumonks.org> |
Holger Hans Peter Freyther | 02bd8f4 | 2009-10-27 12:47:06 +0100 | [diff] [blame] | 3 | * (C) 2009 by Holger Hans Peter Freyther |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 4 | * All Rights Reserved |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 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 |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along |
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #include <stdlib.h> |
| 23 | #include <unistd.h> |
| 24 | #include <sys/types.h> |
| 25 | |
| 26 | #include <vty/command.h> |
| 27 | #include <vty/buffer.h> |
| 28 | #include <vty/vty.h> |
| 29 | |
| 30 | #include <arpa/inet.h> |
| 31 | |
| 32 | #include <openbsc/linuxlist.h> |
| 33 | #include <openbsc/gsm_data.h> |
| 34 | #include <openbsc/gsm_subscriber.h> |
Harald Welte | 0101b81 | 2009-11-17 06:00:23 +0100 | [diff] [blame] | 35 | #include <openbsc/silent_call.h> |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 36 | #include <openbsc/gsm_04_11.h> |
| 37 | #include <openbsc/e1_input.h> |
| 38 | #include <openbsc/abis_nm.h> |
| 39 | #include <openbsc/gsm_utils.h> |
| 40 | #include <openbsc/db.h> |
| 41 | #include <openbsc/talloc.h> |
Harald Welte | b8678a7 | 2009-11-14 10:08:40 +0100 | [diff] [blame] | 42 | #include <openbsc/signal.h> |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 43 | |
| 44 | /* forward declarations */ |
| 45 | void subscr_dump_vty(struct vty *vty, struct gsm_subscriber *subscr); |
| 46 | |
| 47 | static struct gsm_network *gsmnet; |
| 48 | |
| 49 | struct cmd_node subscr_node = { |
| 50 | SUBSCR_NODE, |
| 51 | "%s(subscriber)#", |
| 52 | 1, |
| 53 | }; |
| 54 | |
| 55 | static int dummy_config_write(struct vty *v) |
| 56 | { |
| 57 | return CMD_SUCCESS; |
| 58 | } |
| 59 | |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 60 | static struct buffer *argv_to_buffer(int argc, const char *argv[], int base) |
| 61 | { |
| 62 | struct buffer *b = buffer_new(1024); |
| 63 | int i; |
| 64 | |
| 65 | if (!b) |
| 66 | return NULL; |
| 67 | |
| 68 | for (i = base; i < argc; i++) { |
| 69 | buffer_putstr(b, argv[i]); |
| 70 | buffer_putc(b, ' '); |
| 71 | } |
| 72 | buffer_putc(b, '\0'); |
| 73 | |
| 74 | return b; |
| 75 | } |
| 76 | |
| 77 | /* per-subscriber configuration */ |
| 78 | DEFUN(cfg_subscr, |
| 79 | cfg_subscr_cmd, |
| 80 | "subscriber IMSI", |
| 81 | "Select a Subscriber to configure\n") |
| 82 | { |
| 83 | const char *imsi = argv[0]; |
| 84 | struct gsm_subscriber *subscr; |
| 85 | |
| 86 | subscr = subscr_get_by_imsi(gsmnet, imsi); |
| 87 | if (!subscr) { |
| 88 | vty_out(vty, "%% No subscriber for IMSI %s%s", |
| 89 | imsi, VTY_NEWLINE); |
| 90 | return CMD_WARNING; |
| 91 | } |
| 92 | |
Holger Hans Peter Freyther | 02bd8f4 | 2009-10-27 12:47:06 +0100 | [diff] [blame] | 93 | /* vty_go_parent should put this subscriber */ |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 94 | vty->index = subscr; |
| 95 | vty->node = SUBSCR_NODE; |
| 96 | |
| 97 | return CMD_SUCCESS; |
| 98 | } |
| 99 | |
| 100 | /* Subscriber */ |
| 101 | DEFUN(show_subscr, |
| 102 | show_subscr_cmd, |
| 103 | "show subscriber [IMSI]", |
| 104 | SHOW_STR "Display information about a subscriber\n") |
| 105 | { |
| 106 | const char *imsi; |
| 107 | struct gsm_subscriber *subscr; |
| 108 | |
| 109 | if (argc >= 1) { |
| 110 | imsi = argv[0]; |
| 111 | subscr = subscr_get_by_imsi(gsmnet, imsi); |
| 112 | if (!subscr) { |
| 113 | vty_out(vty, "%% unknown subscriber%s", |
| 114 | VTY_NEWLINE); |
| 115 | return CMD_WARNING; |
| 116 | } |
| 117 | subscr_dump_vty(vty, subscr); |
Holger Hans Peter Freyther | 02bd8f4 | 2009-10-27 12:47:06 +0100 | [diff] [blame] | 118 | subscr_put(subscr); |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 119 | |
| 120 | return CMD_SUCCESS; |
| 121 | } |
| 122 | |
| 123 | /* FIXME: iterate over all subscribers ? */ |
| 124 | return CMD_WARNING; |
| 125 | |
| 126 | return CMD_SUCCESS; |
| 127 | } |
| 128 | |
| 129 | DEFUN(show_subscr_cache, |
| 130 | show_subscr_cache_cmd, |
| 131 | "show subscriber cache", |
| 132 | SHOW_STR "Display contents of subscriber cache\n") |
| 133 | { |
| 134 | struct gsm_subscriber *subscr; |
| 135 | |
| 136 | llist_for_each_entry(subscr, &active_subscribers, entry) { |
| 137 | vty_out(vty, " Subscriber:%s", VTY_NEWLINE); |
| 138 | subscr_dump_vty(vty, subscr); |
| 139 | } |
| 140 | |
| 141 | return CMD_SUCCESS; |
| 142 | } |
| 143 | |
| 144 | DEFUN(sms_send_pend, |
| 145 | sms_send_pend_cmd, |
Sylvain Munaut | c2e0a44 | 2009-12-22 13:22:29 +0100 | [diff] [blame] | 146 | "sms send pending", |
| 147 | "Send all pending SMS") |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 148 | { |
| 149 | struct gsm_sms *sms; |
Sylvain Munaut | c2e0a44 | 2009-12-22 13:22:29 +0100 | [diff] [blame] | 150 | int id = 0; |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 151 | |
| 152 | while (1) { |
Sylvain Munaut | c2e0a44 | 2009-12-22 13:22:29 +0100 | [diff] [blame] | 153 | sms = db_sms_get_unsent_by_subscr(gsmnet, id); |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 154 | if (!sms) |
Sylvain Munaut | c2e0a44 | 2009-12-22 13:22:29 +0100 | [diff] [blame] | 155 | break; |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 156 | |
| 157 | gsm411_send_sms_subscr(sms->receiver, sms); |
Sylvain Munaut | c2e0a44 | 2009-12-22 13:22:29 +0100 | [diff] [blame] | 158 | |
| 159 | id = sms->receiver->id + 1; |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | return CMD_SUCCESS; |
| 163 | } |
| 164 | |
| 165 | struct gsm_sms *sms_from_text(struct gsm_subscriber *receiver, const char *text) |
| 166 | { |
| 167 | struct gsm_sms *sms = sms_alloc(); |
| 168 | |
| 169 | if (!sms) |
| 170 | return NULL; |
| 171 | |
| 172 | if (!receiver->lac) { |
| 173 | /* subscriber currently not attached, store in database? */ |
| 174 | return NULL; |
| 175 | } |
| 176 | |
| 177 | sms->receiver = subscr_get(receiver); |
| 178 | strncpy(sms->text, text, sizeof(sms->text)-1); |
| 179 | |
| 180 | /* FIXME: don't use ID 1 static */ |
| 181 | sms->sender = subscr_get_by_id(gsmnet, 1); |
| 182 | sms->reply_path_req = 0; |
| 183 | sms->status_rep_req = 0; |
| 184 | sms->ud_hdr_ind = 0; |
| 185 | sms->protocol_id = 0; /* implicit */ |
| 186 | sms->data_coding_scheme = 0; /* default 7bit */ |
| 187 | strncpy(sms->dest_addr, receiver->extension, sizeof(sms->dest_addr)-1); |
| 188 | /* Generate user_data */ |
| 189 | sms->user_data_len = gsm_7bit_encode(sms->user_data, sms->text); |
| 190 | |
| 191 | return sms; |
| 192 | } |
| 193 | |
| 194 | static int _send_sms_buffer(struct gsm_subscriber *receiver, |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 195 | struct buffer *b, u_int8_t tp_pid) |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 196 | { |
| 197 | struct gsm_sms *sms; |
| 198 | |
| 199 | sms = sms_from_text(receiver, buffer_getstr(b)); |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 200 | sms->protocol_id = tp_pid; |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 201 | gsm411_send_sms_subscr(receiver, sms); |
| 202 | |
| 203 | return CMD_SUCCESS; |
| 204 | } |
| 205 | |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 206 | static struct gsm_subscriber *get_subscr_by_argv(const char *type, |
| 207 | const char *id) |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 208 | { |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 209 | if (!strcmp(type, "extension")) |
| 210 | return subscr_get_by_extension(gsmnet, id); |
| 211 | else if (!strcmp(type, "imsi")) |
| 212 | return subscr_get_by_imsi(gsmnet, id); |
| 213 | else if (!strcmp(type, "tmsi")) |
| 214 | return subscr_get_by_tmsi(gsmnet, atoi(id)); |
| 215 | else if (!strcmp(type, "id")) |
| 216 | return subscr_get_by_id(gsmnet, atoi(id)); |
| 217 | |
| 218 | return NULL; |
| 219 | } |
| 220 | #define SUBSCR_TYPES "(extension|imsi|tmsi|id)" |
| 221 | |
| 222 | DEFUN(subscriber_send_sms, |
| 223 | subscriber_send_sms_cmd, |
| 224 | "subscriber " SUBSCR_TYPES " EXTEN sms send .LINE", |
| 225 | "Select subscriber based on extension") |
| 226 | { |
| 227 | struct gsm_subscriber *subscr = get_subscr_by_argv(argv[0], argv[1]); |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 228 | struct buffer *b; |
| 229 | int rc; |
| 230 | |
Harald Welte | 81cf198 | 2009-11-14 10:11:45 +0100 | [diff] [blame] | 231 | if (!subscr) { |
| 232 | vty_out(vty, "%% No subscriber found for %s %s%s", |
| 233 | argv[0], argv[1], VTY_NEWLINE); |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 234 | return CMD_WARNING; |
Harald Welte | 81cf198 | 2009-11-14 10:11:45 +0100 | [diff] [blame] | 235 | } |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 236 | b = argv_to_buffer(argc, argv, 2); |
| 237 | rc = _send_sms_buffer(subscr, b, 0); |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 238 | buffer_free(b); |
| 239 | |
Harald Welte | bbe3172 | 2009-11-14 10:10:54 +0100 | [diff] [blame] | 240 | subscr_put(subscr); |
| 241 | |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 242 | return rc; |
| 243 | } |
| 244 | |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 245 | DEFUN(subscriber_silent_sms, |
| 246 | subscriber_silent_sms_cmd, |
| 247 | "subscriber " SUBSCR_TYPES " EXTEN silent sms send .LINE", |
| 248 | "Select subscriber based on extension") |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 249 | { |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 250 | struct gsm_subscriber *subscr = get_subscr_by_argv(argv[0], argv[1]); |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 251 | struct buffer *b; |
| 252 | int rc; |
| 253 | |
Harald Welte | 81cf198 | 2009-11-14 10:11:45 +0100 | [diff] [blame] | 254 | if (!subscr) { |
| 255 | vty_out(vty, "%% No subscriber found for %s %s%s", |
| 256 | argv[0], argv[1], VTY_NEWLINE); |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 257 | return CMD_WARNING; |
Harald Welte | 81cf198 | 2009-11-14 10:11:45 +0100 | [diff] [blame] | 258 | } |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 259 | |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 260 | b = argv_to_buffer(argc, argv, 2); |
Harald Welte | bbe3172 | 2009-11-14 10:10:54 +0100 | [diff] [blame] | 261 | rc = _send_sms_buffer(subscr, b, 64); |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 262 | buffer_free(b); |
| 263 | |
Harald Welte | bbe3172 | 2009-11-14 10:10:54 +0100 | [diff] [blame] | 264 | subscr_put(subscr); |
| 265 | |
Harald Welte | 9ee8ee9 | 2009-11-05 15:51:17 +0900 | [diff] [blame] | 266 | return rc; |
| 267 | } |
| 268 | |
Sylvain Munaut | 1c378a7 | 2010-01-02 14:29:43 +0100 | [diff] [blame] | 269 | DEFUN(subscriber_silent_call_start, |
| 270 | subscriber_silent_call_start_cmd, |
| 271 | "subscriber " SUBSCR_TYPES " EXTEN silent call start (any|tch/f|tch/any|sdcch)", |
| 272 | "Start a silent call to a subscriber") |
| 273 | { |
| 274 | struct gsm_subscriber *subscr = get_subscr_by_argv(argv[0], argv[1]); |
| 275 | int rc, type; |
| 276 | |
| 277 | if (!subscr) { |
| 278 | vty_out(vty, "%% No subscriber found for %s %s%s", |
| 279 | argv[0], argv[1], VTY_NEWLINE); |
| 280 | return CMD_WARNING; |
| 281 | } |
| 282 | |
| 283 | if (!strcmp(argv[2], "tch/f")) |
| 284 | type = RSL_CHANNEED_TCH_F; |
| 285 | else if (!strcmp(argv[2], "tch/any")) |
| 286 | type = RSL_CHANNEED_TCH_ForH; |
| 287 | else if (!strcmp(argv[2], "sdcch")) |
| 288 | type = RSL_CHANNEED_SDCCH; |
| 289 | else |
| 290 | type = RSL_CHANNEED_ANY; /* Defaults to ANY */ |
| 291 | |
| 292 | rc = gsm_silent_call_start(subscr, vty, type); |
| 293 | if (rc <= 0) { |
| 294 | vty_out(vty, "%% Subscriber not attached%s", |
| 295 | VTY_NEWLINE); |
| 296 | subscr_put(subscr); |
| 297 | return CMD_WARNING; |
| 298 | } |
| 299 | |
| 300 | subscr_put(subscr); |
| 301 | |
| 302 | return CMD_SUCCESS; |
| 303 | } |
| 304 | |
| 305 | DEFUN(subscriber_silent_call_stop, |
| 306 | subscriber_silent_call_stop_cmd, |
| 307 | "subscriber " SUBSCR_TYPES " EXTEN silent call stop", |
| 308 | "Stop a silent call to a subscriber") |
Harald Welte | b8678a7 | 2009-11-14 10:08:40 +0100 | [diff] [blame] | 309 | { |
| 310 | struct gsm_subscriber *subscr = get_subscr_by_argv(argv[0], argv[1]); |
| 311 | int rc; |
| 312 | |
| 313 | if (!subscr) { |
| 314 | vty_out(vty, "%% No subscriber found for %s %s%s", |
Harald Welte | 81cf198 | 2009-11-14 10:11:45 +0100 | [diff] [blame] | 315 | argv[0], argv[1], VTY_NEWLINE); |
Harald Welte | b8678a7 | 2009-11-14 10:08:40 +0100 | [diff] [blame] | 316 | return CMD_WARNING; |
| 317 | } |
| 318 | |
Sylvain Munaut | 1c378a7 | 2010-01-02 14:29:43 +0100 | [diff] [blame] | 319 | rc = gsm_silent_call_stop(subscr); |
| 320 | if (rc < 0) { |
| 321 | subscr_put(subscr); |
| 322 | return CMD_WARNING; |
Harald Welte | b8678a7 | 2009-11-14 10:08:40 +0100 | [diff] [blame] | 323 | } |
| 324 | |
| 325 | subscr_put(subscr); |
| 326 | |
| 327 | return CMD_SUCCESS; |
| 328 | } |
| 329 | |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 330 | DEFUN(cfg_subscr_name, |
| 331 | cfg_subscr_name_cmd, |
| 332 | "name NAME", |
| 333 | "Set the name of the subscriber") |
| 334 | { |
| 335 | const char *name = argv[0]; |
| 336 | struct gsm_subscriber *subscr = vty->index; |
| 337 | |
| 338 | strncpy(subscr->name, name, sizeof(subscr->name)); |
| 339 | |
| 340 | db_sync_subscriber(subscr); |
| 341 | |
| 342 | return CMD_SUCCESS; |
| 343 | } |
| 344 | |
| 345 | DEFUN(cfg_subscr_extension, |
| 346 | cfg_subscr_extension_cmd, |
| 347 | "extension EXTENSION", |
| 348 | "Set the extension of the subscriber") |
| 349 | { |
| 350 | const char *name = argv[0]; |
| 351 | struct gsm_subscriber *subscr = vty->index; |
| 352 | |
| 353 | strncpy(subscr->extension, name, sizeof(subscr->extension)); |
| 354 | |
| 355 | db_sync_subscriber(subscr); |
| 356 | |
| 357 | return CMD_SUCCESS; |
| 358 | } |
| 359 | |
| 360 | DEFUN(cfg_subscr_authorized, |
| 361 | cfg_subscr_authorized_cmd, |
| 362 | "auth <0-1>", |
| 363 | "Set the authorization status of the subscriber") |
| 364 | { |
| 365 | int auth = atoi(argv[0]); |
| 366 | struct gsm_subscriber *subscr = vty->index; |
| 367 | |
| 368 | if (auth) |
| 369 | subscr->authorized = 1; |
| 370 | else |
| 371 | subscr->authorized = 0; |
| 372 | |
| 373 | db_sync_subscriber(subscr); |
| 374 | |
| 375 | return CMD_SUCCESS; |
| 376 | } |
| 377 | |
Harald Welte | b8678a7 | 2009-11-14 10:08:40 +0100 | [diff] [blame] | 378 | static int scall_cbfn(unsigned int subsys, unsigned int signal, |
| 379 | void *handler_data, void *signal_data) |
| 380 | { |
| 381 | struct scall_signal_data *sigdata = signal_data; |
| 382 | struct vty *vty = sigdata->data; |
| 383 | |
| 384 | switch (signal) { |
| 385 | case S_SCALL_SUCCESS: |
| 386 | vty_out(vty, "%% silent call on ARFCN %u timeslot %u%s", |
| 387 | sigdata->lchan->ts->trx->arfcn, sigdata->lchan->ts->nr, |
| 388 | VTY_NEWLINE); |
| 389 | break; |
| 390 | case S_SCALL_EXPIRED: |
| 391 | vty_out(vty, "%% silent call expired paging%s", VTY_NEWLINE); |
| 392 | break; |
| 393 | } |
| 394 | return 0; |
| 395 | } |
| 396 | |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 397 | int bsc_vty_init_extra(struct gsm_network *net) |
| 398 | { |
| 399 | gsmnet = net; |
| 400 | |
Harald Welte | b8678a7 | 2009-11-14 10:08:40 +0100 | [diff] [blame] | 401 | register_signal_handler(SS_SCALL, scall_cbfn, NULL); |
| 402 | |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 403 | install_element(VIEW_NODE, &show_subscr_cmd); |
| 404 | install_element(VIEW_NODE, &show_subscr_cache_cmd); |
| 405 | |
| 406 | install_element(VIEW_NODE, &sms_send_pend_cmd); |
Harald Welte | 194ef7b | 2009-11-14 08:00:53 +0100 | [diff] [blame] | 407 | |
| 408 | install_element(VIEW_NODE, &subscriber_send_sms_cmd); |
| 409 | install_element(VIEW_NODE, &subscriber_silent_sms_cmd); |
Sylvain Munaut | 1c378a7 | 2010-01-02 14:29:43 +0100 | [diff] [blame] | 410 | install_element(VIEW_NODE, &subscriber_silent_call_start_cmd); |
| 411 | install_element(VIEW_NODE, &subscriber_silent_call_stop_cmd); |
Holger Hans Peter Freyther | bdae6f9 | 2009-08-10 10:17:50 +0200 | [diff] [blame] | 412 | |
| 413 | install_element(CONFIG_NODE, &cfg_subscr_cmd); |
| 414 | install_node(&subscr_node, dummy_config_write); |
| 415 | |
| 416 | install_default(SUBSCR_NODE); |
| 417 | install_element(SUBSCR_NODE, &cfg_subscr_name_cmd); |
| 418 | install_element(SUBSCR_NODE, &cfg_subscr_extension_cmd); |
| 419 | install_element(SUBSCR_NODE, &cfg_subscr_authorized_cmd); |
| 420 | |
| 421 | return 0; |
| 422 | } |