From: Thierry FOURNIER Date: Fri, 22 Nov 2013 16:25:35 +0000 (+0100) Subject: MINOR: acl: export acl arrays X-Git-Tag: v1.5-dev20~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=319e495a96b58fd25ff9f2a05ec04688015c84d6;p=thirdparty%2Fhaproxy.git MINOR: acl: export acl arrays The map feature needs to use the acl parser and converters. --- diff --git a/include/types/acl.h b/include/types/acl.h index 006899e32a..3b3a52bd75 100644 --- a/include/types/acl.h +++ b/include/types/acl.h @@ -231,6 +231,9 @@ struct acl_cond { int line; /* line in the config file where the condition is declared */ }; +extern char *acl_match_names[ACL_MATCH_NUM]; +extern int (*acl_parse_fcts[ACL_MATCH_NUM])(const char **, struct acl_pattern *, int *, char **); +extern int (*acl_match_fcts[ACL_MATCH_NUM])(struct sample *, struct acl_pattern *); #endif /* _TYPES_ACL_H */ diff --git a/src/acl.c b/src/acl.c index 9ea082a303..5c28e27a26 100644 --- a/src/acl.c +++ b/src/acl.c @@ -37,7 +37,7 @@ static struct acl_kw_list acl_keywords = { .list = LIST_HEAD_INIT(acl_keywords.list) }; -static char *acl_match_names[ACL_MATCH_NUM] = { +char *acl_match_names[ACL_MATCH_NUM] = { [ACL_MATCH_FOUND] = "found", [ACL_MATCH_BOOL] = "bool", [ACL_MATCH_INT] = "int", @@ -53,7 +53,7 @@ static char *acl_match_names[ACL_MATCH_NUM] = { [ACL_MATCH_REG] = "reg", }; -static int (*acl_parse_fcts[ACL_MATCH_NUM])(const char **, struct acl_pattern *, int *, char **) = { +int (*acl_parse_fcts[ACL_MATCH_NUM])(const char **, struct acl_pattern *, int *, char **) = { [ACL_MATCH_FOUND] = acl_parse_nothing, [ACL_MATCH_BOOL] = acl_parse_nothing, [ACL_MATCH_INT] = acl_parse_int, @@ -69,7 +69,7 @@ static int (*acl_parse_fcts[ACL_MATCH_NUM])(const char **, struct acl_pattern *, [ACL_MATCH_REG] = acl_parse_reg, }; -static int (*acl_match_fcts[ACL_MATCH_NUM])(struct sample *, struct acl_pattern *) = { +int (*acl_match_fcts[ACL_MATCH_NUM])(struct sample *, struct acl_pattern *) = { [ACL_MATCH_FOUND] = NULL, [ACL_MATCH_BOOL] = acl_match_nothing, [ACL_MATCH_INT] = acl_match_int,