]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move filters.h to haproxy/filters{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 19:29:29 +0000 (21:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
Just a minor change, moved the macro definitions upwards. A few caller
files were updated since they didn't need to include it.

17 files changed:
include/haproxy/filters-t.h [moved from include/types/filters.h with 98% similarity]
include/haproxy/filters.h [moved from include/proto/filters.h with 97% similarity]
include/types/fcgi-app.h
include/types/proxy.h
include/types/spoe.h
include/types/stream.h
src/cache.c
src/cfgparse.c
src/fcgi-app.c
src/filters.c
src/flt_http_comp.c
src/flt_spoe.c
src/flt_trace.c
src/haproxy.c
src/http_ana.c
src/proxy.c
src/stream.c

similarity index 98%
rename from include/types/filters.h
rename to include/haproxy/filters-t.h
index 2e06b83163f5f6da360ba37ae9b677afcbce2042..a158d22db71c4e030257da7d8916e560ffdd420a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/filteers.h
+ * include/haproxy/filteers-t.h
  * This file defines everything related to stream filters.
  *
  * Copyright (C) 2015 Qualys Inc., Christopher Faulet <cfaulet@qualys.com>
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
-#ifndef _TYPES_FILTERS_H
-#define _TYPES_FILTERS_H
+#ifndef _HAPROXY_FILTERS_T_H
+#define _HAPROXY_FILTERS_T_H
 
-#include <haproxy/api-t.h>
 #include <haproxy/list-t.h>
+#include <haproxy/api-t.h>
+
+/* Flags set on a filter config */
+#define FLT_CFG_FL_HTX    0x00000001  /* The filter can filter HTX streams */
+
+/* Flags set on a filter instance */
+#define FLT_FL_IS_BACKEND_FILTER  0x0001 /* The filter is a backend filter */
+#define FLT_FL_IS_REQ_DATA_FILTER 0x0002 /* The filter will parse data on the request channel */
+#define FLT_FL_IS_RSP_DATA_FILTER 0x0004 /* The filter will parse data on the response channel */
+
+/* Flags set on the stream, common to all filters attached to its stream */
+#define STRM_FLT_FL_HAS_FILTERS          0x0001 /* The stream has at least one filter */
+
 
 struct http_msg;
 struct proxy;
@@ -189,17 +201,6 @@ struct flt_ops {
                                    unsigned int offset, unsigned int len);
 };
 
-/* Flags set on a filter config */
-#define FLT_CFG_FL_HTX    0x00000001  /* The filter can filter HTX streams */
-
-/* Flags set on a filter instance */
-#define FLT_FL_IS_BACKEND_FILTER  0x0001 /* The filter is a backend filter */
-#define FLT_FL_IS_REQ_DATA_FILTER 0x0002 /* The filter will parse data on the request channel */
-#define FLT_FL_IS_RSP_DATA_FILTER 0x0004 /* The filter will parse data on the response channel */
-
-/* Flags set on the stream, common to all filters attached to its stream */
-#define STRM_FLT_FL_HAS_FILTERS          0x0001 /* The stream has at least one filter */
-
 /*
  * Structure representing the filter configuration, attached to a proxy and
  * accessible from a filter when instantiated in a stream
@@ -247,7 +248,7 @@ struct strm_flt {
        unsigned long long offset[2];
 };
 
-#endif /* _TYPES_FILTERS_H */
+#endif /* _HAPROXY_FILTERS_T_H */
 
 /*
  * Local variables:
similarity index 97%
rename from include/proto/filters.h
rename to include/haproxy/filters.h
index 4b8876ea8196b896e4f3fe2052a656b634ded8cd..b9f24bfc720c332e7e72a873456782cd31b80890 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/filters.h
+ * include/haproxy/filters.h
  * This file defines function prototypes for stream filters management.
  *
  * Copyright (C) 2015 Qualys Inc., Christopher Faulet <cfaulet@qualys.com>
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
-#ifndef _PROTO_FILTERS_H
-#define _PROTO_FILTERS_H
+#ifndef _HAPROXY_FILTERS_H
+#define _HAPROXY_FILTERS_H
 
 #include <haproxy/channel.h>
-#include <types/filters.h>
+#include <haproxy/filters-t.h>
 #include <haproxy/http_ana-t.h>
 #include <types/proxy.h>
 #include <types/stream.h>
@@ -186,5 +186,4 @@ flt_update_offsets(struct filter *filter, struct channel *chn, int len)
        }
 }
 
-
-#endif /* _PROTO_FILTERS_H */
+#endif /* _HAPROXY_FILTERS_H */
index b314d69e0a5ca384db329b903a202608d04b9901..4d1581b48b15b356ae523322a19f97a304ab5b26 100644 (file)
 #include <haproxy/api-t.h>
 #include <import/ist.h>
 #include <haproxy/fcgi.h>
+#include <haproxy/filters-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/regex-t.h>
 
 #include <import/ebistree.h>
 
-#include <types/filters.h>
-
 #define FCGI_APP_FL_KEEP_CONN     0x00000001 /* Keep the connection alive */
 #define FCGI_APP_FL_GET_VALUES    0x00000002 /* Retrieve FCGI variables on connection establishment */
 #define FCGI_APP_FL_MPXS_CONNS    0x00000004 /* FCGI APP supports connection multiplexing */
index 53d9e3c0dbb9b3266a1d211fc98476a93c0ca3a7..b86df8d92d40b0b6f29b3845758cfa3fe51aaefe 100644 (file)
@@ -42,7 +42,6 @@
 
 #include <haproxy/acl-t.h>
 #include <types/backend.h>
-#include <types/filters.h>
 #include <haproxy/freq_ctr-t.h>
 #include <types/log.h>
 #include <haproxy/sample-t.h>
index c7ed45d5a3cad2bc5efddf687129bfdc269609a3..1538a729a96634aae76da6dd38a25c5624a8aec1 100644 (file)
 #include <sys/time.h>
 
 #include <haproxy/dynbuf-t.h>
+#include <haproxy/filters-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/thread.h>
 
-#include <types/filters.h>
 #include <haproxy/freq_ctr-t.h>
 #include <types/log.h>
 #include <types/proxy.h>
index 99dfd02ecc3ce467e5c5331ff207ac98a0c80a49..41b800cf34415b89118deec9fce4d66a5a5b2062 100644 (file)
@@ -31,6 +31,7 @@
 #include <haproxy/api-t.h>
 #include <haproxy/channel-t.h>
 #include <haproxy/dynbuf-t.h>
+#include <haproxy/filters-t.h>
 #include <haproxy/hlua-t.h>
 #include <haproxy/http_ana-t.h>
 #include <haproxy/list-t.h>
@@ -39,7 +40,6 @@
 #include <haproxy/stream_interface-t.h>
 #include <haproxy/vars-t.h>
 
-#include <types/filters.h>
 #include <types/proxy.h>
 #include <types/queue.h>
 #include <types/server.h>
index 36c54a880d13b8afc3ed19ead24352c08ceccf05..17d015afa4c6ed7cbf3fd1732e4ab9e396133148 100644 (file)
@@ -14,6 +14,7 @@
 #include <haproxy/api.h>
 #include <haproxy/channel.h>
 #include <haproxy/cli.h>
+#include <haproxy/filters.h>
 #include <haproxy/http_ana.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/http_rules.h>
 #include <import/eb32tree.h>
 #include <import/sha1.h>
 
-#include <types/filters.h>
 #include <types/proxy.h>
 
 #include <proto/proxy.h>
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <proto/stream.h>
 
index e5cac8b114789273b5913a305517a0a56c4bbad7..8bd60b7cbd68d819f689c30eac306611bd3f1bd1 100644 (file)
@@ -45,6 +45,7 @@
 #include <haproxy/connection.h>
 #include <haproxy/dns.h>
 #include <haproxy/errors.h>
+#include <haproxy/filters.h>
 #include <haproxy/frontend.h>
 #include <haproxy/http_ana.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/task.h>
 #include <haproxy/thread.h>
 
-#include <types/filters.h>
 #include <haproxy/global.h>
 
 #include <proto/backend.h>
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
 #include <proto/proxy.h>
index dda4b3a998c22a328fbb7c2a935b74d73651ee76..9097dab9d8f58ac9f1fe7d17f3d8360cfc2dde3d 100644 (file)
@@ -15,6 +15,7 @@
 #include <haproxy/chunk.h>
 #include <common/cfgparse.h>
 #include <haproxy/errors.h>
+#include <haproxy/filters.h>
 #include <haproxy/http_fetch.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/regex.h>
@@ -25,7 +26,6 @@
 #include <haproxy/global.h>
 
 #include <proto/fcgi-app.h>
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
index 130f5d71a402ce57a5b66773e5789171f234f938..b6587392557799881272d4f7f88a1e30260c99ec 100644 (file)
@@ -14,6 +14,7 @@
 #include <haproxy/buf-t.h>
 #include <common/cfgparse.h>
 #include <haproxy/errors.h>
+#include <haproxy/filters.h>
 #include <haproxy/flt_http_comp.h>
 #include <haproxy/http_ana-t.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/tools.h>
 
-#include <types/filters.h>
-
 #include <haproxy/compression.h>
-#include <proto/filters.h>
 #include <haproxy/http_ana.h>
 #include <proto/stream.h>
 
index 0fb213d08f3cbb25b471778059d676b6a63a3da9..1b8fffb5979f7cddc40dd06ac6941bb4db825716 100644 (file)
@@ -13,6 +13,7 @@
 #include <haproxy/api.h>
 #include <haproxy/compression.h>
 #include <haproxy/dynbuf.h>
+#include <haproxy/filters.h>
 #include <haproxy/http.h>
 #include <haproxy/http_ana-t.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/sample.h>
 #include <haproxy/tools.h>
 
-#include <types/filters.h>
 #include <types/proxy.h>
 
-#include <proto/filters.h>
 #include <proto/stream.h>
 
 const char *http_comp_flt_id = "compression filter";
index 9e9eaeb8f4dad52cee48ff45590415200b5ac28f..f532d2d8516bb3da15e41f2e25162a781b883a65 100644 (file)
@@ -16,6 +16,7 @@
 #include <haproxy/action-t.h>
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
+#include <haproxy/filters.h>
 #include <haproxy/frontend.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/sample.h>
@@ -35,7 +36,6 @@
 
 #include <haproxy/arg.h>
 #include <proto/backend.h>
-#include <proto/filters.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
index 125401a38c55f077187ba60939a27723f0dada01..2f55b73d1a1977f876249a26d00b36625d2b916c 100644 (file)
 
 #include <haproxy/api.h>
 #include <haproxy/channel-t.h>
+#include <haproxy/filters.h>
 #include <haproxy/http_ana-t.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/htx.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 
-#include <types/filters.h>
 #include <haproxy/global.h>
 #include <types/proxy.h>
 #include <types/stream.h>
 
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <proto/stream.h>
 
index 6370d8e59f14bb40d7b1cc357e22650e23729c24..6488df9b3afa4117fd44b94dc5606f29ed16b582 100644 (file)
@@ -91,6 +91,7 @@
 #include <haproxy/dns.h>
 #include <haproxy/dynbuf.h>
 #include <haproxy/errors.h>
+#include <haproxy/filters.h>
 #include <haproxy/hlua.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/pool.h>
 #include <haproxy/vars.h>
 
 #include <haproxy/capture-t.h>
-#include <types/filters.h>
 #include <haproxy/global.h>
 
 #include <haproxy/activity.h>
 #include <haproxy/arg.h>
 #include <proto/backend.h>
 #include <haproxy/fd.h>
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
 #include <proto/proxy.h>
index 6e15d67303cfa9ed8ab0a5254b4898203e50ed67..8e8dd2fa0f62048945306c1361e6b79b1db06c53 100644 (file)
@@ -17,6 +17,7 @@
 #include <haproxy/channel.h>
 #include <haproxy/check.h>
 #include <haproxy/connection.h>
+#include <haproxy/filters.h>
 #include <haproxy/http.h>
 #include <haproxy/http_ana.h>
 #include <haproxy/http_htx.h>
@@ -30,7 +31,6 @@
 
 #include <haproxy/capture-t.h>
 
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
index 803f1868ae14e0cd2fa55330a4208aaaa5899446..78d91e6e25e5e1066253436fc8bb7210b21d026f 100644 (file)
@@ -22,6 +22,7 @@
 #include <common/cfgparse.h>
 #include <haproxy/cli.h>
 #include <haproxy/errors.h>
+#include <haproxy/filters.h>
 #include <haproxy/global.h>
 #include <haproxy/http_ana.h>
 #include <haproxy/listener.h>
@@ -40,7 +41,6 @@
 
 #include <proto/backend.h>
 #include <haproxy/fd.h>
-#include <proto/filters.h>
 #include <proto/log.h>
 #include <haproxy/proto_tcp.h>
 #include <proto/proxy.h>
index 010509fb5cc9eee66dc8f7e64cee2304c056992c..fc2798d098c5726444906ab8754cf83fc8692b62 100644 (file)
@@ -27,6 +27,7 @@
 #include <haproxy/dict.h>
 #include <haproxy/dns.h>
 #include <haproxy/dynbuf.h>
+#include <haproxy/filters.h>
 #include <haproxy/frontend.h>
 #include <haproxy/global.h>
 #include <haproxy/hlua.h>
 #include <haproxy/tcp_rules.h>
 #include <haproxy/vars.h>
 
-#include <types/filters.h>
-
 #include <haproxy/activity.h>
 #include <haproxy/arg.h>
 #include <proto/backend.h>
 #include <haproxy/fd.h>
-#include <proto/filters.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
 #include <proto/stream.h>