]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move server.h to haproxy/server{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 21:20:13 +0000 (23:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
extern struct dict server_name_dict was moved from the type file to the
main file. A handful of inlined functions were moved at the bottom of
the file. Call places were updated to use server-t.h when relevant, or
to simply drop the entry when not needed.

42 files changed:
contrib/prometheus-exporter/service-prometheus.c
include/haproxy/acl-t.h
include/haproxy/backend-t.h
include/haproxy/backend.h
include/haproxy/check.h
include/haproxy/hlua-t.h
include/haproxy/lb_fas.h
include/haproxy/lb_fwlc.h
include/haproxy/lb_fwrr.h
include/haproxy/lb_map-t.h
include/haproxy/lb_map.h
include/haproxy/obj_type.h
include/haproxy/proxy-t.h
include/haproxy/proxy.h
include/haproxy/queue.h
include/haproxy/server-t.h [moved from include/types/server.h with 97% similarity]
include/haproxy/server.h [moved from include/proto/server.h with 98% similarity]
include/haproxy/session.h
include/types/stream.h
src/backend.c
src/cfgparse-listen.c
src/cfgparse.c
src/check.c
src/cli.c
src/dns.c
src/fcgi-app.c
src/haproxy.c
src/hlua.c
src/hlua_fcn.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/proto_tcp.c
src/proxy.c
src/queue.c
src/server.c
src/ssl_sock.c
src/stats.c
src/stream.c

index c3f9f952541555b0056a8408f4e1480ec1764e04..52cac0818291d70133952bf28ea128471b1280fc 100644 (file)
@@ -31,7 +31,7 @@
 #include <haproxy/pipe.h>
 #include <haproxy/proxy.h>
 #include <haproxy/sample.h>
-#include <proto/server.h>
+#include <haproxy/server.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/stats.h>
 #include <proto/stream.h>
index d2b0e3133659c56d87aa56b853fea319e944f522..8418ca95ff1db4c6b40940316d7910ef566c8407 100644 (file)
 #include <haproxy/arg-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/pattern-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/api-t.h>
 
-#include <types/server.h>
-
 
 /* ACL test result.
  *
index 757bb2fc3b96504fe477fbd28fb8443aed8a3aab..af05cc8173ecc317c771fe42066279c9049eb29d 100644 (file)
@@ -27,9 +27,9 @@
 #include <haproxy/lb_fwlc-t.h>
 #include <haproxy/lb_fwrr-t.h>
 #include <haproxy/lb_map-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/thread-t.h>
 #include <haproxy/api-t.h>
-#include <types/server.h>
 
 /* Parameters for lbprm.algo */
 
index 6662d59ff135a3f446eb03ed5684cd060baf7cd9..5f6acaa248e64840c078af13e8c04f82007675d2 100644 (file)
@@ -25,8 +25,8 @@
 #include <haproxy/backend-t.h>
 #include <haproxy/api.h>
 #include <haproxy/proxy-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/time.h>
-#include <types/server.h>
 #include <types/stream.h>
 
 int assign_server(struct stream *s);
index f38ba2ad4295769e5cd1c8594194ffea61b5d3fd..66023ce5999d7add2f62d608e05ef5f7c12c18d5 100644 (file)
@@ -27,7 +27,7 @@
 #include <haproxy/list-t.h>
 #include <haproxy/mailers.h>
 #include <haproxy/proxy-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 const char *get_check_status_description(short check_status);
 const char *get_check_status_info(short check_status);
index 35a7a8178c432b8ba5e391cec850aa5050838644..75a47535807402ac416a848427dec1eafb09f1cd 100644 (file)
@@ -32,9 +32,9 @@
 #include <haproxy/list-t.h>
 #include <haproxy/proxy-t.h>
 #include <haproxy/regex-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/xref-t.h>
 
-#include <types/server.h>
 #include <haproxy/stick_table-t.h>
 
 #define CLASS_CORE         "Core"
index fa2a5070c64f43e51dfc6c4525bb51043b64de11..b12831c21d72505bffa95c41de91c25f9f1b3ee5 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/api.h>
 #include <haproxy/lb_fas-t.h>
 #include <haproxy/proxy-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 struct server *fas_get_next_server(struct proxy *p, struct server *srvtoavoid);
 void fas_init_server_tree(struct proxy *p);
index 24c7d74aca5d4e05f0a8730f1ee061debfd656a9..a598af9f37a9576fdc64e0511ad40f094d09c939 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/api.h>
 #include <haproxy/lb_fwlc-t.h>
 #include <haproxy/proxy-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 struct server *fwlc_get_next_server(struct proxy *p, struct server *srvtoavoid);
 void fwlc_init_server_tree(struct proxy *p);
index 0accf0615c32e847308bdb12cf76feceb78b912e..27b0a94e04c349b6027d0c15ff039a855df8fb52 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/api.h>
 #include <haproxy/lb_fwrr-t.h>
 #include <haproxy/proxy-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 void fwrr_init_server_groups(struct proxy *p);
 struct server *fwrr_get_next_server(struct proxy *p, struct server *srvtoavoid);
index b2c556cabbdc8cc409acf2cb85b969499383fe74..0c45c256150fd16818f9673c9f8a25457848dbf9 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef _HAPROXY_LB_MAP_T_H
 #define _HAPROXY_LB_MAP_T_H
 
+#include <haproxy/server-t.h>
 #include <haproxy/api-t.h>
-#include <types/server.h>
 
 struct lb_map {
        struct server **srv;    /* the server map used to apply weights */
index 1e390f729fbe0b68173e2cd1ac63963066687cc5..ca483b2394fa6faa55a09118dfe9f16ff2c91d1b 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/proxy-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 void recalc_server_map(struct proxy *px);
 void init_server_map(struct proxy *p);
index 0f932dd056615af56d8b6eefbe249bb73c526f68..d42b250a2cbfe32852d744f6958fe383a9433fdd 100644 (file)
@@ -30,7 +30,7 @@
 #include <haproxy/obj_type-t.h>
 #include <haproxy/pool.h>
 #include <haproxy/proxy-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 #include <types/stream.h>
 #include <haproxy/stream_interface-t.h>
 
index b89fb2192e7a8096d31a9e09760b486b1b79650e..f7b099786ac8d2951b41b4d6dfb4b80b98b79bb0 100644 (file)
@@ -37,9 +37,9 @@
 #include <haproxy/freq_ctr-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/thread-t.h>
 #include <haproxy/api-t.h>
-#include <types/server.h>
 
 /* values for proxy->state */
 enum pr_state {
index 0cfea6a63adfd8b48e7ef54a9497cb7b8488dcbd..2263c26f312541f73d7e29b5ff2fd10ccb9f75b9 100644 (file)
@@ -27,9 +27,9 @@
 #include <haproxy/freq_ctr.h>
 #include <haproxy/listener-t.h>
 #include <haproxy/proxy-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
-#include <types/server.h>
 
 extern struct proxy *proxies_list;
 extern struct eb_root used_proxy_id;   /* list of proxy IDs in use */
index bded676613f84b8f8d23450f1deeebe349d64e20..ef61c0d94bcabb68ac2dfe69adc184a6e08bdb5b 100644 (file)
@@ -27,7 +27,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/proxy-t.h>
 #include <haproxy/queue-t.h>
-#include <types/server.h>
+#include <haproxy/server-t.h>
 #include <types/stream.h>
 
 extern struct pool_head *pool_head_pendconn;
similarity index 97%
rename from include/types/server.h
rename to include/haproxy/server-t.h
index dcf5c40cbc808f14b05fb34bc5da9798e070355e..564619dd08cfd2e8d9345b9dae13d63a4105d790 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/server.h
+ * include/haproxy/server-t.h
  * This file defines everything related to servers.
  *
  * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_SERVER_H
-#define _TYPES_SERVER_H
+#ifndef _HAPROXY_SERVER_T_H
+#define _HAPROXY_SERVER_T_H
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <import/eb32tree.h>
+#include <import/ebmbtree.h>
+
 #include <haproxy/check-t.h>
+#include <haproxy/connection-t.h>
 #include <haproxy/counters-t.h>
 #include <haproxy/dns-t.h>
-#include <haproxy/api-t.h>
+#include <haproxy/freq_ctr-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/listener-t.h>
 #include <haproxy/obj_type-t.h>
-#include <haproxy/ssl_sock-t.h>
-#include <haproxy/thread.h>
 #include <haproxy/openssl-compat.h>
-
-#include <import/eb32tree.h>
-
-#include <haproxy/connection-t.h>
-#include <haproxy/freq_ctr-t.h>
+#include <haproxy/ssl_sock-t.h>
 #include <haproxy/task-t.h>
+#include <haproxy/thread-t.h>
+#include <haproxy/api-t.h>
 
 
 /* server states. Only SRV_ST_STOPPED indicates a down server. */
@@ -168,13 +168,11 @@ enum srv_initaddr {
 #define SRV_EWGHT_RANGE (SRV_UWGHT_RANGE * BE_WEIGHT_SCALE)
 #define SRV_EWGHT_MAX   (SRV_UWGHT_MAX   * BE_WEIGHT_SCALE)
 
-#ifdef USE_OPENSSL
 /* server ssl options */
-#define SRV_SSL_O_NONE         0x0000
+#define SRV_SSL_O_NONE           0x0000
 #define SRV_SSL_O_NO_TLS_TICKETS 0x0100 /* disable session resumption tickets */
-#define SRV_SSL_O_NO_REUSE     0x200  /* disable session reuse */
-#define SRV_SSL_O_EARLY_DATA   0x400  /* Allow using early data */
-#endif
+#define SRV_SSL_O_NO_REUSE       0x200  /* disable session reuse */
+#define SRV_SSL_O_EARLY_DATA     0x400  /* Allow using early data */
 
 /* log servers ring's protocols options */
 enum srv_log_proto {
@@ -182,9 +180,6 @@ enum srv_log_proto {
         SRV_LOG_PROTO_OCTET_COUNTING, // TCP frames: MSGLEN SP MSG
 };
 
-/* The server names dictionary */
-extern struct dict server_name_dict;
-
 struct pid_list {
        struct list list;
        pid_t pid;
@@ -394,7 +389,7 @@ struct srv_kw_list {
        struct srv_kw kw[VAR_ARRAY];
 };
 
-#endif /* _TYPES_SERVER_H */
+#endif /* _HAPROXY_SERVER_T_H */
 
 /*
  * Local variables:
similarity index 98%
rename from include/proto/server.h
rename to include/haproxy/server.h
index 066faebce4cd184e2cc225d6f8b21d6fd32d5869..3d47cb02b5b2c255f0fce53226257fa5a03799d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/server.h
+ * include/haproxy/server.h
  * This file defines everything related to servers.
  *
  * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_SERVER_H
-#define _PROTO_SERVER_H
+#ifndef _HAPROXY_SERVER_H
+#define _HAPROXY_SERVER_H
 
 #include <unistd.h>
 
+
 #include <haproxy/applet-t.h>
 #include <haproxy/api.h>
 #include <haproxy/dns-t.h>
+#include <haproxy/freq_ctr.h>
 #include <haproxy/proxy-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/task.h>
+#include <haproxy/thread-t.h>
 #include <haproxy/time.h>
-#include <types/server.h>
-
-#include <haproxy/freq_ctr.h>
 
 
 __decl_thread(extern HA_SPINLOCK_T idle_conn_srv_lock);
@@ -40,6 +41,7 @@ extern struct eb_root idle_conn_srv;
 extern struct task *idle_conn_task;
 extern struct task *idle_conn_cleanup[MAX_THREADS];
 extern struct mt_list toremove_connections[MAX_THREADS];
+extern struct dict server_name_dict;
 
 int srv_downtime(const struct server *s);
 int srv_lastsession(const struct server *s);
@@ -66,20 +68,6 @@ struct server *snr_check_ip_callback(struct server *srv, void *ip, unsigned char
 struct task *srv_cleanup_idle_connections(struct task *task, void *ctx, unsigned short state);
 struct task *srv_cleanup_toremove_connections(struct task *task, void *context, unsigned short state);
 
-/* increase the number of cumulated connections on the designated server */
-static inline void srv_inc_sess_ctr(struct server *s)
-{
-       _HA_ATOMIC_ADD(&s->counters.cum_sess, 1);
-       HA_ATOMIC_UPDATE_MAX(&s->counters.sps_max,
-                            update_freq_ctr(&s->sess_per_sec, 1));
-}
-
-/* set the time of last session on the designated server */
-static inline void srv_set_sess_last(struct server *s)
-{
-       s->counters.last_sess = now.tv_sec;
-}
-
 /*
  * Registers the server keyword list <kwl> as a list of valid keywords for next
  * parsing sessions.
@@ -98,20 +86,6 @@ void srv_dump_kws(char **out);
  */
 void server_recalc_eweight(struct server *sv, int must_update);
 
-/* returns the current server throttle rate between 0 and 100% */
-static inline unsigned int server_throttle_rate(struct server *sv)
-{
-       struct proxy *px = sv->proxy;
-
-       /* when uweight is 0, we're in soft-stop so that cannot be a slowstart,
-        * thus the throttle is 100%.
-        */
-       if (!sv->uweight)
-               return 100;
-
-       return (100U * px->lbprm.wmult * sv->cur_eweight + px->lbprm.wdiv - 1) / (px->lbprm.wdiv * sv->uweight);
-}
-
 /*
  * Parses weight_str and configures sv accordingly.
  * Returns NULL on success, error message string otherwise.
@@ -134,15 +108,6 @@ const char *server_parse_addr_change_request(struct server *sv,
 const char *server_parse_maxconn_change_request(struct server *sv,
                                               const char *maxconn_str);
 
-/*
- * Return true if the server has a zero user-weight, meaning it's in draining
- * mode (ie: not taking new non-persistent connections).
- */
-static inline int server_is_draining(const struct server *s)
-{
-       return !s->uweight || (s->cur_admin & SRV_ADMF_DRAIN);
-}
-
 /* Shutdown all connections of a server. The caller must pass a termination
  * code in <why>, which must be one of SF_ERR_* indicating the reason for the
  * shutdown.
@@ -185,6 +150,43 @@ void srv_clr_admin_flag(struct server *s, enum srv_admin mode);
  */
 void srv_set_dyncookie(struct server *s);
 
+/* increase the number of cumulated connections on the designated server */
+static inline void srv_inc_sess_ctr(struct server *s)
+{
+       _HA_ATOMIC_ADD(&s->counters.cum_sess, 1);
+       HA_ATOMIC_UPDATE_MAX(&s->counters.sps_max,
+                            update_freq_ctr(&s->sess_per_sec, 1));
+}
+
+/* set the time of last session on the designated server */
+static inline void srv_set_sess_last(struct server *s)
+{
+       s->counters.last_sess = now.tv_sec;
+}
+
+/* returns the current server throttle rate between 0 and 100% */
+static inline unsigned int server_throttle_rate(struct server *sv)
+{
+       struct proxy *px = sv->proxy;
+
+       /* when uweight is 0, we're in soft-stop so that cannot be a slowstart,
+        * thus the throttle is 100%.
+        */
+       if (!sv->uweight)
+               return 100;
+
+       return (100U * px->lbprm.wmult * sv->cur_eweight + px->lbprm.wdiv - 1) / (px->lbprm.wdiv * sv->uweight);
+}
+
+/*
+ * Return true if the server has a zero user-weight, meaning it's in draining
+ * mode (ie: not taking new non-persistent connections).
+ */
+static inline int server_is_draining(const struct server *s)
+{
+       return !s->uweight || (s->cur_admin & SRV_ADMF_DRAIN);
+}
+
 /* Puts server <s> into maintenance mode, and propagate that status down to all
  * tracking servers.
  */
@@ -294,7 +296,7 @@ static inline int srv_add_to_idle_list(struct server *srv, struct connection *co
        return 0;
 }
 
-#endif /* _PROTO_SERVER_H */
+#endif /* _HAPROXY_SERVER_H */
 
 /*
  * Local variables:
index 6b5bfffcbf39b1c937d1db8108ffa59311c023dd..c687c3907e89eb4887929c1085905dd5f8b145fc 100644 (file)
@@ -26,9 +26,9 @@
 #include <haproxy/global-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/pool.h>
+#include <haproxy/server.h>
 #include <haproxy/session-t.h>
 #include <haproxy/stick_table.h>
-#include <proto/server.h>
 
 extern struct pool_head *pool_head_session;
 extern struct pool_head *pool_head_sess_srv_list;
index 550a7ea26d3157851a40251c250b6935f0f33018..8e71049c75370dc0c76c27273c3c2d7f074f37f3 100644 (file)
 #include <haproxy/obj_type-t.h>
 #include <haproxy/proxy-t.h>
 #include <haproxy/queue-t.h>
+#include <haproxy/server-t.h>
 #include <haproxy/session-t.h>
 #include <haproxy/stream_interface-t.h>
 #include <haproxy/vars-t.h>
 
-#include <types/server.h>
 #include <haproxy/task-t.h>
 #include <haproxy/stick_table-t.h>
 
index 26e36ae41af8b25a80db0b2b991e8038b601ba09..e4b677aea624103a35bfaffb388c45a640ab3dd9 100644 (file)
@@ -40,6 +40,7 @@
 #include <haproxy/payload.h>
 #include <haproxy/proxy.h>
 #include <haproxy/queue.h>
+#include <haproxy/server.h>
 #include <haproxy/session.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/stream_interface.h>
@@ -54,7 +55,6 @@
 #include <haproxy/protocol.h>
 #include <haproxy/proto_tcp.h>
 #include <haproxy/sample.h>
-#include <proto/server.h>
 #include <proto/stream.h>
 
 #define TRACE_SOURCE &trace_strm
index 425b57c36b78dfc91ad751ea5d87b9a90494218f..cdb68401a461fcacc577207d5231932d9da59253 100644 (file)
 #include <haproxy/peers.h>
 #include <haproxy/proxy.h>
 #include <haproxy/sample.h>
+#include <haproxy/server.h>
 #include <haproxy/stats-t.h>
 
 #include <haproxy/protocol.h>
-#include <proto/server.h>
 #include <haproxy/stick_table.h>
 
 /* Report a warning if a rule is placed after a 'tcp-request session' rule.
index 631f10021cd9efa3c43bd135f42c2d6f16a4bd4e..49ef69d695f15f383ffcbff76064dfe5ece38f2b 100644 (file)
@@ -68,6 +68,7 @@
 #include <haproxy/time.h>
 #include <haproxy/uri_auth-t.h>
 #include <haproxy/namespace.h>
+#include <haproxy/server.h>
 #include <haproxy/task.h>
 #include <haproxy/thread.h>
 
@@ -76,7 +77,6 @@
 #include <haproxy/protocol.h>
 #include <haproxy/peers.h>
 #include <haproxy/sample.h>
-#include <proto/server.h>
 #include <proto/stream.h>
 #include <haproxy/stick_table.h>
 #include <haproxy/tcp_rules.h>
index 1adbf56e254dcbb7bb469760844792100fbc61c8..308a86ec3d88d0356765147c2e7d49a065f39fb1 100644 (file)
@@ -49,6 +49,7 @@
 #include <haproxy/htx.h>
 #include <haproxy/log.h>
 #include <haproxy/proxy.h>
+#include <haproxy/server.h>
 #include <haproxy/signal.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/stats-t.h>
@@ -63,7 +64,6 @@
 #include <haproxy/port_range.h>
 #include <haproxy/proto_tcp.h>
 #include <haproxy/protocol.h>
-#include <proto/server.h>
 #include <haproxy/proto_udp.h>
 #include <haproxy/sample.h>
 
index 321a974e232567a6266eea112994a03038055225..07d3631d6bcd626c25490f27dfdda61aa1ea03f0 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -42,6 +42,7 @@
 #include <haproxy/peers.h>
 #include <haproxy/proxy.h>
 #include <haproxy/sample-t.h>
+#include <haproxy/server.h>
 #include <haproxy/session.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
@@ -61,7 +62,6 @@
 #include <haproxy/pipe.h>
 #include <haproxy/protocol.h>
 #include <proto/stream.h>
-#include <proto/server.h>
 
 #define PAYLOAD_PATTERN "<<"
 
index dd29d270dc62a91629c114bc91fdf6a8caf6a9fa..8eddde9478dfd12d20ae60a44abbbb90e824a42c 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -31,6 +31,7 @@
 #include <haproxy/log.h>
 #include <haproxy/proxy.h>
 #include <haproxy/sample.h>
+#include <haproxy/server.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/task.h>
@@ -43,7 +44,6 @@
 #include <haproxy/global.h>
 
 #include <haproxy/fd.h>
-#include <proto/server.h>
 #include <haproxy/proto_udp.h>
 
 struct list dns_resolvers  = LIST_HEAD_INIT(dns_resolvers);
index 5d7aeffc0fb5e8835cad52401d08adde2b5ec5c7..434fc02f04be60145b47f467d2da6fd8b809406c 100644 (file)
 #include <haproxy/proxy-t.h>
 #include <haproxy/regex.h>
 #include <haproxy/sample.h>
+#include <haproxy/server-t.h>
 #include <haproxy/session.h>
 #include <haproxy/tools.h>
 
 #include <haproxy/global.h>
 
-#include <proto/server.h>
-
 /* Global list of all FCGI applications */
 static struct fcgi_app *fcgi_apps = NULL;
 
index a9e264f374b89037e63e6a076f6e7719ca414bc8..f1478b2a3f44e200bef7ddb181bf7cc5dd4c4f42 100644 (file)
 #include <haproxy/proxy.h>
 #include <haproxy/sample.h>
 #include <haproxy/regex.h>
+#include <haproxy/server.h>
 #include <haproxy/session.h>
 #include <haproxy/signal.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/arg.h>
 #include <haproxy/fd.h>
 #include <haproxy/protocol.h>
-#include <proto/server.h>
 #include <proto/stream.h>
 
 /* array of init calls for older platforms */
index 1ab6f5afdbf0ac6cb646d457281b02be2a221261..57e015cb4ee71632963de5d64f47cfe01dd37531 100644 (file)
@@ -45,6 +45,7 @@
 #include <haproxy/payload.h>
 #include <haproxy/proxy-t.h>
 #include <haproxy/sample.h>
+#include <haproxy/server-t.h>
 #include <haproxy/session.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
@@ -54,7 +55,6 @@
 #include <haproxy/vars.h>
 
 #include <haproxy/arg.h>
-#include <proto/server.h>
 #include <proto/stream.h>
 
 /* Lua uses longjmp to perform yield or throwing errors. This
index 34577b5f5063f4945f6d544cbdd7bf890aa73b00..cfcbcead9076c4bcf82f042de4df5f3bb4964833 100644 (file)
 #include <haproxy/pattern-t.h>
 #include <haproxy/proxy.h>
 #include <haproxy/regex.h>
+#include <haproxy/server.h>
 #include <haproxy/stats.h>
 #include <haproxy/time.h>
 
-#include <proto/server.h>
 #include <haproxy/stick_table.h>
 
 /* Contains the class reference of the concat object. */
index c6b292e79653251ef1820c5836a5bc4393a75aed..c0b3dd480b9fba21e0df92b736af9df3b1c2358b 100644 (file)
@@ -27,6 +27,7 @@
 #include <haproxy/net_helper.h>
 #include <haproxy/proxy.h>
 #include <haproxy/regex.h>
+#include <haproxy/server-t.h>
 #include <haproxy/stats.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/uri_auth-t.h>
@@ -34,7 +35,6 @@
 
 #include <haproxy/capture-t.h>
 
-#include <proto/server.h>
 #include <proto/stream.h>
 
 #define TRACE_SOURCE &trace_strm
index aaaef89582a923582b17cc0aa84a971c7a875203..1fb44f4c7ee1b5bd66fa94c7c7d3865ca7d7ba57 100644 (file)
  *
  */
 
+#include <import/eb32tree.h>
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/queue.h>
+#include <haproxy/server-t.h>
 #include <haproxy/tools.h>
-#include <import/eb32tree.h>
-
-#include <types/server.h>
 
 /* Return next tree node after <node> which must still be in the tree, or be
  * NULL. Lookup wraps around the end to the beginning. If the next node is the
index fc9ae5182df7a7c28f538b23b7fe29bcc987dfbc..be2ce47e18838d7bff4b71541ffb4eb33a883a80 100644 (file)
  *
  */
 
+#include <import/eb32tree.h>
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/queue.h>
-#include <import/eb32tree.h>
-
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 
 /* Remove a server from a tree. It must have previously been dequeued. This
index d7c69531747aa42b108074fd7babf28b1a765ffa..a835f014ebe72681b7c8508b6360207b74229c65 100644 (file)
  *
  */
 
+#include <import/eb32tree.h>
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/queue.h>
-#include <import/eb32tree.h>
-
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 
 /* Remove a server from a tree. It must have previously been dequeued. This
index 145d09784bc5ed49deb708591ca9065fb5fe0398..6183433eb2cdacb613412fc08b2ab54edbf39b1f 100644 (file)
  *
  */
 
+#include <import/eb32tree.h>
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/queue.h>
-#include <import/eb32tree.h>
+#include <haproxy/server-t.h>
 
-#include <types/server.h>
 
 static inline void fwrr_remove_from_tree(struct server *s);
 static inline void fwrr_queue_by_weight(struct eb_root *root, struct server *s);
index c963180a993ead9014f9402c4617d03efbc17f6c..61debf838103e7f8270b1f678203018b51fe7936 100644 (file)
  *
  */
 
+#include <import/eb32tree.h>
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/lb_map.h>
 #include <haproxy/queue.h>
-#include <import/eb32tree.h>
-
-#include <types/server.h>
+#include <haproxy/server-t.h>
 
 /* this function updates the map according to server <srv>'s new state.
  *
index c2a1869e59fe9e421ce220ae4c4e77d1067691d5..4ca4100096ba414725a7cc96e38487f55eedb0b0 100644 (file)
@@ -42,6 +42,7 @@
 #include <haproxy/log.h>
 #include <haproxy/proxy-t.h>
 #include <haproxy/sample.h>
+#include <haproxy/server.h>
 #include <haproxy/tools.h>
 #include <haproxy/namespace.h>
 
@@ -52,7 +53,6 @@
 #include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
 #include <haproxy/proto_tcp.h>
-#include <proto/server.h>
 #include <haproxy/tcp_rules.h>
 
 static int tcp_bind_listeners(struct protocol *proto, char *errmsg, int errlen);
index 173f17dff1ca9f9424baa4d97f2bbc61bb74c850..12cbd465177ada8581df5a41a5e6a305c8b0bc5e 100644 (file)
@@ -31,6 +31,7 @@
 #include <haproxy/peers.h>
 #include <haproxy/pool.h>
 #include <haproxy/proxy.h>
+#include <haproxy/server-t.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/task.h>
@@ -43,7 +44,6 @@
 
 #include <haproxy/fd.h>
 #include <haproxy/proto_tcp.h>
-#include <proto/server.h>
 #include <haproxy/signal.h>
 #include <proto/stream.h>
 
index ea0b64af73a6785c1c40ae6dfb2005926d99bcd1..c2853a959aaa461597a407fc88c251c36193444a 100644 (file)
@@ -75,6 +75,7 @@ s *     queue's lock.
 #include <haproxy/pool.h>
 #include <haproxy/queue.h>
 #include <haproxy/sample.h>
+#include <haproxy/server-t.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/task.h>
 #include <haproxy/tcp_rules.h>
@@ -82,7 +83,6 @@ s *     queue's lock.
 #include <haproxy/thread.h>
 #include <import/eb32tree.h>
 
-#include <proto/server.h>
 #include <proto/stream.h>
 
 
index 4751065b7f6b7f2fe256533f9986a86e83807ed2..63aa6ea6c6720c705fba85f00ef3b512b52e92e5 100644 (file)
@@ -30,6 +30,7 @@
 #include <haproxy/namespace.h>
 #include <haproxy/queue.h>
 #include <haproxy/sample.h>
+#include <haproxy/server.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/task.h>
@@ -37,7 +38,6 @@
 
 #include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
-#include <proto/server.h>
 #include <proto/stream.h>
 #include <netinet/tcp.h>
 
index 3a0918f9a1e2916debd8d095b9cfd4d7eb5c5f07..4cbe2dcbf01320ca4ea6fa602eb0d68ec0f10e3e 100644 (file)
@@ -57,6 +57,7 @@
 #include <haproxy/openssl-compat.h>
 #include <haproxy/pattern-t.h>
 #include <haproxy/proxy.h>
+#include <haproxy/server.h>
 #include <haproxy/shctx.h>
 #include <haproxy/ssl_ckch.h>
 #include <haproxy/ssl_crtlist.h>
@@ -78,7 +79,6 @@
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <haproxy/proto_tcp.h>
-#include <proto/server.h>
 #include <proto/stream.h>
 
 /* ***** READ THIS before adding code here! *****
index 4f6f6c009d9be6b1564a365ef9b4f190737df2c9..21d8dada8ff2eb488a8235af07903b7df534d125 100644 (file)
@@ -46,6 +46,7 @@
 #include <haproxy/map-t.h>
 #include <haproxy/pattern-t.h>
 #include <haproxy/proxy.h>
+#include <haproxy/server.h>
 #include <haproxy/session.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/stats.h>
@@ -62,7 +63,6 @@
 #include <haproxy/freq_ctr.h>
 #include <haproxy/pipe.h>
 #include <proto/stream.h>
-#include <proto/server.h>
 
 /* status codes available for the stats admin page (strictly 4 chars length) */
 const char *stat_status_codes[STAT_STATUS_SIZE] = {
index 45c1bc845bfbe169adf751ac4ef386e120f62b0a..52fcf9b0ab4143bc1c67d76ed65815cf6939c72b 100644 (file)
@@ -43,6 +43,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/proxy.h>
 #include <haproxy/queue.h>
+#include <haproxy/server.h>
 #include <haproxy/session.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
@@ -56,7 +57,6 @@
 #include <haproxy/freq_ctr.h>
 #include <proto/stream.h>
 #include <haproxy/pipe.h>
-#include <proto/server.h>
 #include <haproxy/stick_table.h>
 
 DECLARE_POOL(pool_head_stream, "stream", sizeof(struct stream));