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

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