mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
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:
14
main/acl.c
14
main/acl.c
@@ -278,6 +278,20 @@ static const struct dscp_codepoint dscp_pool1[] = {
|
||||
{ "EF", 0x2E },
|
||||
};
|
||||
|
||||
int ast_str2cos(const char *value, unsigned int *cos)
|
||||
{
|
||||
int fval;
|
||||
|
||||
if (sscanf(value, "%d", &fval) == 1) {
|
||||
if (fval < 8) {
|
||||
*cos = fval;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ast_str2tos(const char *value, unsigned int *tos)
|
||||
{
|
||||
int fval;
|
||||
|
||||
Reference in New Issue
Block a user