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
This commit is contained in:
Russell Bryant
2007-04-30 16:16:26 +00:00
parent a91f9b138d
commit b419fc1134
20 changed files with 151 additions and 89 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);