aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_client_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo_client_vty.c')
-rw-r--r--src/osmo_client_vty.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/osmo_client_vty.c b/src/osmo_client_vty.c
index 30158c5..8e21d67 100644
--- a/src/osmo_client_vty.c
+++ b/src/osmo_client_vty.c
@@ -46,13 +46,13 @@ static struct osmo_pcap_client_conn *get_conn(struct vty *vty)
static struct cmd_node client_node = {
CLIENT_NODE,
- "%s(client)#",
+ "%s(client)# ",
1,
};
static struct cmd_node server_node = {
CLIENT_SERVER_NODE,
- "%s(server)#",
+ "%s(server)# ",
1,
};
@@ -104,6 +104,10 @@ static void write_client_conn_data(
if (conn->protocol != PROTOCOL_OSMOPCAP)
vty_out(vty, "%s protocol %s%s", indent,
get_value_string(osmopcap_protocol_names, conn->protocol), VTY_NEWLINE);
+
+ if (conn->wqueue.max_length != WQUEUE_MAXLEN_DEFAULT)
+ vty_out(vty, "%s wqueue max-length %u%s", indent,
+ conn->wqueue.max_length, VTY_NEWLINE);
}
static int config_write_server(struct vty *vty)
@@ -518,8 +522,20 @@ DEFUN(cfg_client_protocol,
return CMD_SUCCESS;
}
+DEFUN(cfg_wqueue_maxlength,
+ cfg_wqueue_maxlength_cmd,
+ "wqueue max-length <1-4294967295>",
+ "Configure the write-queue used for transfer\n"
+ "Configure the maximum amount of packets to be stored in the write-queue\n"
+ "Maximum amount of packets before dropping starts\n")
+{
+ struct osmo_pcap_client_conn *conn = get_conn(vty);
+
+ conn->wqueue.max_length = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
-int vty_client_init(struct osmo_pcap_client *pcap)
+int vty_client_init(void)
{
install_element(CONFIG_NODE, &cfg_client_cmd);
install_node(&client_node, config_write_client);
@@ -535,6 +551,7 @@ int vty_client_init(struct osmo_pcap_client *pcap)
install_element(CLIENT_NODE, &cfg_server_port_cmd);
install_element(CLIENT_NODE, &cfg_source_ip_cmd);
install_element(CLIENT_NODE, &cfg_protocol_cmd);
+ install_element(CLIENT_NODE, &cfg_wqueue_maxlength_cmd);
install_element(CLIENT_NODE, &cfg_enable_tls_cmd);
install_element(CLIENT_NODE, &cfg_disable_tls_cmd);