]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acl: export acl arrays
authorThierry FOURNIER <tfournier@exceliance.fr>
Fri, 22 Nov 2013 16:25:35 +0000 (17:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 Dec 2013 22:31:32 +0000 (23:31 +0100)
The map feature needs to use the acl parser and converters.

include/types/acl.h
src/acl.c

index 006899e32a951f730973d35c8029127664d67320..3b3a52bd750aa779154773f5458ce92bd89438e6 100644 (file)
@@ -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 */
 
index 9ea082a303b826f20383f36ef7ae4d5172603228..5c28e27a2639098862742314940bfd9a64d1be3a 100644 (file)
--- 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,