aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty_interface.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-22 17:06:34 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-22 17:24:06 +0100
commitc6bfa27b5e56845491c6d03406d4dba65d86095f (patch)
tree91432548eb6f4958d425e4c0ef9cd0a3f567f83c /src/vty_interface.c
parent0b316224829d172a76c1f6145568f8470b0a7dd6 (diff)
udp: Allow to create multiple links via UDP
This is the easiest way to support multiple links over UDP. Specify the number you want and they will be initiated. All these links will run via the same UDP port.
Diffstat (limited to 'src/vty_interface.c')
-rw-r--r--src/vty_interface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vty_interface.c b/src/vty_interface.c
index c529e1c..7a9c157 100644
--- a/src/vty_interface.c
+++ b/src/vty_interface.c
@@ -74,6 +74,7 @@ static int config_write_cell(struct vty *vty)
vty_out(vty, " udp dest port %d%s", bsc.udp_port, VTY_NEWLINE);
vty_out(vty, " udp src port %d%s", bsc.src_port, VTY_NEWLINE);
vty_out(vty, " udp reset %d%s", bsc.udp_reset_timeout, VTY_NEWLINE);
+ vty_out(vty, " udp number-links %d%s", bsc.udp_nr_links, VTY_NEWLINE);
vty_out(vty, " msc ip %s%s", bsc.msc_address, VTY_NEWLINE);
vty_out(vty, " msc ip-dscp %d%s", bsc.msc_ip_dscp, VTY_NEWLINE);
vty_out(vty, " msc token %s%s", bsc.token, VTY_NEWLINE);
@@ -171,6 +172,14 @@ DEFUN(cfg_udp_reset, cfg_udp_reset_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_udp_nr_links, cfg_udp_nr_links_cmd,
+ "udp number-links <1-32>",
+ "Set the number of links to use\n")
+{
+ bsc.udp_nr_links = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_sltm_once, cfg_sltm_once_cmd,
"mtp sltm once (0|1)",
"Send SLTMs until the link is established.")
@@ -361,6 +370,7 @@ void cell_vty_init(void)
install_element(CELLMGR_NODE, &cfg_udp_dst_port_cmd);
install_element(CELLMGR_NODE, &cfg_udp_src_port_cmd);
install_element(CELLMGR_NODE, &cfg_udp_reset_cmd);
+ install_element(CELLMGR_NODE, &cfg_udp_nr_links_cmd);
install_element(CELLMGR_NODE, &cfg_sltm_once_cmd);
install_element(CELLMGR_NODE, &cfg_msc_ip_cmd);
install_element(CELLMGR_NODE, &cfg_msc_token_cmd);