aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-04-07 22:58:46 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-07 22:58:46 +0200
commit7afd71f96aa0b9bac84f5c48aa4b5c2a27bdae93 (patch)
treefeeb94ee76a602b22345d2be36c6e86f98b37bb2 /openbsc/src/vty_interface.c
parentfa91bffae55ae93809675d403acc678eaa44e119 (diff)
bsc: Make it possible to set the RF interface via the CLI
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r--openbsc/src/vty_interface.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 8c97d9a32..a4557bd75 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -542,6 +542,8 @@ static int config_write_net(struct vty *vty)
vty_out(vty, " mid-call-timeout %d%s", gsmnet->mid_call_timeout, VTY_NEWLINE);
if (gsmnet->ussd_welcome_txt)
vty_out(vty, " bsc-welcome-text %s%s", gsmnet->ussd_welcome_txt, VTY_NEWLINE);
+ if (gsmnet->rf_ctrl_name)
+ vty_out(vty, " bsc-rf-socket %s%s", gsmnet->rf_ctrl_name, VTY_NEWLINE);
return CMD_SUCCESS;
@@ -1499,6 +1501,17 @@ DEFUN(cfg_net_welcome_ussd,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_rf_socket,
+ cfg_net_rf_socket_cmd,
+ "bsc-rf-socket PATH",
+ "Set the filename for the RF control interface.\n" "RF Control path\n")
+{
+ if (gsmnet->rf_ctrl_name)
+ talloc_free(gsmnet->rf_ctrl_name);
+ gsmnet->rf_ctrl_name = talloc_strdup(gsmnet, argv[0]);
+ return CMD_SUCCESS;
+}
+
#define DECLARE_TIMER(number, doc) \
DEFUN(cfg_net_T##number, \
cfg_net_T##number##_cmd, \
@@ -2324,6 +2337,7 @@ int bsc_vty_init(struct gsm_network *net)
install_element(GSMNET_NODE, &cfg_net_mid_call_text_cmd);
install_element(GSMNET_NODE, &cfg_net_mid_call_timeout_cmd);
install_element(GSMNET_NODE, &cfg_net_welcome_ussd_cmd);
+ install_element(GSMNET_NODE, &cfg_net_rf_socket_cmd);
install_element(GSMNET_NODE, &cfg_bts_cmd);
install_node(&bts_node, config_write_bts);