REORG: include: move filters.h to haproxy/filters{,-t}.h

Just a minor change, moved the macro definitions upwards. A few caller
files were updated since they didn't need to include it.
This commit is contained in:
Willy Tarreau 2020-06-04 21:29:29 +02:00
parent c2b1ff04e5
commit c7babd8570
17 changed files with 36 additions and 47 deletions

View 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>
@ -18,11 +18,23 @@
* 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:

View 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>
@ -18,11 +18,11 @@
* 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 */

View File

@ -26,13 +26,12 @@
#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 */

View 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>

View File

@ -25,10 +25,10 @@
#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>

View 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>

View 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>
@ -22,11 +23,9 @@
#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>

View 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>
@ -67,11 +68,9 @@
#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>

View 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>

View 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>
@ -22,10 +23,7 @@
#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>

View 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>
@ -22,10 +23,8 @@
#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";

View 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>

View File

@ -14,18 +14,17 @@
#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>

View 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>
@ -116,14 +117,12 @@
#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>

View 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>

View 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>

View 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>
@ -43,13 +44,10 @@
#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>