]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move checks.h to haproxy/check{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 16:21:56 +0000 (18:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
All includes that were not absolutely necessary were removed because
checks.h happens to very often be part of dependency loops. A warning
was added about this in check-t.h. The fields, enums and structs were
a bit tidied because it's particularly tedious to find anything there.
It would make sense to split this in two or more files (at least
extract tcp-checks).

The file was renamed to the singular because it was one of the rare
exceptions to have an "s" appended to its name compared to the struct
name.

18 files changed:
Makefile
include/haproxy/check-t.h [moved from include/types/checks.h with 95% similarity]
include/haproxy/check.h [moved from include/proto/checks.h with 74% similarity]
include/haproxy/obj_type.h
include/proto/http_fetch.h
include/types/proxy.h
include/types/server.h
src/backend.c
src/cfgparse-listen.c
src/cfgparse.c
src/check.c [moved from src/checks.c with 99% similarity]
src/cli.c
src/dns.c
src/http_ana.c
src/server.c
src/stats.c
src/stream.c
src/vars.c

index 9d70f3645c939f89600dfc8e090ed54fa77fcc03..afdd7d7383ed17b27ed4f39237886b514c93962f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -791,7 +791,7 @@ endif
 
 OBJS = src/mux_h2.o src/stream.o src/mux_fcgi.o src/cfgparse-listen.o         \
        src/http_ana.o src/stats.o src/mux_h1.o src/flt_spoe.o src/server.o    \
-       src/cfgparse.o src/checks.o src/backend.o src/log.o src/peers.o        \
+       src/cfgparse.o src/check.o src/backend.o src/log.o src/peers.o         \
        src/cli.o src/haproxy.o src/stick_table.o src/tools.o src/sample.o     \
        src/proxy.o src/stream_interface.o src/pattern.o src/dns.o             \
        src/proto_tcp.o src/listener.o src/cfgparse-global.o src/h1.o          \
similarity index 95%
rename from include/types/checks.h
rename to include/haproxy/check-t.h
index 9d05ffc8e97486c5a3a5446cf3bc8bf7212f539f..832a3f5525bd48b92966b4f8298cd8ad3173b8bb 100644 (file)
@@ -1,7 +1,9 @@
 /*
- * Health-checks.
+ * include/haproxy/check-t.h
+ * Health-checks definitions, enums, macros and bitfields.
  *
  * Copyright 2008-2009 Krzysztof Piotr Oledzki <ole@ans.pl>
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  *
  */
 
-#ifndef _TYPES_CHECKS_H
-#define _TYPES_CHECKS_H
+#ifndef _HAPROXY_CHECKS_T_H
+#define _HAPROXY_CHECKS_T_H
 
-#include <haproxy/api-t.h>
 #include <import/ebpttree.h>
-
 #include <import/ist.h>
+#include <haproxy/buf-t.h>
 #include <haproxy/connection-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
-#include <haproxy/regex-t.h>
-#include <haproxy/buf-t.h>
-
-#include <haproxy/sample-t.h>
-#include <types/session.h>
-#include <haproxy/task-t.h>
+#include <haproxy/api-t.h>
+#include <haproxy/vars-t.h>
+
+/* Please note: this file tends to commonly be part of circular dependencies,
+ * so it is important to keep its includes list to the minimum possible (i.e.
+ * only types whose size needs to be known). Since there are no function
+ * prototypes nor pointers here, forward declarations are not really necessary.
+ * This file oughtt to be split into multiple parts, at least regular checks vs
+ * tcp-checks.
+ */
 
 /* enum used by check->result. Must remain in this order, as some code uses
  * result >= CHK_RES_PASSED to declare success.
@@ -131,8 +136,99 @@ enum {
        HANA_OBS_SIZE
 };
 
-struct proxy;
-struct server;
+/* options for tcp-check connect */
+#define TCPCHK_OPT_NONE            0x0000  /* no options specified, default */
+#define TCPCHK_OPT_SEND_PROXY      0x0001  /* send proxy-protocol string */
+#define TCPCHK_OPT_SSL             0x0002  /* SSL connection */
+#define TCPCHK_OPT_LINGER          0x0004  /* Do not RST connection, let it linger */
+#define TCPCHK_OPT_DEFAULT_CONNECT 0x0008  /* Do a connect using server params */
+#define TCPCHK_OPT_IMPLICIT        0x0010  /* Implicit connect */
+#define TCPCHK_OPT_SOCKS4          0x0020  /* check the connection via socks4 proxy */
+
+enum tcpcheck_send_type {
+       TCPCHK_SEND_UNDEF = 0,  /* Send is not parsed. */
+       TCPCHK_SEND_STRING,     /* Send an ASCII string. */
+       TCPCHK_SEND_BINARY,     /* Send a binary sequence. */
+       TCPCHK_SEND_STRING_LF,  /* Send an ASCII log-format string. */
+       TCPCHK_SEND_BINARY_LF,  /* Send a binary log-format sequence. */
+       TCPCHK_SEND_HTTP,       /* Send an HTTP request */
+};
+
+/* flags for tcp-check send */
+#define TCPCHK_SND_HTTP_FL_URI_FMT    0x0001 /* Use a log-format string for the uri */
+#define TCPCHK_SND_HTTP_FL_BODY_FMT   0x0002 /* Use a log-format string for the body */
+#define TCPCHK_SND_HTTP_FROM_OPT      0x0004 /* Send rule coming from "option httpck" directive */
+
+enum tcpcheck_eval_ret {
+       TCPCHK_EVAL_WAIT = 0,
+       TCPCHK_EVAL_STOP,
+       TCPCHK_EVAL_CONTINUE,
+};
+
+enum tcpcheck_expect_type {
+       TCPCHK_EXPECT_UNDEF = 0,         /* Match is not used. */
+       TCPCHK_EXPECT_STRING,            /* Matches a string. */
+       TCPCHK_EXPECT_STRING_REGEX,      /* Matches a regular pattern. */
+       TCPCHK_EXPECT_STRING_LF,         /* Matches a log-format string. */
+       TCPCHK_EXPECT_BINARY,            /* Matches a binary sequence on a hex-encoded text. */
+       TCPCHK_EXPECT_BINARY_REGEX,      /* Matches a regular pattern on a hex-encoded text. */
+       TCPCHK_EXPECT_BINARY_LF,         /* Matches a log-format binary sequence on a hex-encoded text. */
+       TCPCHK_EXPECT_CUSTOM,            /* Execute a custom function. */
+       TCPCHK_EXPECT_HTTP_STATUS,       /* Matches a list of codes on the HTTP status */
+       TCPCHK_EXPECT_HTTP_STATUS_REGEX, /* Matches a regular pattern on the HTTP status */
+       TCPCHK_EXPECT_HTTP_HEADER,       /* Matches on HTTP headers */
+       TCPCHK_EXPECT_HTTP_BODY,         /* Matches a string oa the HTTP payload */
+       TCPCHK_EXPECT_HTTP_BODY_REGEX,   /* Matches a regular pattern on a HTTP payload */
+       TCPCHK_EXPECT_HTTP_BODY_LF,      /* Matches a log-format string on the HTTP payload */
+};
+
+/* tcp-check expect flags */
+#define TCPCHK_EXPT_FL_INV             0x0001 /* Matching is inversed */
+#define TCPCHK_EXPT_FL_HTTP_HNAME_STR  0x0002 /* Exact match on the HTTP header name */
+#define TCPCHK_EXPT_FL_HTTP_HNAME_BEG  0x0004 /* Prefix match on the HTTP header name */
+#define TCPCHK_EXPT_FL_HTTP_HNAME_END  0x0008 /* Suffix match on the HTTP header name */
+#define TCPCHK_EXPT_FL_HTTP_HNAME_SUB  0x0010 /* Substring match on the HTTP header name */
+#define TCPCHK_EXPT_FL_HTTP_HNAME_REG  0x0020 /* Regex match on the HTTP header name */
+#define TCPCHK_EXPT_FL_HTTP_HNAME_FMT  0x0040 /* The HTTP header name is a log-format string */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_NONE  0x0080 /* No match on the HTTP header value */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_STR   0x0100 /* Exact match on the HTTP header value */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_BEG   0x0200 /* Prefix match on the HTTP header value */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_END   0x0400 /* Suffix match on the HTTP header value */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_SUB   0x0800 /* Substring match on the HTTP header value */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_REG   0x1000 /* Regex match on the HTTP header value*/
+#define TCPCHK_EXPT_FL_HTTP_HVAL_FMT   0x2000 /* The HTTP header value is a log-format string */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_FULL  0x4000 /* Match the full header value ( no stop on commas ) */
+
+#define TCPCHK_EXPT_FL_HTTP_HNAME_TYPE 0x003E /* Mask to get matching method on header name */
+#define TCPCHK_EXPT_FL_HTTP_HVAL_TYPE  0x1F00 /* Mask to get matching method on header value */
+
+/* possible actions for tcpcheck_rule->action */
+enum tcpcheck_rule_type {
+       TCPCHK_ACT_SEND = 0, /* send action, regular string format */
+       TCPCHK_ACT_EXPECT, /* expect action, either regular or binary string */
+       TCPCHK_ACT_CONNECT, /* connect action, to probe a new port */
+       TCPCHK_ACT_COMMENT, /* no action, simply a comment used for logs */
+       TCPCHK_ACT_ACTION_KW, /* custom registered action_kw rule. */
+};
+
+#define TCPCHK_RULES_NONE           0x00000000
+#define TCPCHK_RULES_UNUSED_TCP_RS  0x00000001 /* An unused tcp-check ruleset exists */
+#define TCPCHK_RULES_UNUSED_HTTP_RS 0x00000002 /* An unused http-check ruleset exists */
+#define TCPCHK_RULES_UNUSED_RS      0x00000003 /* Mask for unused ruleset */
+
+#define TCPCHK_RULES_PGSQL_CHK   0x00000010
+#define TCPCHK_RULES_REDIS_CHK   0x00000020
+#define TCPCHK_RULES_SMTP_CHK    0x00000030
+#define TCPCHK_RULES_HTTP_CHK    0x00000040
+#define TCPCHK_RULES_MYSQL_CHK   0x00000050
+#define TCPCHK_RULES_LDAP_CHK    0x00000060
+#define TCPCHK_RULES_SSL3_CHK    0x00000070
+#define TCPCHK_RULES_AGENT_CHK   0x00000080
+#define TCPCHK_RULES_SPOP_CHK    0x00000090
+/* Unused 0x000000A0..0x00000FF0 (reserverd for futur proto) */
+#define TCPCHK_RULES_TCP_CHK     0x00000FF0
+#define TCPCHK_RULES_PROTO_CHK   0x00000FF0 /* Mask to cover protocol check */
+
 struct check {
        enum obj_type obj_type;                 /* object type == OBJ_TYPE_CHECK */
        struct session *sess;                   /* Health check session. */
@@ -171,14 +267,6 @@ struct check {
        int via_socks4;                         /* check the connection via socks4 proxy */
 };
 
-#define TCPCHK_OPT_NONE            0x0000  /* no options specified, default */
-#define TCPCHK_OPT_SEND_PROXY      0x0001  /* send proxy-protocol string */
-#define TCPCHK_OPT_SSL             0x0002  /* SSL connection */
-#define TCPCHK_OPT_LINGER          0x0004  /* Do not RST connection, let it linger */
-#define TCPCHK_OPT_DEFAULT_CONNECT 0x0008  /* Do a connect using server params */
-#define TCPCHK_OPT_IMPLICIT        0x0010  /* Implicit connect */
-#define TCPCHK_OPT_SOCKS4          0x0020  /* check the connection via socks4 proxy */
-
 struct tcpcheck_connect {
        char *sni;                     /* server name to use for SSL connections */
        char *alpn;                    /* ALPN to use for the SSL connection */
@@ -190,15 +278,6 @@ struct tcpcheck_connect {
        struct sockaddr_storage addr;  /* the address to the connect */
 };
 
-enum tcpcheck_send_type {
-       TCPCHK_SEND_UNDEF = 0,  /* Send is not parsed. */
-       TCPCHK_SEND_STRING,     /* Send an ASCII string. */
-       TCPCHK_SEND_BINARY,     /* Send a binary sequence. */
-       TCPCHK_SEND_STRING_LF,  /* Send an ASCII log-format string. */
-       TCPCHK_SEND_BINARY_LF,  /* Send a binary log-format sequence. */
-       TCPCHK_SEND_HTTP,       /* Send an HTTP request */
-};
-
 struct tcpcheck_http_hdr {
        struct ist  name;  /* the header name */
        struct list value; /* the log-format string value */
@@ -210,10 +289,6 @@ struct tcpcheck_codes {
        size_t num;               /* number of entry in the array */
 };
 
-#define TCPCHK_SND_HTTP_FL_URI_FMT    0x0001 /* Use a log-format string for the uri */
-#define TCPCHK_SND_HTTP_FL_BODY_FMT   0x0002 /* Use a log-format string for the body */
-#define TCPCHK_SND_HTTP_FROM_OPT      0x0004 /* Send rule coming from "option httpck" directive */
-
 struct tcpcheck_send {
        enum tcpcheck_send_type type;
        union {
@@ -236,49 +311,6 @@ struct tcpcheck_send {
        };
 };
 
-enum tcpcheck_eval_ret {
-       TCPCHK_EVAL_WAIT = 0,
-       TCPCHK_EVAL_STOP,
-       TCPCHK_EVAL_CONTINUE,
-};
-
-enum tcpcheck_expect_type {
-       TCPCHK_EXPECT_UNDEF = 0,         /* Match is not used. */
-       TCPCHK_EXPECT_STRING,            /* Matches a string. */
-       TCPCHK_EXPECT_STRING_REGEX,      /* Matches a regular pattern. */
-       TCPCHK_EXPECT_STRING_LF,         /* Matches a log-format string. */
-       TCPCHK_EXPECT_BINARY,            /* Matches a binary sequence on a hex-encoded text. */
-       TCPCHK_EXPECT_BINARY_REGEX,      /* Matches a regular pattern on a hex-encoded text. */
-       TCPCHK_EXPECT_BINARY_LF,         /* Matches a log-format binary sequence on a hex-encoded text. */
-       TCPCHK_EXPECT_CUSTOM,            /* Execute a custom function. */
-       TCPCHK_EXPECT_HTTP_STATUS,       /* Matches a list of codes on the HTTP status */
-       TCPCHK_EXPECT_HTTP_STATUS_REGEX, /* Matches a regular pattern on the HTTP status */
-       TCPCHK_EXPECT_HTTP_HEADER,       /* Matches on HTTP headers */
-       TCPCHK_EXPECT_HTTP_BODY,         /* Matches a string oa the HTTP payload */
-       TCPCHK_EXPECT_HTTP_BODY_REGEX,   /* Matches a regular pattern on a HTTP payload */
-       TCPCHK_EXPECT_HTTP_BODY_LF,      /* Matches a log-format string on the HTTP payload */
-};
-
-/* tcp-check expect flags */
-#define TCPCHK_EXPT_FL_INV             0x0001 /* Matching is inversed */
-#define TCPCHK_EXPT_FL_HTTP_HNAME_STR  0x0002 /* Exact match on the HTTP header name */
-#define TCPCHK_EXPT_FL_HTTP_HNAME_BEG  0x0004 /* Prefix match on the HTTP header name */
-#define TCPCHK_EXPT_FL_HTTP_HNAME_END  0x0008 /* Suffix match on the HTTP header name */
-#define TCPCHK_EXPT_FL_HTTP_HNAME_SUB  0x0010 /* Substring match on the HTTP header name */
-#define TCPCHK_EXPT_FL_HTTP_HNAME_REG  0x0020 /* Regex match on the HTTP header name */
-#define TCPCHK_EXPT_FL_HTTP_HNAME_FMT  0x0040 /* The HTTP header name is a log-format string */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_NONE  0x0080 /* No match on the HTTP header value */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_STR   0x0100 /* Exact match on the HTTP header value */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_BEG   0x0200 /* Prefix match on the HTTP header value */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_END   0x0400 /* Suffix match on the HTTP header value */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_SUB   0x0800 /* Substring match on the HTTP header value */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_REG   0x1000 /* Regex match on the HTTP header value*/
-#define TCPCHK_EXPT_FL_HTTP_HVAL_FMT   0x2000 /* The HTTP header value is a log-format string */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_FULL  0x4000 /* Match the full header value ( no stop on commas ) */
-
-#define TCPCHK_EXPT_FL_HTTP_HNAME_TYPE 0x003E /* Mask to get matching method on header name */
-#define TCPCHK_EXPT_FL_HTTP_HVAL_TYPE  0x1F00 /* Mask to get matching method on header value */
-
 struct tcpcheck_expect {
        enum tcpcheck_expect_type type;   /* Type of pattern used for matching. */
        unsigned int flags;               /* TCPCHK_EXPT_FL_* */
@@ -318,15 +350,6 @@ struct tcpcheck_action_kw {
        struct act_rule *rule;
 };
 
-/* possible actions for tcpcheck_rule->action */
-enum tcpcheck_rule_type {
-       TCPCHK_ACT_SEND = 0, /* send action, regular string format */
-       TCPCHK_ACT_EXPECT, /* expect action, either regular or binary string */
-       TCPCHK_ACT_CONNECT, /* connect action, to probe a new port */
-       TCPCHK_ACT_COMMENT, /* no action, simply a comment used for logs */
-       TCPCHK_ACT_ACTION_KW, /* custom registered action_kw rule. */
-};
-
 struct tcpcheck_rule {
        struct list list;                       /* list linked to from the proxy */
        enum tcpcheck_rule_type action;         /* type of the rule. */
@@ -340,24 +363,6 @@ struct tcpcheck_rule {
        };
 };
 
-#define TCPCHK_RULES_NONE           0x00000000
-#define TCPCHK_RULES_UNUSED_TCP_RS  0x00000001 /* An unused tcp-check ruleset exists */
-#define TCPCHK_RULES_UNUSED_HTTP_RS 0x00000002 /* An unused http-check ruleset exists */
-#define TCPCHK_RULES_UNUSED_RS      0x00000003 /* Mask for unused ruleset */
-
-#define TCPCHK_RULES_PGSQL_CHK   0x00000010
-#define TCPCHK_RULES_REDIS_CHK   0x00000020
-#define TCPCHK_RULES_SMTP_CHK    0x00000030
-#define TCPCHK_RULES_HTTP_CHK    0x00000040
-#define TCPCHK_RULES_MYSQL_CHK   0x00000050
-#define TCPCHK_RULES_LDAP_CHK    0x00000060
-#define TCPCHK_RULES_SSL3_CHK    0x00000070
-#define TCPCHK_RULES_AGENT_CHK   0x00000080
-#define TCPCHK_RULES_SPOP_CHK    0x00000090
-/* Unused 0x000000A0..0x00000FF0 (reserverd for futur proto) */
-#define TCPCHK_RULES_TCP_CHK     0x00000FF0
-#define TCPCHK_RULES_PROTO_CHK   0x00000FF0 /* Mask to cover protocol check */
-
 /* A list of tcp-check vars, to be registered before executing a ruleset */
 struct tcpcheck_var {
        struct ist name;         /* the variable name with the scope */
@@ -379,4 +384,4 @@ struct tcpcheck_ruleset {
 };
 
 
-#endif /* _TYPES_CHECKS_H */
+#endif /* _HAPROXY_CHECKS_T_H */
similarity index 74%
rename from include/proto/checks.h
rename to include/haproxy/check.h
index d24943e75fe45ac353cf8bb4cddd76491270b0a8..85fc49b0d94ec1fc5628c1c690506d3b04c66581 100644 (file)
@@ -1,30 +1,33 @@
 /*
 include/proto/checks.h
-  Functions prototypes for the checks.
-
 Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation, version 2.1
-  exclusively.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
* include/haproxy/check.h
* Functions prototypes for the checks.
+ *
* Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, version 2.1
* exclusively.
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
+ *
* You should have received a copy of the GNU Lesser General Public
* 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_CHECKS_H
-#define _PROTO_CHECKS_H
+#ifndef _HAPROXY_CHECKS_H
+#define _HAPROXY_CHECKS_H
 
 #include <haproxy/action-t.h>
+#include <haproxy/check-t.h>
+#include <haproxy/list-t.h>
 #include <haproxy/mailers.h>
-#include <types/checks.h>
+#include <types/proxy.h>
+#include <types/server.h>
 
 const char *get_check_status_description(short check_status);
 const char *get_check_status_info(short check_status);
@@ -88,7 +91,7 @@ int proxy_parse_external_check_opt(char **args, int cur_arg, struct proxy *curpx
 
 int set_srv_agent_send(struct server *srv, const char *send);
 
-#endif /* _PROTO_CHECKS_H */
+#endif /* _HAPROXY_CHECKS_H */
 
 /*
  * Local variables:
index 56597056eddfb49b2910ded167374428620d5976..6f741e4de1448e000f426d08975975bd45ba5afa 100644 (file)
@@ -23,6 +23,7 @@
 #define _HAPROXY_OBJ_TYPE_H
 
 #include <haproxy/api.h>
+#include <haproxy/check-t.h>
 #include <haproxy/connection-t.h>
 #include <haproxy/listener-t.h>
 #include <haproxy/obj_type-t.h>
@@ -32,7 +33,6 @@
 #include <types/server.h>
 #include <types/stream.h>
 #include <types/stream_interface.h>
-#include <types/checks.h>
 
 static inline enum obj_type obj_type(const enum obj_type *t)
 {
index 3a7261aa89d6cf11bb2372f25e7c79dba4c7eb58..2c844355b7a9629bb1db34362dc7f46d95e30fd4 100644 (file)
 #define _PROTO_HTTP_FETCH_H
 
 #include <haproxy/api.h>
+#include <haproxy/check-t.h>
 #include <haproxy/htx.h>
 #include <haproxy/arg-t.h>
 #include <types/channel.h>
-#include <types/checks.h>
 #include <haproxy/sample-t.h>
 
 struct htx *smp_prefetch_htx(struct sample *smp, struct channel *chn, struct check *check, int vol);
index a72232f6a371fe85bcb6c7d2fa3b5c52fc9e7456..5ba68c7b92eeaa6f3e199043554cc4c408f751cf 100644 (file)
@@ -28,6 +28,7 @@
 #include <arpa/inet.h>
 
 #include <haproxy/api-t.h>
+#include <haproxy/check-t.h>
 #include <haproxy/chunk.h>
 #include <haproxy/counters-t.h>
 #include <haproxy/http-t.h>
@@ -40,7 +41,6 @@
 
 #include <types/acl.h>
 #include <types/backend.h>
-#include <types/checks.h>
 #include <types/filters.h>
 #include <haproxy/freq_ctr-t.h>
 #include <types/log.h>
index 38326b0a15a86af11c36a3fc8f58e4b4ba007f17..1f9ef1f69ab4a83a116365dae5a35caa18838f1f 100644 (file)
@@ -25,6 +25,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <haproxy/check-t.h>
 #include <haproxy/counters-t.h>
 #include <haproxy/dns-t.h>
 #include <haproxy/api-t.h>
@@ -41,7 +42,6 @@
 #include <types/queue.h>
 #include <types/ssl_sock.h>
 #include <haproxy/task-t.h>
-#include <types/checks.h>
 
 
 /* server states. Only SRV_ST_STOPPED indicates a down server. */
index 4a1b050a11c8f75d85a48a58fb4c5ee262b44a13..8e8618a503f1bf3bb9b55375901805a06f2bb5c8 100644 (file)
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 
 #include <haproxy/api.h>
+#include <haproxy/check.h>
 #include <haproxy/frontend.h>
 #include <haproxy/hash.h>
 #include <haproxy/http.h>
@@ -42,7 +43,6 @@
 #include <haproxy/arg.h>
 #include <proto/backend.h>
 #include <proto/channel.h>
-#include <proto/checks.h>
 #include <proto/lb_map.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
index 205fbef2dfb2262bad16435d4f64c85cca9d94d3..943c4c811396aac31002f5687a573c6e622ecaec 100644 (file)
@@ -15,6 +15,7 @@
 #include <common/uri_auth.h>
 
 #include <haproxy/capture-t.h>
+#include <haproxy/check.h>
 #include <haproxy/compression-t.h>
 #include <haproxy/connection.h>
 #include <haproxy/http_htx.h>
@@ -24,7 +25,6 @@
 #include <types/stats.h>
 
 #include <proto/acl.h>
-#include <proto/checks.h>
 #include <haproxy/protocol.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
index c5b3944ba504fd3e32555c705d2f2ef123da3551..6051b155ee27a147cc43b2816b6d15b181f028aa 100644 (file)
@@ -38,6 +38,7 @@
 #include <haproxy/api.h>
 #include <haproxy/capture.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/chunk.h>
 #include <haproxy/connection.h>
 #include <haproxy/dns.h>
@@ -67,7 +68,6 @@
 #include <proto/acl.h>
 #include <proto/backend.h>
 #include <proto/channel.h>
-#include <proto/checks.h>
 #include <proto/stats.h>
 #include <proto/filters.h>
 #include <proto/lb_map.h>
similarity index 99%
rename from src/checks.c
rename to src/check.c
index a9feb79d245abec391510d3114f693edb4627f99..dfa30988d01c6914353e66c7eb39480d69728aeb 100644 (file)
@@ -33,6 +33,7 @@
 #include <haproxy/action.h>
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/chunk.h>
 #include <haproxy/dns.h>
 #include <haproxy/istbuf.h>
@@ -54,7 +55,6 @@
 
 #include <haproxy/arg.h>
 #include <proto/backend.h>
-#include <proto/checks.h>
 #include <proto/stats.h>
 #include <haproxy/fd.h>
 #include <proto/log.h>
index 4208ceabf2e90c76c3eff1ff783100d9f2f9317c..63d2b58f7db7416f5650e2e255ab8c203e86b47e 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -28,6 +28,7 @@
 
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/dns-t.h>
 #include <haproxy/frontend.h>
 #include <haproxy/list.h>
@@ -50,7 +51,6 @@
 #include <haproxy/activity.h>
 #include <proto/backend.h>
 #include <proto/channel.h>
-#include <proto/checks.h>
 #include <proto/cli.h>
 #include <haproxy/compression.h>
 #include <proto/stats.h>
index 35f12d3204d4f5557c01f8724e3ab0a4a0a7b5b2..b49f62d84be459e9f24e2c3a689aad748cc79ecd 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -22,6 +22,7 @@
 #include <haproxy/action.h>
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/dns.h>
 #include <haproxy/errors.h>
 #include <haproxy/http_rules.h>
@@ -40,7 +41,6 @@
 
 #include <proto/channel.h>
 #include <proto/cli.h>
-#include <proto/checks.h>
 #include <haproxy/fd.h>
 #include <proto/http_ana.h>
 #include <proto/log.h>
index 546e1395732793c3899832a1a498252d3a4b52b1..edfacc4ffaf6063fe595f6232012d419bcaf1446 100644 (file)
@@ -13,6 +13,7 @@
 #include <haproxy/action-t.h>
 #include <haproxy/api.h>
 #include <haproxy/base64.h>
+#include <haproxy/check.h>
 #include <haproxy/connection.h>
 #include <haproxy/http.h>
 #include <haproxy/http_htx.h>
@@ -26,7 +27,6 @@
 
 #include <proto/acl.h>
 #include <proto/channel.h>
-#include <proto/checks.h>
 #include <proto/filters.h>
 #include <proto/log.h>
 #include <proto/http_ana.h>
index 243dcafd3b7d26d152b3096eb4ef81f298b1fe4f..904cadb8944e7601fa0816240be1742764041fb4 100644 (file)
@@ -18,6 +18,7 @@
 #include <import/xxhash.h>
 
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/connection.h>
 #include <haproxy/dict-t.h>
 #include <haproxy/dns.h>
@@ -35,7 +36,6 @@
 
 #include <proto/applet.h>
 #include <proto/cli.h>
-#include <proto/checks.h>
 #include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
 #include <proto/queue.h>
index 281638cfead2093c75ce7c511aa8cad82f406dbe..1f1e5cd7141a5dbb2987cfdb3bcdb6ea59934237 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/compression.h>
 #include <haproxy/debug.h>
 #include <haproxy/dns.h>
@@ -53,7 +54,6 @@
 
 #include <proto/backend.h>
 #include <proto/channel.h>
-#include <proto/checks.h>
 #include <proto/cli.h>
 #include <proto/stats.h>
 #include <haproxy/fd.h>
index 28ce2e54dfef65047d1e9efedcd4b6efb12a2d33..2f6ff043e3c4de1f012ad7edb358b51db43ce2c5 100644 (file)
@@ -18,6 +18,7 @@
 #include <haproxy/api.h>
 #include <haproxy/capture.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/connection.h>
 #include <haproxy/dict.h>
 #include <haproxy/dns.h>
@@ -44,7 +45,6 @@
 #include <haproxy/arg.h>
 #include <proto/backend.h>
 #include <proto/channel.h>
-#include <proto/checks.h>
 #include <proto/cli.h>
 #include <proto/stats.h>
 #include <haproxy/fd.h>
index d2c87ded780be92c57cd4a206b65aababe5bcd4a..4a3b4574ff62af37018b4648dbf2116fc1f6c09c 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
+#include <haproxy/check.h>
 #include <haproxy/http.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/list.h>
@@ -12,7 +13,6 @@
 #include <haproxy/arg.h>
 #include <proto/http_ana.h>
 #include <proto/stream.h>
-#include <proto/checks.h>
 
 /* This contains a pool of struct vars */
 DECLARE_STATIC_POOL(var_pool, "vars", sizeof(struct var));