aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-27 20:34:45 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-27 21:01:19 +0800
commit38a2653801d3a684f26bad2169c129383a38fc53 (patch)
tree4468aa56db5246eecb30ae2bea0ee4851397239f /openbsc
parentf1bb05fbef79fc4f112f3a9604d2f8e03d0aa652 (diff)
mgcp: Rename TOS to DSCP
DSCP is the more modern information for TOS and the kernel will set parts of TOS by itself (e.g. for ECN).
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/mgcp.h2
-rw-r--r--openbsc/src/mgcp/mgcp_network.c4
-rw-r--r--openbsc/src/mgcp/mgcp_vty.c20
3 files changed, 16 insertions, 10 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h
index 5622daa51..9bbf5544f 100644
--- a/openbsc/include/openbsc/mgcp.h
+++ b/openbsc/include/openbsc/mgcp.h
@@ -93,7 +93,7 @@ struct mgcp_config {
int audio_loop;
int early_bind;
int rtp_base_port;
- int endp_tos;
+ int endp_dscp;
/* only used in forward mode */
char *forward_ip;
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c
index 354daadb2..723c9e3cd 100644
--- a/openbsc/src/mgcp/mgcp_network.c
+++ b/openbsc/src/mgcp/mgcp_network.c
@@ -257,8 +257,8 @@ static int bind_rtp(struct mgcp_endpoint *endp)
goto cleanup1;
}
- set_ip_tos(endp->local_rtp.fd, cfg->endp_tos);
- set_ip_tos(endp->local_rtcp.fd, cfg->endp_tos);
+ set_ip_tos(endp->local_rtp.fd, cfg->endp_dscp);
+ set_ip_tos(endp->local_rtcp.fd, cfg->endp_dscp);
endp->local_rtp.cb = rtp_data_cb;
endp->local_rtp.data = endp;
diff --git a/openbsc/src/mgcp/mgcp_vty.c b/openbsc/src/mgcp/mgcp_vty.c
index 717b4a333..e4e1188ed 100644
--- a/openbsc/src/mgcp/mgcp_vty.c
+++ b/openbsc/src/mgcp/mgcp_vty.c
@@ -57,7 +57,7 @@ static int config_write_mgcp(struct vty *vty)
vty_out(vty, " bind port %u%s", g_cfg->source_port, VTY_NEWLINE);
vty_out(vty, " bind early %u%s", !!g_cfg->early_bind, VTY_NEWLINE);
vty_out(vty, " rtp base %u%s", g_cfg->rtp_base_port, VTY_NEWLINE);
- vty_out(vty, " rtp ip-tos %d%s", g_cfg->endp_tos, VTY_NEWLINE);
+ vty_out(vty, " rtp ip-dscp %d%s", g_cfg->endp_dscp, VTY_NEWLINE);
if (g_cfg->audio_payload != -1)
vty_out(vty, " sdp audio payload number %d%s", g_cfg->audio_payload, VTY_NEWLINE);
if (g_cfg->audio_name)
@@ -166,16 +166,21 @@ DEFUN(cfg_mgcp_rtp_base_port,
return CMD_SUCCESS;
}
-DEFUN(cfg_mgcp_rtp_ip_tos,
- cfg_mgcp_rtp_ip_tos_cmd,
- "rtp ip-tos <0-255>",
- "Set the IP_TOS socket attribute on the RTP/RTCP sockets.\n" "The TOS value.")
+DEFUN(cfg_mgcp_rtp_ip_dscp,
+ cfg_mgcp_rtp_ip_dscp_cmd,
+ "rtp ip-dscp <0-255>",
+ "Set the IP_TOS socket attribute on the RTP/RTCP sockets.\n" "The DSCP value.")
{
- int tos = atoi(argv[0]);
- g_cfg->endp_tos = tos;
+ int dscp = atoi(argv[0]);
+ g_cfg->endp_dscp = dscp;
return CMD_SUCCESS;
}
+ALIAS_DEPRECATED(cfg_mgcp_rtp_ip_dscp, cfg_mgcp_rtp_ip_tos_cmd,
+ "rtp ip-tos <0-255>",
+ "Set the IP_TOS socket attribute on the RTP/RTCP sockets.\n" "The DSCP value.")
+
+
DEFUN(cfg_mgcp_sdp_payload_number,
cfg_mgcp_sdp_payload_number_cmd,
"sdp audio payload number <1-255>",
@@ -260,6 +265,7 @@ int mgcp_vty_init(void)
install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd);
install_element(MGCP_NODE, &cfg_mgcp_bind_early_cmd);
install_element(MGCP_NODE, &cfg_mgcp_rtp_base_port_cmd);
+ install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd);
install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_tos_cmd);
install_element(MGCP_NODE, &cfg_mgcp_sdp_payload_number_cmd);
install_element(MGCP_NODE, &cfg_mgcp_sdp_payload_name_cmd);