From b419fc1134c7cb0b0ba92428185d3546be98cf11 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 30 Apr 2007 16:16:26 +0000 Subject: 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 --- include/asterisk/acl.h | 3 +++ include/asterisk/netsock.h | 6 ++++-- include/asterisk/rtp.h | 2 +- include/asterisk/udptl.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h index efc604990..9dba9c17e 100644 --- a/include/asterisk/acl.h +++ b/include/asterisk/acl.h @@ -57,6 +57,9 @@ int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *se int ast_ouraddrfor(struct in_addr *them, struct in_addr *us); int ast_find_ourip(struct in_addr *ourip, struct sockaddr_in bindaddr); + +int ast_str2cos(const char *value, unsigned int *cos); + int ast_str2tos(const char *value, unsigned int *tos); const char *ast_tos2str(unsigned int tos); diff --git a/include/asterisk/netsock.h b/include/asterisk/netsock.h index 73a2dd224..f3c932bf1 100644 --- a/include/asterisk/netsock.h +++ b/include/asterisk/netsock.h @@ -41,10 +41,10 @@ struct ast_netsock_list *ast_netsock_list_alloc(void); int ast_netsock_init(struct ast_netsock_list *list); struct ast_netsock *ast_netsock_bind(struct ast_netsock_list *list, struct io_context *ioc, - const char *bindinfo, int defaultport, int tos, ast_io_cb callback, void *data); + const char *bindinfo, int defaultport, int tos, int cos, ast_io_cb callback, void *data); struct ast_netsock *ast_netsock_bindaddr(struct ast_netsock_list *list, struct io_context *ioc, - struct sockaddr_in *bindaddr, int tos, ast_io_cb callback, void *data); + struct sockaddr_in *bindaddr, int tos, int cos, ast_io_cb callback, void *data); int ast_netsock_free(struct ast_netsock_list *list, struct ast_netsock *netsock); @@ -53,6 +53,8 @@ int ast_netsock_release(struct ast_netsock_list *list); struct ast_netsock *ast_netsock_find(struct ast_netsock_list *list, struct sockaddr_in *sa); +int ast_netsock_set_qos(int netsocket, int tos, int cos); + int ast_netsock_sockfd(const struct ast_netsock *ns); const struct sockaddr_in *ast_netsock_boundaddr(const struct ast_netsock *ns); diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h index 9a26ba976..492ad9119 100644 --- a/include/asterisk/rtp.h +++ b/include/asterisk/rtp.h @@ -168,7 +168,7 @@ int ast_rtp_senddigit_end(struct ast_rtp *rtp, char digit); int ast_rtp_sendcng(struct ast_rtp *rtp, int level); -int ast_rtp_settos(struct ast_rtp *rtp, int tos); +int ast_rtp_setqos(struct ast_rtp *rtp, int tos, int cos); /*! \brief Setting RTP payload types from lines in a SDP description: */ void ast_rtp_pt_clear(struct ast_rtp* rtp); diff --git a/include/asterisk/udptl.h b/include/asterisk/udptl.h index 1615a19ef..bc1498f6e 100644 --- a/include/asterisk/udptl.h +++ b/include/asterisk/udptl.h @@ -73,7 +73,7 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl); int ast_udptl_fd(struct ast_udptl *udptl); -int ast_udptl_settos(struct ast_udptl *udptl, int tos); +int ast_udptl_setqos(struct ast_udptl *udptl, int tos, int cos); void ast_udptl_set_m_type(struct ast_udptl* udptl, int pt); -- cgit v1.2.3