]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: filters: Export the name of known filters
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 7 Dec 2018 16:39:53 +0000 (17:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 16:09:31 +0000 (17:09 +0100)
It could be useful to know if some filter is declared on a proxy or if it is
enabled on a stream.

include/proto/filters.h
src/cache.c
src/flt_http_comp.c
src/flt_trace.c

index 346d8a012fdaae29205a1b90bd4ea5dfde83a5cb..18cbddb46d43d10599d1bbcd6043fe63f7845229 100644 (file)
 
 #include <proto/channel.h>
 
+extern const char *trace_flt_id;
+extern const char *http_comp_flt_id;
+extern const char *cache_store_flt_id;
+extern const char *spoe_filter_id;
+
 #define FLT_ID(flt)   (flt)->config->id
 #define FLT_CONF(flt) (flt)->config->conf
 #define FLT_OPS(flt)  (flt)->config->ops
index d52fcf5dc58785b5f5ce62527b2c1f877500e2b2..834efc1848b921f7683f1d53dd1f20d975c9ad34 100644 (file)
@@ -43,7 +43,7 @@
                                        * messages (legacy implementation) */
 #define CACHE_F_HTX         0x00000002 /* The cache is used to store HTX messages */
 
-static const char *cache_store_flt_id = "cache store filter";
+const char *cache_store_flt_id = "cache store filter";
 
 struct applet http_cache_applet;
 
index 0d3e52b4ca39eebc310e1c03a6735948fa9b9653..2d1a7fd42b4e373be4c3d1600e3bb28b9c5ff6a7 100644 (file)
@@ -31,7 +31,7 @@
 #include <proto/sample.h>
 #include <proto/stream.h>
 
-static const char *http_comp_flt_id = "compression filter";
+const char *http_comp_flt_id = "compression filter";
 
 struct flt_ops comp_ops;
 
index 92a51bf156b1c40278eca7416c45a12dfd886695..0ccf1fc3f5ca288fd3da25de3ebd0e806b78857f 100644 (file)
@@ -33,6 +33,8 @@
 #include <proto/proto_http.h>
 #include <proto/stream.h>
 
+const char *trace_flt_id = "trace filter";
+
 struct flt_ops trace_ops;
 
 struct trace_config {
@@ -709,6 +711,7 @@ parse_trace_flt(char **args, int *cur_arg, struct proxy *px,
                        pos++;
                }
                *cur_arg = pos;
+               fconf->id   = trace_flt_id;
                fconf->ops  = &trace_ops;
        }