aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-03-06 11:28:40 +0100
committerHarald Welte <laforge@osmocom.org>2020-03-08 17:56:52 +0100
commitcb4340b8a443811a7bfa281a32937663b51c8d62 (patch)
tree5168afaef67ea1327f1033b2d0e2e906165a9731 /src/common/vty.c
parent58d79e88ad58887c92ecc98024f537e3efbb9469 (diff)
rsl: make IP DSCP configurablelaforge/virt-voice
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index c03f0d42..ab38dc19 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -237,6 +237,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, "%s", VTY_NEWLINE);
vty_out(vty, " rtp port-range %u %u%s", bts->rtp_port_range_start,
bts->rtp_port_range_end, VTY_NEWLINE);
+ if (bts->rtp_ip_dscp != -1)
+ vty_out(vty, " rtp ip-dscp %i%s", bts->rtp_ip_dscp, VTY_NEWLINE);
vty_out(vty, " paging queue-size %u%s", paging_get_queue_max(bts->paging_state),
VTY_NEWLINE);
vty_out(vty, " paging lifetime %u%s", paging_get_lifetime(bts->paging_state),
@@ -501,6 +503,19 @@ DEFUN(cfg_bts_rtp_port_range,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_rtp_ip_dscp,
+ cfg_bts_rtp_ip_dscp_cmd,
+ "rtp ip-dscp <0-63>",
+ RTP_STR "Specify DSCP for RTP/IP packets\n" "The DSCP value (upper 6 bits of TOS)\n")
+{
+ struct gsm_bts *bts = vty->index;
+ int dscp = atoi(argv[0]);
+
+ bts->rtp_ip_dscp = dscp;
+
+ return CMD_SUCCESS;
+}
+
#define PAG_STR "Paging related parameters\n"
DEFUN(cfg_bts_paging_queue_size,
@@ -1665,6 +1680,7 @@ int bts_vty_init(struct gsm_bts *bts)
install_element(BTS_NODE, &cfg_bts_rtp_bind_ip_cmd);
install_element(BTS_NODE, &cfg_bts_rtp_jitbuf_cmd);
install_element(BTS_NODE, &cfg_bts_rtp_port_range_cmd);
+ install_element(BTS_NODE, &cfg_bts_rtp_ip_dscp_cmd);
install_element(BTS_NODE, &cfg_bts_band_cmd);
install_element(BTS_NODE, &cfg_description_cmd);
install_element(BTS_NODE, &cfg_no_description_cmd);