rsl: make IP DSCP configurable
Related: OS#4438 Depends: libosmo-abis I41603db8c1286660ad57ac1c78a8fb393a2b080b Change-Id: Icdef5d40243fefdeae23f3bcf9c6702e8487928a
This commit is contained in:
parent
ff5537de50
commit
f38c6b35d5
|
@ -741,6 +741,7 @@ struct gsm_bts {
|
||||||
uint16_t rtp_port_range_start;
|
uint16_t rtp_port_range_start;
|
||||||
uint16_t rtp_port_range_end;
|
uint16_t rtp_port_range_end;
|
||||||
uint16_t rtp_port_range_next;
|
uint16_t rtp_port_range_next;
|
||||||
|
int rtp_ip_dscp;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */
|
uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */
|
||||||
|
|
|
@ -2009,9 +2009,12 @@ static int bind_rtp(struct gsm_bts *bts, struct osmo_rtp_socket *rs, const char
|
||||||
|
|
||||||
bts->rtp_port_range_next += 2;
|
bts->rtp_port_range_next += 2;
|
||||||
|
|
||||||
if (rc == 0)
|
if (rc == 0) {
|
||||||
|
if (osmo_rtp_socket_set_dscp(rs, bts->rtp_ip_dscp))
|
||||||
|
LOGP(DRSL, LOGL_ERROR, "failed to set DSCP=%i\n", bts->rtp_ip_dscp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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, "%s", VTY_NEWLINE);
|
||||||
vty_out(vty, " rtp port-range %u %u%s", bts->rtp_port_range_start,
|
vty_out(vty, " rtp port-range %u %u%s", bts->rtp_port_range_start,
|
||||||
bts->rtp_port_range_end, VTY_NEWLINE);
|
bts->rtp_port_range_end, VTY_NEWLINE);
|
||||||
|
if (bts->rtp_ip_dscp)
|
||||||
|
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_out(vty, " paging queue-size %u%s", paging_get_queue_max(bts->paging_state),
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
vty_out(vty, " paging lifetime %u%s", paging_get_lifetime(bts->paging_state),
|
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;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN(cfg_bts_rtp_ip_dscp,
|
||||||
|
cfg_bts_rtp_ip_dscp_cmd,
|
||||||
|
"rtp ip-dscp <0-255>",
|
||||||
|
RTP_STR "Apply IP_TOS to the audio stream\n" "The DSCP value\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"
|
#define PAG_STR "Paging related parameters\n"
|
||||||
|
|
||||||
DEFUN(cfg_bts_paging_queue_size,
|
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_bind_ip_cmd);
|
||||||
install_element(BTS_NODE, &cfg_bts_rtp_jitbuf_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_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_bts_band_cmd);
|
||||||
install_element(BTS_NODE, &cfg_description_cmd);
|
install_element(BTS_NODE, &cfg_description_cmd);
|
||||||
install_element(BTS_NODE, &cfg_no_description_cmd);
|
install_element(BTS_NODE, &cfg_no_description_cmd);
|
||||||
|
|
Loading…
Reference in New Issue