aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-30 16:16:26 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-30 16:16:26 +0000
commit3d2428efd418ec960c90725ad9588056ace5ec5c (patch)
treed7bac5beb193490f4242d9a69cad3457727ba5d8 /main/acl.c
parent7443c4962d761cf4b24aecdc54f78a1088de93db (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 'main/acl.c')
-rw-r--r--main/acl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/acl.c b/main/acl.c
index 8d7dc4277..55654f714 100644
--- a/main/acl.c
+++ b/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;