]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: actions: Export actions lookup functions
authorThierry Fournier <thierry.fournier@ozon.io>
Sat, 28 Nov 2020 16:40:24 +0000 (17:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Dec 2020 08:45:18 +0000 (09:45 +0100)
These functions will be useful to check if a keyword is already registered.
This will be needed by a next patch to fix a bug, and will need to be
backported.

include/haproxy/http_rules.h
include/haproxy/tcp_rules.h
src/http_rules.c
src/tcp_rules.c

index 55788bd9198bbcb219350bc9a596ea179fd2c62a..159abb8556b069f486c59f966ec752f3f501cefe 100644 (file)
@@ -52,6 +52,10 @@ static inline void http_after_res_keywords_register(struct action_kw_list *kw_li
        LIST_ADDQ(&http_after_res_keywords.list, &kw_list->list);
 }
 
+struct action_kw *action_http_req_custom(const char *kw);
+struct action_kw *action_http_res_custom(const char *kw);
+struct action_kw *action_http_after_res_custom(const char *kw);
+
 #endif /* _HAPROXY_HTTP_RULES_H */
 
 /*
index 57073f49a09d7ba962a2395c9e751e63268d8e80..2ed515e607139b4b40a1ff90a40ab508212c6e65 100644 (file)
@@ -37,6 +37,11 @@ void tcp_req_sess_keywords_register(struct action_kw_list *kw_list);
 void tcp_req_cont_keywords_register(struct action_kw_list *kw_list);
 void tcp_res_cont_keywords_register(struct action_kw_list *kw_list);
 
+struct action_kw *tcp_req_conn_action(const char *kw);
+struct action_kw *tcp_req_sess_action(const char *kw);
+struct action_kw *tcp_req_cont_action(const char *kw);
+struct action_kw *tcp_res_cont_action(const char *kw);
+
 #endif /* _HAPROXY_TCP_RULES_H */
 
 /*
index 87d32f3777d59c5d1ba210d14671d86cd982d7a9..2ac1fefc1453cea9392ad86149fc5bf8db948304 100644 (file)
@@ -51,7 +51,7 @@ struct action_kw_list http_after_res_keywords = {
 /*
  * Return the struct http_req_action_kw associated to a keyword.
  */
-static struct action_kw *action_http_req_custom(const char *kw)
+struct action_kw *action_http_req_custom(const char *kw)
 {
        return action_lookup(&http_req_keywords.list, kw);
 }
@@ -59,7 +59,7 @@ static struct action_kw *action_http_req_custom(const char *kw)
 /*
  * Return the struct http_res_action_kw associated to a keyword.
  */
-static struct action_kw *action_http_res_custom(const char *kw)
+struct action_kw *action_http_res_custom(const char *kw)
 {
        return action_lookup(&http_res_keywords.list, kw);
 }
@@ -67,7 +67,7 @@ static struct action_kw *action_http_res_custom(const char *kw)
 /*
  * Return the struct http_after_res_action_kw associated to a keyword.
  */
-static struct action_kw *action_http_after_res_custom(const char *kw)
+struct action_kw *action_http_after_res_custom(const char *kw)
 {
        return action_lookup(&http_after_res_keywords.list, kw);
 }
index 6a31a32670e831ce80975834093eb2d421684c21..d5fce268bdd74db1adf6211ddbfbd532a0a33068 100644 (file)
@@ -66,22 +66,22 @@ void tcp_res_cont_keywords_register(struct action_kw_list *kw_list)
 /*
  * Return the struct tcp_req_action_kw associated to a keyword.
  */
-static struct action_kw *tcp_req_conn_action(const char *kw)
+struct action_kw *tcp_req_conn_action(const char *kw)
 {
        return action_lookup(&tcp_req_conn_keywords, kw);
 }
 
-static struct action_kw *tcp_req_sess_action(const char *kw)
+struct action_kw *tcp_req_sess_action(const char *kw)
 {
        return action_lookup(&tcp_req_sess_keywords, kw);
 }
 
-static struct action_kw *tcp_req_cont_action(const char *kw)
+struct action_kw *tcp_req_cont_action(const char *kw)
 {
        return action_lookup(&tcp_req_cont_keywords, kw);
 }
 
-static struct action_kw *tcp_res_cont_action(const char *kw)
+struct action_kw *tcp_res_cont_action(const char *kw)
 {
        return action_lookup(&tcp_res_cont_keywords, kw);
 }