diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-30 16:16:26 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-30 16:16:26 +0000 |
commit | 3d2428efd418ec960c90725ad9588056ace5ec5c (patch) | |
tree | d7bac5beb193490f4242d9a69cad3457727ba5d8 /main/udptl.c | |
parent | 7443c4962d761cf4b24aecdc54f78a1088de93db (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: http://svn.digium.com/svn/asterisk/trunk@62457 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/udptl.c')
-rw-r--r-- | main/udptl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/main/udptl.c b/main/udptl.c index 39c047183..d255f9375 100644 --- a/main/udptl.c +++ b/main/udptl.c @@ -73,6 +73,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" @@ -872,13 +873,9 @@ struct ast_udptl *ast_udptl_new(struct sched_context *sched, struct io_context * return ast_udptl_new_with_bindaddr(sched, io, callbackmode, ia); } -int ast_udptl_settos(struct ast_udptl *udptl, int tos) +int ast_udptl_setqos(struct ast_udptl *udptl, int tos, int cos) { - int res; - - if ((res = setsockopt(udptl->fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)))) - ast_log(LOG_WARNING, "UDPTL unable to set TOS to %d\n", tos); - return res; + return ast_netsock_set_qos(udptl->fd, tos, cos); } void ast_udptl_set_peer(struct ast_udptl *udptl, struct sockaddr_in *them) |