REORG: include: move acl.h to haproxy/acl.h{,-t}.h
The files were moved almost as-is, just dropping arg-t and auth-t from
acl-t but keeping arg-t in acl.h. It was useful to revisit the call places
since a handful of files used to continue to include acl.h while they did
not need it at all. Struct stream was only made a forward declaration
since not otherwise needed.
diff --git a/include/types/acl.h b/include/haproxy/acl-t.h
similarity index 94%
rename from include/types/acl.h
rename to include/haproxy/acl-t.h
index d9f4084..3e3762c 100644
--- a/include/types/acl.h
+++ b/include/haproxy/acl-t.h
@@ -1,8 +1,8 @@
/*
- * include/types/acl.h
+ * include/haproxy/acl-t.h
* This file provides structures and types for ACLs.
*
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -19,19 +19,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TYPES_ACL_H
-#define _TYPES_ACL_H
+#ifndef _HAPROXY_ACL_T_H
+#define _HAPROXY_ACL_T_H
-#include <haproxy/auth-t.h>
+#include <import/ebmbtree.h>
+
+#include <haproxy/list-t.h>
#include <haproxy/pattern-t.h>
#include <haproxy/api-t.h>
-#include <haproxy/list-t.h>
-#include <haproxy/arg-t.h>
#include <types/proxy.h>
#include <types/server.h>
-#include <import/ebmbtree.h>
/* ACL test result.
*
@@ -70,10 +69,6 @@
ACL_COND_UNLESS, /* negative condition (after 'unless') */
};
-/* some dummy declarations to silent the compiler */
-struct proxy;
-struct stream;
-
/*
* ACL keyword: Associates keywords with parsers, methods to retrieve the value and testers.
*/
@@ -157,7 +152,7 @@
int line; /* line in the config file where the condition is declared */
};
-#endif /* _TYPES_ACL_H */
+#endif /* _HAPROXY_ACL_T_H */
/*
* Local variables:
diff --git a/include/proto/acl.h b/include/haproxy/acl.h
similarity index 96%
rename from include/proto/acl.h
rename to include/haproxy/acl.h
index 56ae228..fcf50a5 100644
--- a/include/proto/acl.h
+++ b/include/haproxy/acl.h
@@ -1,5 +1,5 @@
/*
- * include/proto/acl.h
+ * include/haproxy/acl.h
* This file provides interface definitions for ACL manipulation.
*
* Copyright (C) 2000-2013 Willy Tarreau - w@1wt.eu
@@ -19,11 +19,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_ACL_H
-#define _PROTO_ACL_H
+#ifndef _HAPROXY_ACL_H
+#define _HAPROXY_ACL_H
+#include <haproxy/acl-t.h>
+#include <haproxy/arg-t.h>
#include <haproxy/api.h>
-#include <types/acl.h>
+
+struct stream;
/*
* FIXME: we need destructor functions too !
@@ -144,7 +147,7 @@
int init_acl();
-#endif /* _PROTO_ACL_H */
+#endif /* _HAPROXY_ACL_H */
/*
* Local variables:
diff --git a/include/types/fcgi-app.h b/include/types/fcgi-app.h
index c82f39a..b314d69 100644
--- a/include/types/fcgi-app.h
+++ b/include/types/fcgi-app.h
@@ -22,6 +22,7 @@
#ifndef _TYPES_HTTP_FCGI_H
#define _TYPES_HTTP_FCGI_H
+#include <haproxy/acl-t.h>
#include <haproxy/api-t.h>
#include <import/ist.h>
#include <haproxy/fcgi.h>
@@ -30,7 +31,6 @@
#include <import/ebistree.h>
-#include <types/acl.h>
#include <types/filters.h>
#define FCGI_APP_FL_KEEP_CONN 0x00000001 /* Keep the connection alive */
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 7579d8a..53d9e3c 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -27,6 +27,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <haproxy/arg-t.h>
#include <haproxy/api-t.h>
#include <haproxy/check-t.h>
#include <haproxy/chunk.h>
@@ -39,7 +40,7 @@
#include <import/eb32tree.h>
#include <import/ebistree.h>
-#include <types/acl.h>
+#include <haproxy/acl-t.h>
#include <types/backend.h>
#include <types/filters.h>
#include <haproxy/freq_ctr-t.h>
diff --git a/src/acl.c b/src/acl.c
index c0b6985..ea0a54d 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <string.h>
+#include <haproxy/acl.h>
#include <haproxy/auth.h>
#include <haproxy/api.h>
#include <haproxy/list.h>
@@ -23,7 +24,6 @@
#include <haproxy/global.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/channel.h>
#include <proto/log.h>
diff --git a/src/auth.c b/src/auth.c
index fe21a45..faac16d 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -32,7 +32,6 @@
#include <haproxy/pattern-t.h>
#include <haproxy/thread.h>
-#include <proto/acl.h>
#include <proto/log.h>
struct userlist *userlist = NULL; /* list of all existing userlists */
diff --git a/src/backend.c b/src/backend.c
index b7c47cc..f787427 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -19,6 +19,7 @@
#include <ctype.h>
#include <sys/types.h>
+#include <haproxy/acl.h>
#include <haproxy/api.h>
#include <haproxy/check.h>
#include <haproxy/frontend.h>
@@ -40,7 +41,6 @@
#include <haproxy/global.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/backend.h>
#include <proto/channel.h>
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index 51e118c..0c6fa35 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -14,6 +14,7 @@
#include <common/cfgparse.h>
#include <common/uri_auth.h>
+#include <haproxy/acl.h>
#include <haproxy/capture-t.h>
#include <haproxy/check.h>
#include <haproxy/compression-t.h>
@@ -25,7 +26,6 @@
#include <haproxy/sample.h>
#include <types/stats.h>
-#include <proto/acl.h>
#include <haproxy/protocol.h>
#include <proto/proxy.h>
#include <proto/server.h>
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 3de138f..376430f 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <unistd.h>
+#include <haproxy/acl.h>
#include <haproxy/action-t.h>
#include <haproxy/auth.h>
#include <haproxy/api.h>
@@ -66,7 +67,6 @@
#include <haproxy/global.h>
#include <types/stats.h>
-#include <proto/acl.h>
#include <proto/backend.h>
#include <proto/channel.h>
#include <proto/stats.h>
diff --git a/src/compression.c b/src/compression.c
index 081bf03..f77292c 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -35,7 +35,6 @@
#include <haproxy/global.h>
#include <haproxy/compression-t.h>
-#include <proto/acl.h>
#include <haproxy/compression.h>
#include <haproxy/freq_ctr.h>
#include <proto/stream.h>
diff --git a/src/fcgi-app.c b/src/fcgi-app.c
index 0db8e79..dda4b3a 100644
--- a/src/fcgi-app.c
+++ b/src/fcgi-app.c
@@ -10,6 +10,7 @@
*
*/
+#include <haproxy/acl.h>
#include <haproxy/api.h>
#include <haproxy/chunk.h>
#include <common/cfgparse.h>
@@ -23,7 +24,6 @@
#include <haproxy/global.h>
-#include <proto/acl.h>
#include <proto/fcgi-app.h>
#include <proto/filters.h>
#include <proto/log.h>
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 1ffa4a7..7d36a8e 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -12,6 +12,7 @@
#include <ctype.h>
#include <errno.h>
+#include <haproxy/acl.h>
#include <haproxy/action-t.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
@@ -31,7 +32,6 @@
#include <haproxy/global.h>
#include <types/spoe.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/backend.h>
#include <proto/filters.h>
diff --git a/src/frontend.c b/src/frontend.c
index 050a08f..068e8d6 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -22,6 +22,7 @@
#include <netinet/tcp.h>
+#include <haproxy/acl.h>
#include <haproxy/api.h>
#include <haproxy/chunk.h>
#include <haproxy/frontend.h>
@@ -32,7 +33,6 @@
#include <haproxy/global.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/channel.h>
#include <haproxy/fd.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index 504add9..b420df9 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -78,6 +78,7 @@
#include <systemd/sd-daemon.h>
#endif
+#include <haproxy/acl.h>
#include <haproxy/auth.h>
#include <haproxy/api.h>
#include <import/sha1.h>
@@ -116,9 +117,7 @@
#include <types/cli.h>
#include <types/filters.h>
#include <haproxy/global.h>
-#include <types/acl.h>
-#include <proto/acl.h>
#include <haproxy/activity.h>
#include <haproxy/arg.h>
#include <proto/backend.h>
diff --git a/src/http_acl.c b/src/http_acl.c
index 0b6adfd..17a818e 100644
--- a/src/http_acl.c
+++ b/src/http_acl.c
@@ -16,6 +16,7 @@
#include <string.h>
#include <time.h>
+#include <haproxy/acl.h>
#include <haproxy/auth.h>
#include <haproxy/api.h>
#include <haproxy/chunk.h>
@@ -25,7 +26,6 @@
#include <haproxy/tools.h>
#include <haproxy/version.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
diff --git a/src/http_act.c b/src/http_act.c
index 356d572..844eeaf 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -16,6 +16,7 @@
#include <string.h>
#include <time.h>
+#include <haproxy/acl.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
@@ -34,7 +35,6 @@
#include <haproxy/capture-t.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/log.h>
#include <proto/http_ana.h>
diff --git a/src/http_ana.c b/src/http_ana.c
index edfacc4..8555293 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -10,6 +10,7 @@
*
*/
+#include <haproxy/acl.h>
#include <haproxy/action-t.h>
#include <haproxy/api.h>
#include <haproxy/base64.h>
@@ -25,7 +26,6 @@
#include <haproxy/capture-t.h>
-#include <proto/acl.h>
#include <proto/channel.h>
#include <proto/filters.h>
#include <proto/log.h>
diff --git a/src/http_rules.c b/src/http_rules.c
index 955c04f..6864e5e 100644
--- a/src/http_rules.c
+++ b/src/http_rules.c
@@ -16,6 +16,7 @@
#include <string.h>
#include <time.h>
+#include <haproxy/acl.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
@@ -28,7 +29,6 @@
#include <haproxy/capture-t.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/http_ana.h>
#include <haproxy/sample.h>
diff --git a/src/listener.c b/src/listener.c
index 6a13b1c..ab0a4a7 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -18,6 +18,7 @@
#include <unistd.h>
#include <fcntl.h>
+#include <haproxy/acl.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <haproxy/connection.h>
@@ -31,7 +32,6 @@
#include <haproxy/protocol-t.h>
-#include <proto/acl.h>
#include <haproxy/fd.h>
#include <haproxy/freq_ctr.h>
#include <proto/log.h>
diff --git a/src/payload.c b/src/payload.c
index 5664ec7..c4f8b2c 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -13,13 +13,13 @@
#include <stdlib.h>
#include <string.h>
+#include <haproxy/acl.h>
#include <haproxy/api.h>
#include <haproxy/connection.h>
#include <haproxy/net_helper.h>
#include <haproxy/payload.h>
#include <haproxy/pattern.h>
#include <haproxy/htx.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/channel.h>
#include <haproxy/sample.h>
diff --git a/src/peers.c b/src/peers.c
index f576eaa..cba840d 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -35,7 +35,6 @@
#include <types/stats.h>
-#include <proto/acl.h>
#include <proto/applet.h>
#include <proto/channel.h>
#include <proto/cli.h>
diff --git a/src/ssl_sample.c b/src/ssl_sample.c
index 509b0c5..8314f3d 100644
--- a/src/ssl_sample.c
+++ b/src/ssl_sample.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <unistd.h>
+#include <haproxy/acl.h>
#include <haproxy/api.h>
#include <haproxy/buf-t.h>
#include <haproxy/obj_type.h>
@@ -30,7 +31,6 @@
#include <types/ssl_sock.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/ssl_sock.h>
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 12e9575..5cad3d6 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -72,7 +72,6 @@
#include <types/ssl_sock.h>
#include <types/stats.h>
-#include <proto/acl.h>
#include <haproxy/arg.h>
#include <proto/channel.h>
#include <proto/cli.h>
diff --git a/src/stream.c b/src/stream.c
index 5a70cca..ce41a29 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -14,6 +14,7 @@
#include <unistd.h>
#include <fcntl.h>
+#include <haproxy/acl.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
#include <haproxy/capture.h>
@@ -41,7 +42,6 @@
#include <types/filters.h>
#include <types/stats.h>
-#include <proto/acl.h>
#include <haproxy/activity.h>
#include <haproxy/arg.h>
#include <proto/backend.h>
diff --git a/src/tcp_rules.c b/src/tcp_rules.c
index 9b4977d..8507369 100644
--- a/src/tcp_rules.c
+++ b/src/tcp_rules.c
@@ -9,6 +9,7 @@
* 2 of the License, or (at your option) any later version.
*
*/
+#include <haproxy/acl.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
#include <haproxy/capture-t.h>
@@ -24,7 +25,6 @@
#include <haproxy/arg-t.h>
-#include <proto/acl.h>
#include <proto/channel.h>
#include <proto/log.h>
#include <proto/proxy.h>