]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move backend.h to haproxy/backend{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 20:50:02 +0000 (22:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
The files remained mostly unchanged since they were OK. However, half of
the users didn't need to include them, and about as many actually needed
to have it and used to find functions like srv_currently_usable() through
a long chain that broke when moving the file.

22 files changed:
contrib/prometheus-exporter/service-prometheus.c
include/haproxy/backend-t.h [moved from include/types/backend.h with 98% similarity]
include/haproxy/backend.h [moved from include/proto/backend.h with 96% similarity]
include/haproxy/proxy-t.h
include/proto/queue.h
src/backend.c
src/cfgparse.c
src/check.c
src/cli.c
src/flt_spoe.c
src/haproxy.c
src/http_ana.c
src/lb_chash.c
src/lb_fas.c
src/lb_fwlc.c
src/lb_fwrr.c
src/lb_map.c
src/proxy.c
src/queue.c
src/server.c
src/stats.c
src/stream.c

index 6e9e11631eed1e36070bcacb973e0a2947d28a15..c3f9f952541555b0056a8408f4e1480ec1764e04 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <haproxy/action-t.h>
 #include <haproxy/applet.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
 #include <haproxy/frontend.h>
@@ -26,7 +27,6 @@
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 
-#include <proto/backend.h>
 #include <haproxy/compression.h>
 #include <haproxy/pipe.h>
 #include <haproxy/proxy.h>
similarity index 98%
rename from include/types/backend.h
rename to include/haproxy/backend-t.h
index 120081f7b22d7e05b6172360ad3cf9ee36747168..757bb2fc3b96504fe477fbd28fb8443aed8a3aab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/backend.h
+ * include/haproxy/backend-t.h
  * This file assembles definitions for backends
  *
  * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_BACKEND_H
-#define _TYPES_BACKEND_H
+#ifndef _HAPROXY_BACKEND_T_H
+#define _HAPROXY_BACKEND_T_H
 
 #include <haproxy/lb_chash-t.h>
 #include <haproxy/lb_fas-t.h>
 #include <haproxy/lb_fwlc-t.h>
 #include <haproxy/lb_fwrr-t.h>
 #include <haproxy/lb_map-t.h>
+#include <haproxy/thread-t.h>
 #include <haproxy/api-t.h>
-#include <haproxy/thread.h>
-
 #include <types/server.h>
 
 /* Parameters for lbprm.algo */
@@ -168,7 +167,7 @@ struct lbprm {
        void (*server_drop_conn)(struct server *);       /* to be called when connection is dropped */
 };
 
-#endif /* _TYPES_BACKEND_H */
+#endif /* _HAPROXY_BACKEND_T_H */
 
 /*
  * Local variables:
similarity index 96%
rename from include/proto/backend.h
rename to include/haproxy/backend.h
index 57d606e66126c1e6fab2bc02fdb171101cb48e5e..6662d59ff135a3f446eb03ed5684cd060baf7cd9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/backend.h
+ * include/haproxy/backend.h
  * Functions prototypes for the backend.
  *
  * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_BACKEND_H
-#define _PROTO_BACKEND_H
+#ifndef _HAPROXY_BACKEND_H
+#define _HAPROXY_BACKEND_H
 
+#include <haproxy/backend-t.h>
 #include <haproxy/api.h>
 #include <haproxy/proxy-t.h>
 #include <haproxy/time.h>
-
-#include <types/backend.h>
 #include <types/server.h>
 #include <types/stream.h>
 
@@ -144,7 +143,7 @@ static inline int srv_lb_status_changed(const struct server *srv)
  */
 void set_backend_down(struct proxy *be);
 
-#endif /* _PROTO_BACKEND_H */
+#endif /* _HAPROXY_BACKEND_H */
 
 /*
  * Local variables:
index d66ab34488e8e32a04b6b23ca1e4beaa6ebc0144..b89fb2192e7a8096d31a9e09760b486b1b79650e 100644 (file)
@@ -31,6 +31,7 @@
 #include <import/ebpttree.h>
 
 #include <haproxy/arg-t.h>
+#include <haproxy/backend-t.h>
 #include <haproxy/check-t.h>
 #include <haproxy/counters-t.h>
 #include <haproxy/freq_ctr-t.h>
@@ -38,7 +39,6 @@
 #include <haproxy/obj_type-t.h>
 #include <haproxy/thread-t.h>
 #include <haproxy/api-t.h>
-#include <types/backend.h>
 #include <types/server.h>
 
 /* values for proxy->state */
index 735a1f147b5193ae9daf5b4212b81d6c44196280..cd4c5ca550cf4d2674a173b35a1eee827842dc6a 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _PROTO_QUEUE_H
 #define _PROTO_QUEUE_H
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/pool.h>
 #include <haproxy/proxy-t.h>
@@ -30,8 +31,6 @@
 #include <types/stream.h>
 #include <types/server.h>
 
-#include <proto/backend.h>
-
 extern struct pool_head *pool_head_pendconn;
 
 struct pendconn *pendconn_add(struct stream *strm);
index 18a56976346aad975f07333bc647b677def84730..6e6280ac7eda31daa10cc207cd97b1d0b2117153 100644 (file)
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 
 #include <haproxy/acl.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/channel.h>
 #include <haproxy/check.h>
@@ -49,7 +50,6 @@
 #include <haproxy/global.h>
 
 #include <haproxy/arg.h>
-#include <proto/backend.h>
 #include <haproxy/protocol.h>
 #include <haproxy/proto_tcp.h>
 #include <proto/queue.h>
index 0be9834ad7dc755e36240fc9eddd147ac800bab8..631f10021cd9efa3c43bd135f42c2d6f16a4bd4e 100644 (file)
@@ -36,6 +36,7 @@
 #include <haproxy/acl.h>
 #include <haproxy/action-t.h>
 #include <haproxy/auth.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/capture.h>
 #include <common/cfgparse.h>
@@ -72,7 +73,6 @@
 
 #include <haproxy/global.h>
 
-#include <proto/backend.h>
 #include <haproxy/protocol.h>
 #include <haproxy/peers.h>
 #include <haproxy/sample.h>
index d3283509481bdcd1b4cc11e1b48687fbf1baffbe..4e898b036f17099164f6ad9555ee7926775706f1 100644 (file)
@@ -58,7 +58,6 @@
 #include <haproxy/global.h>
 
 #include <haproxy/arg.h>
-#include <proto/backend.h>
 #include <haproxy/fd.h>
 #include <proto/queue.h>
 #include <haproxy/port_range.h>
index dd4ef0d2580a2cbd61fd8ed79ea7f6ac42352a52..321a974e232567a6266eea112994a03038055225 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -55,7 +55,6 @@
 #include <haproxy/global.h>
 
 #include <haproxy/activity.h>
-#include <proto/backend.h>
 #include <haproxy/compression.h>
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
index 35a99c6c7c041851e8a19e8a645e38eede4892e1..47a43e69a2831611ddc3ec3cba8b96f2857fa9a1 100644 (file)
@@ -37,7 +37,6 @@
 #include <haproxy/global.h>
 
 #include <haproxy/arg.h>
-#include <proto/backend.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/stream.h>
 
index b617249a961c098497196d3b12917b9f02c58885..d2aebce933db29e2e6f27db9dbc9d569d5a1138c 100644 (file)
 
 #include <haproxy/activity.h>
 #include <haproxy/arg.h>
-#include <proto/backend.h>
 #include <haproxy/fd.h>
 #include <haproxy/protocol.h>
 #include <proto/queue.h>
index c420d796ac65377652936f0e991d453d74728ba5..c6b292e79653251ef1820c5836a5bc4393a75aed 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <haproxy/acl.h>
 #include <haproxy/action-t.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/base64.h>
 #include <haproxy/channel.h>
index 4cb97ada477766cb3045dbec27555add82ce1f38..508b90c04906da7bba2ee92b4c2f0b906b929001 100644 (file)
  *
  */
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/tools.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-
-#include <proto/backend.h>
 #include <proto/queue.h>
 
 /* Return next tree node after <node> which must still be in the tree, or be
index ae1297ea11f84845c3e05e4481ea42d7c0358927..896740682feba64829f817cfdf7b03b4545bbe86 100644 (file)
  *
  */
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-
-#include <proto/backend.h>
 #include <proto/queue.h>
 
 
index 3aa050f4e4384ed916fb73affe6e780314ad99e5..aef9353c829799a955aa90171f0b2c492145f279 100644 (file)
  *
  */
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-
-#include <proto/backend.h>
 #include <proto/queue.h>
 
 
index 7eafe489a746267e20cd781bc6166935c7981cce..72029a6a46cd6973f8e680f226d7e096a8e65cb7 100644 (file)
  *
  */
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-
-#include <proto/backend.h>
 #include <proto/queue.h>
 
 static inline void fwrr_remove_from_tree(struct server *s);
index 2b00fdb59d7dbb34d76bea71b0b480506b1bf082..a6d1cf8641abafaaaf248b5f15854ca2f7cddf3b 100644 (file)
  *
  */
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/lb_map.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-
-#include <proto/backend.h>
 #include <proto/queue.h>
 
 /* this function updates the map according to server <srv>'s new state.
index 1ca6ab276a2ade7510ee4805cb16af22536cdf73..173f17dff1ca9f9424baa4d97f2bbc61bb74c850 100644 (file)
@@ -41,7 +41,6 @@
 
 #include <haproxy/capture-t.h>
 
-#include <proto/backend.h>
 #include <haproxy/fd.h>
 #include <haproxy/proto_tcp.h>
 #include <proto/server.h>
index 6e99769664fe5040db322492d30452f57559e425..9cdce013a01f8e7c08f30fca7d4647a8750c6d84 100644 (file)
@@ -44,7 +44,7 @@
  *   - a pendconn_add() is only performed by the stream which will own the
  *     pendconn ; the pendconn is allocated at this moment and returned ; it is
  *     added to either the server or the proxy's queue while holding this
- *     queue's lock.
+s *     queue's lock.
  *
  *   - the pendconn is then met by a thread walking over the proxy or server's
  *     queue with the respective lock held. This lock is exclusive and the
@@ -69,6 +69,7 @@
  *   - a pendconn doesn't switch between queues, it stays where it is.
  */
 
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/pool.h>
index 7ac890513f6ca84c04e1324df34fd78b3df8052b..df90b22401a2a05af5c901ab9a5e4a87768f3252 100644 (file)
@@ -15,6 +15,7 @@
 #include <errno.h>
 
 #include <haproxy/applet-t.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <import/xxhash.h>
 
index 477b0ab87c17922346062f9e77b74d995f457b6b..4f6f6c009d9be6b1564a365ef9b4f190737df2c9 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/types.h>
 
 #include <haproxy/applet-t.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
 #include <haproxy/channel.h>
@@ -57,7 +58,6 @@
 #include <haproxy/version.h>
 #include <haproxy/base64.h>
 
-#include <proto/backend.h>
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <haproxy/pipe.h>
index 4bf1bdc7d15a725cfbe61209cd1f20e21fcf934b..b73060d32d8439975c08fde36937b47a0da63009 100644 (file)
@@ -19,6 +19,7 @@
 #include <haproxy/acl.h>
 #include <haproxy/action.h>
 #include <haproxy/applet.h>
+#include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/capture.h>
 #include <common/cfgparse.h>
@@ -50,7 +51,6 @@
 
 #include <haproxy/activity.h>
 #include <haproxy/arg.h>
-#include <proto/backend.h>
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/stream.h>