summaryrefslogtreecommitdiff
path: root/main/rtp.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-04-30 16:16:26 +0000
committerRussell Bryant <russell@russellbryant.com>2007-04-30 16:16:26 +0000
commitb419fc1134c7cb0b0ba92428185d3546be98cf11 (patch)
treed7bac5beb193490f4242d9a69cad3457727ba5d8 /main/rtp.c
parenta91f9b138db6eecfe65b29f788c82a688526b9cf (diff)
Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The
file doc/qos.tex has been updated to document the new functionality. (issue #9540, patch submitted by IgorG) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 2c5347413..23d080639 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -53,6 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
+#include "asterisk/netsock.h"
#include "asterisk/cli.h"
#include "asterisk/unaligned.h"
#include "asterisk/utils.h"
@@ -2040,13 +2041,9 @@ struct ast_rtp *ast_rtp_new(struct sched_context *sched, struct io_context *io,
return ast_rtp_new_with_bindaddr(sched, io, rtcpenable, callbackmode, ia);
}
-int ast_rtp_settos(struct ast_rtp *rtp, int tos)
+int ast_rtp_setqos(struct ast_rtp *rtp, int tos, int cos)
{
- int res;
-
- if ((res = setsockopt(rtp->s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))))
- ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
- return res;
+ return ast_netsock_set_qos(rtp->s, tos, cos);
}
void ast_rtp_set_peer(struct ast_rtp *rtp, struct sockaddr_in *them)