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 /include/asterisk | |
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 'include/asterisk')
-rw-r--r-- | include/asterisk/acl.h | 3 | ||||
-rw-r--r-- | include/asterisk/netsock.h | 6 | ||||
-rw-r--r-- | include/asterisk/rtp.h | 2 | ||||
-rw-r--r-- | include/asterisk/udptl.h | 2 |
4 files changed, 9 insertions, 4 deletions
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); |