]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: tcpcheck: Stop to export most of custom expect functions
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Nov 2026 07:19:01 +0000 (08:19 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Nov 2026 13:50:41 +0000 (14:50 +0100)
The custom expect functions, for instance tcpcheck_ldap_expect_bindrsp(),
are only used by tcpcheck rules. No reason to export them. The only
exception is the one parsing agent-check response because the parsing of
this option is performed in check.c.

Note also tcpcheck_spop_expect_agenthello() was removed during SPOE
refactoring, so there is no function definition.

include/haproxy/tcpcheck.h
src/tcpcheck.c

index d4878f9f4cd90616ca3ce6ca97c50528b686ee3b..5439d1f79ac739af1edc57fa26a31ddb4d9d7642 100644 (file)
@@ -56,12 +56,6 @@ int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_ruleset *r
 
 void free_tcpcheck_http_hdr(struct tcpcheck_http_hdr *hdr);
 
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_iniths(struct check *check, struct tcpcheck_rule *rule, int last_read);
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_ok(struct check *check, struct tcpcheck_rule *rule, int last_read);
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth(struct check *check, struct tcpcheck_rule *rule, int last_read);
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth_done(struct check *check, struct tcpcheck_rule *rule, int last_read);
-enum tcpcheck_eval_ret tcpcheck_ldap_expect_bindrsp(struct check *check, struct tcpcheck_rule *rule, int last_read);
-enum tcpcheck_eval_ret tcpcheck_spop_expect_agenthello(struct check *check, struct tcpcheck_rule *rule, int last_read);
 enum tcpcheck_eval_ret tcpcheck_agent_expect_reply(struct check *check, struct tcpcheck_rule *rule, int last_read);
 enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpcheck_rule *rule);
 enum tcpcheck_eval_ret tcpcheck_eval_send(struct check *check, struct tcpcheck_rule *rule);
index d19b8d6597993ac9b3cbd2454a4ea542f0aaddaf..df495328cf6e67ef265c613c5b0405791bc599cf 100644 (file)
@@ -651,7 +651,7 @@ static enum tcpcheck_eval_ret tcpcheck_mysql_expect_packet(struct check *check,
  * TCPCHK_EVAL_CONTINUE to evaluate the next rule or TCPCHK_EVAL_STOP if an
  * error occurred.
  */
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_iniths(struct check *check, struct tcpcheck_rule *rule, int last_read)
+static enum tcpcheck_eval_ret tcpcheck_mysql_expect_iniths(struct check *check, struct tcpcheck_rule *rule, int last_read)
 {
        return tcpcheck_mysql_expect_packet(check, rule, 0, last_read);
 }
@@ -661,7 +661,7 @@ enum tcpcheck_eval_ret tcpcheck_mysql_expect_iniths(struct check *check, struct
  * data, TCPCHK_EVAL_CONTINUE to evaluate the next rule or TCPCHK_EVAL_STOP if
  * an error occurred.
  */
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_ok(struct check *check, struct tcpcheck_rule *rule, int last_read)
+static enum tcpcheck_eval_ret tcpcheck_mysql_expect_ok(struct check *check, struct tcpcheck_rule *rule, int last_read)
 {
        unsigned int hslen = 0;
 
@@ -749,7 +749,7 @@ static int tcpcheck_mysql_store_var(struct check *check, struct ist name, int ty
  * TCPCHK_EVAL_WAIT to wait for more data, TCPCHK_EVAL_CONTINUE to evaluate
  * the next rule or TCPCHK_EVAL_STOP if an error occurred.
  */
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth(struct check *check, struct tcpcheck_rule *rule, int last_read)
+static enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth(struct check *check, struct tcpcheck_rule *rule, int last_read)
 {
        enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
        enum healthcheck_status status = HCHK_STATUS_L7RSP;
@@ -904,7 +904,7 @@ enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth(struct check *check, struct tc
  * the next rule or TCPCHK_EVAL_STOP if an error occurred or if the check
  * succeeded.
  */
-enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth_done(struct check *check, struct tcpcheck_rule *rule, int last_read)
+static enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth_done(struct check *check, struct tcpcheck_rule *rule, int last_read)
 {
        enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
        enum healthcheck_status status = HCHK_STATUS_L7RSP;
@@ -1005,7 +1005,7 @@ enum tcpcheck_eval_ret tcpcheck_mysql_expect_auth_done(struct check *check, stru
  * TCPCHK_EVAL_CONTINUE to evaluate the next rule or TCPCHK_EVAL_STOP if an
  * error occurred.
  */
-enum tcpcheck_eval_ret tcpcheck_ldap_expect_bindrsp(struct check *check, struct tcpcheck_rule *rule, int last_read)
+static enum tcpcheck_eval_ret tcpcheck_ldap_expect_bindrsp(struct check *check, struct tcpcheck_rule *rule, int last_read)
 {
        enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
        enum healthcheck_status status;
@@ -1131,7 +1131,7 @@ enum tcpcheck_eval_ret tcpcheck_ldap_expect_bindrsp(struct check *check, struct
  * TCPCHK_EVAL_CONTINUE to evaluate the next rule or TCPCHK_EVAL_STOP if an
  * error occurred.
  */
-enum tcpcheck_eval_ret tcpcheck_spop_expect_hello(struct check *check, struct tcpcheck_rule *rule, int last_read)
+static enum tcpcheck_eval_ret tcpcheck_spop_expect_hello(struct check *check, struct tcpcheck_rule *rule, int last_read)
 {
        enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
        enum healthcheck_status status;