]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: sample: systematically pass the keyword pointer to the keyword
authorWilly Tarreau <w@1wt.eu>
Mon, 22 Jul 2013 14:29:32 +0000 (16:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Aug 2013 19:17:13 +0000 (21:17 +0200)
We're having a lot of duplicate code just because of minor variants between
fetch functions that could be dealt with if the functions had the pointer to
the original keyword, so let's pass it as the last argument. An earlier
version used to pass a pointer to the sample_fetch element, but this is not
the best solution for two reasons :
  - fetch functions will solely rely on the keyword string
  - some other smp_fetch_* users do not have the pointer to the original
    keyword and were forced to pass NULL.

So finally we're passing a pointer to the keyword as a const char *, which
perfectly fits the original purpose.

13 files changed:
include/proto/payload.h
include/types/sample.h
src/acl.c
src/backend.c
src/compression.c
src/frontend.c
src/listener.c
src/payload.c
src/proto_http.c
src/proto_tcp.c
src/sample.c
src/session.c
src/ssl_sock.c

index 338ebc60d06515198f285652f4b4ac05939f9ced..5e0147b348c2aba1a4d5327162f7e594577589c4 100644 (file)
@@ -28,7 +28,7 @@
 #include <types/sample.h>
 #include <types/session.h>
 
-int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp);
+int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw);
 
 #endif /* _PROTO_PROTO_PAYLOAD_H */
 
index 9821dbcf98f90ff3ea378c332a1904b438144fc8..3dfaec960fce3e0b65d07a95911af0cb2fa8cc16 100644 (file)
@@ -263,7 +263,8 @@ struct sample_fetch {
                       void *l7,
                       unsigned int opt,          /* fetch options (SMP_OPT_*) */
                       const struct arg *arg_p,
-                      struct sample *smp);       /* fetch processing function */
+                      struct sample *smp,
+                      const char *kw);           /* fetch processing function */
        unsigned int arg_mask;                    /* arguments (ARG*()) */
        int (*val_args)(struct arg *arg_p,
                        char **err_msg);          /* argument validation function */
index b069d39c855aab513eabc5e795f441e5fdfdf11e..d9475916e6e833f9bd514250cf7f619cfbfe8783 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -1743,7 +1743,7 @@ int acl_exec_cond(struct acl_cond *cond, struct proxy *px, struct session *l4, v
                                /* we need to reset context and flags */
                                memset(&smp, 0, sizeof(smp));
                        fetch_next:
-                               if (!expr->smp->process(px, l4, l7, opt, expr->args, &smp)) {
+                               if (!expr->smp->process(px, l4, l7, opt, expr->args, &smp, expr->smp->kw)) {
                                        /* maybe we could not fetch because of missing data */
                                        if (smp.flags & SMP_F_MAY_CHANGE && !(opt & SMP_OPT_FINAL))
                                                acl_res |= ACL_PAT_MISS;
index d677ab2a51393504dd4d3912747e7a4225cb041c..ae3e2b1c2efdcaa3e670d27afdddfe2b749d0e77 100644 (file)
@@ -424,7 +424,7 @@ struct server *get_server_rch(struct session *s)
 
        b_rew(s->req->buf, rewind = s->req->buf->o);
 
-       ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp);
+       ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp, NULL);
        len = smp.data.str.len;
 
        b_adv(s->req->buf, rewind);
@@ -1132,7 +1132,7 @@ int tcp_persist_rdp_cookie(struct session *s, struct channel *req, int an_bit)
        args[0].data.str.len = s->be->rdp_cookie_len;
        args[1].type = ARGT_STOP;
 
-       ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp);
+       ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp, NULL);
        if (ret == 0 || (smp.flags & SMP_F_MAY_CHANGE) || smp.data.str.len == 0)
                goto no_cookie;
 
@@ -1379,7 +1379,7 @@ int backend_parse_balance(const char **args, char **err, struct proxy *curproxy)
  */
 static int
 smp_fetch_nbsrv(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -1402,7 +1402,7 @@ smp_fetch_nbsrv(struct proxy *px, struct session *l4, void *l7, unsigned int opt
  */
 static int
 smp_fetch_srv_is_up(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
        struct server *srv = args->data.srv;
 
@@ -1422,7 +1422,7 @@ smp_fetch_srv_is_up(struct proxy *px, struct session *l4, void *l7, unsigned int
  */
 static int
 smp_fetch_connslots(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
        struct server *iterator;
 
@@ -1450,7 +1450,7 @@ smp_fetch_connslots(struct proxy *px, struct session *l4, void *l7, unsigned int
 /* set temp integer to the id of the backend */
 static int
 smp_fetch_be_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TXN;
        smp->type = SMP_T_UINT;
@@ -1461,7 +1461,7 @@ smp_fetch_be_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt
 /* set temp integer to the id of the server */
 static int
 smp_fetch_srv_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!objt_server(l4->target))
                return 0;
@@ -1478,7 +1478,7 @@ smp_fetch_srv_id(struct proxy *px, struct session *l4, void *l7, unsigned int op
  */
 static int
 smp_fetch_be_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -1492,7 +1492,7 @@ smp_fetch_be_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_be_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                  const struct arg *args, struct sample *smp)
+                  const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -1506,7 +1506,7 @@ smp_fetch_be_conn(struct proxy *px, struct session *l4, void *l7, unsigned int o
  */
 static int
 smp_fetch_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -1524,7 +1524,7 @@ smp_fetch_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned in
  */
 static int
 smp_fetch_avg_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        int nbsrv;
 
@@ -1553,7 +1553,7 @@ smp_fetch_avg_queue_size(struct proxy *px, struct session *l4, void *l7, unsigne
  */
 static int
 smp_fetch_srv_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                   const struct arg *args, struct sample *smp)
+                   const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -1567,7 +1567,7 @@ smp_fetch_srv_conn(struct proxy *px, struct session *l4, void *l7, unsigned int
  */
 static int
 smp_fetch_srv_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
index 24900610940129d634eb5942c4be718bdefb7c29..27ba4b4b0aa32e0d75abf8cd4d04f3f1ad2ab42d 100644 (file)
@@ -613,7 +613,7 @@ int deflate_end(struct comp_ctx **comp_ctx)
 /* boolean, returns true if compression is used (either gzip or deflate) in the response */
 static int
 smp_fetch_res_comp(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_BOOL;
        smp->data.uint = (l4->comp_algo != NULL);
@@ -623,7 +623,7 @@ smp_fetch_res_comp(struct proxy *px, struct session *l4, void *l7, unsigned int
 /* string, returns algo */
 static int
 smp_fetch_res_comp_algo(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->comp_algo)
                return 0;
index 58236ba433da0d01523a9613ce6dc6e5284ae656..1048052140e79232d65f5dc844651174b3a23ac2 100644 (file)
@@ -216,7 +216,7 @@ int frontend_accept(struct session *s)
 /* set temp integer to the id of the frontend */
 static int
 smp_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_SESS;
        smp->type = SMP_T_UINT;
@@ -230,7 +230,7 @@ smp_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt
  */
 static int
 smp_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -244,7 +244,7 @@ smp_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_fe_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                  const struct arg *args, struct sample *smp)
+                  const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
index ce8b4f2bed011147a6d55c6cdb31f05c82cae5ec..afd6ae2250c238e9fee8b4e5753070469660803f 100644 (file)
@@ -488,7 +488,7 @@ void bind_dump_kws(char **out)
 /* set temp integer to the number of connexions to the same listening socket */
 static int
 smp_fetch_dconn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_UINT;
        smp->data.uint = l4->listener->nbconn;
@@ -498,7 +498,7 @@ smp_fetch_dconn(struct proxy *px, struct session *l4, void *l7, unsigned int opt
 /* set temp integer to the id of the socket (listener) */
 static int
 smp_fetch_so_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_UINT;
        smp->data.uint = l4->listener->luid;
index bc54e114a7a4fef3ba54247aa68ea7105c2f8c10..d5f95a46c4f298ec8a3de1454b3fcfcd8baad07d 100644 (file)
@@ -29,7 +29,7 @@
  */
 static int
 smp_fetch_wait_end(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                   const struct arg *args, struct sample *smp)
+                   const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!(opt & SMP_OPT_FINAL)) {
                smp->flags |= SMP_F_MAY_CHANGE;
@@ -43,7 +43,7 @@ smp_fetch_wait_end(struct proxy *px, struct session *s, void *l7, unsigned int o
 /* return the number of bytes in the request buffer */
 static int
 smp_fetch_req_len(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                  const struct arg *args, struct sample *smp)
+                  const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!s || !s->req)
                return 0;
@@ -57,7 +57,7 @@ smp_fetch_req_len(struct proxy *px, struct session *s, void *l7, unsigned int op
 /* returns the type of SSL hello message (mainly used to detect an SSL hello) */
 static int
 smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        int hs_len;
        int hs_type, bleft;
@@ -126,7 +126,7 @@ smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned
  */
 static int
 smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                      const struct arg *args, struct sample *smp)
+                      const struct arg *args, struct sample *smp, const char *kw)
 {
        int version, bleft, msg_len;
        const unsigned char *data;
@@ -262,7 +262,7 @@ smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned in
  */
 static int
 smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        int hs_len, ext_len, bleft;
        struct channel *chn;
@@ -401,7 +401,7 @@ smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned
  */
 int
 smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        int bleft;
        const unsigned char *data;
@@ -490,11 +490,11 @@ smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int
 /* returns either 1 or 0 depending on whether an RDP cookie is found or not */
 static int
 smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        int ret;
 
-       ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp);
+       ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw);
 
        if (smp->flags & SMP_F_MAY_CHANGE)
                return 0;
@@ -508,7 +508,7 @@ smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *s, void *l7, unsigned
 /* extracts part of a payload with offset and length at a given position */
 static int
 smp_fetch_payload_lv(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                     const struct arg *arg_p, struct sample *smp)
+                     const struct arg *arg_p, struct sample *smp, const char *kw)
 {
        unsigned int len_offset = arg_p[0].data.uint;
        unsigned int len_size = arg_p[1].data.uint;
@@ -566,7 +566,7 @@ smp_fetch_payload_lv(struct proxy *px, struct session *s, void *l7, unsigned int
 /* extracts some payload at a fixed position and length */
 static int
 smp_fetch_payload(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                  const struct arg *arg_p, struct sample *smp)
+                  const struct arg *arg_p, struct sample *smp, const char *kw)
 {
        unsigned int buf_offset = arg_p[0].data.uint;
        unsigned int buf_size = arg_p[1].data.uint;
index ebb7556a9805a4f97e6eb904edae553fb0d8c2f9..3ef64728bcbb28e44395a170f536de8fc31dcb5f 100644 (file)
@@ -9029,7 +9029,7 @@ static int acl_parse_meth(const char **text, struct acl_pattern *pattern, int *o
  */
 static int
 smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-               const struct arg *args, struct sample *smp)
+               const struct arg *args, struct sample *smp, const char *kw)
 {
        int meth;
        struct http_txn *txn = l7;
@@ -9081,7 +9081,7 @@ static int acl_match_meth(struct sample *smp, struct acl_pattern *pattern)
 
 static int
 smp_fetch_rqver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        char *ptr;
@@ -9106,7 +9106,7 @@ smp_fetch_rqver(struct proxy *px, struct session *l4, void *l7, unsigned int opt
 
 static int
 smp_fetch_stver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        char *ptr;
@@ -9135,7 +9135,7 @@ smp_fetch_stver(struct proxy *px, struct session *l4, void *l7, unsigned int opt
 /* 3. Check on Status Code. We manipulate integers here. */
 static int
 smp_fetch_stcode(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        char *ptr;
@@ -9158,7 +9158,7 @@ smp_fetch_stcode(struct proxy *px, struct session *l4, void *l7, unsigned int op
 /* 4. Check on URL/URI. A pointer to the URI is stored. */
 static int
 smp_fetch_url(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-              const struct arg *args, struct sample *smp)
+              const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
 
@@ -9173,7 +9173,7 @@ smp_fetch_url(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
 
 static int
 smp_fetch_url_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
 
@@ -9199,7 +9199,7 @@ smp_fetch_url_ip(struct proxy *px, struct session *l4, void *l7, unsigned int op
 
 static int
 smp_fetch_url_port(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                   const struct arg *args, struct sample *smp)
+                   const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
 
@@ -9226,7 +9226,7 @@ smp_fetch_url_port(struct proxy *px, struct session *l4, void *l7, unsigned int
  */
 static int
 smp_fetch_fhdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-               const struct arg *args, struct sample *smp)
+               const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_idx *idx = &txn->hdr_idx;
@@ -9282,7 +9282,7 @@ smp_fetch_fhdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
  */
 static int
 smp_fetch_fhdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                  const struct arg *args, struct sample *smp)
+                  const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_idx *idx = &txn->hdr_idx;
@@ -9314,7 +9314,7 @@ smp_fetch_fhdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int
  */
 static int
 smp_fetch_hdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-              const struct arg *args, struct sample *smp)
+              const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_idx *idx = &txn->hdr_idx;
@@ -9369,7 +9369,7 @@ smp_fetch_hdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
  */
 static int
 smp_fetch_hdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                  const struct arg *args, struct sample *smp)
+                  const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_idx *idx = &txn->hdr_idx;
@@ -9400,9 +9400,9 @@ smp_fetch_hdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int o
  */
 static int
 smp_fetch_hdr_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                  const struct arg *args, struct sample *smp)
+                  const struct arg *args, struct sample *smp, const char *kw)
 {
-       int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp);
+       int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw);
 
        if (ret > 0) {
                smp->type = SMP_T_UINT;
@@ -9418,11 +9418,11 @@ smp_fetch_hdr_val(struct proxy *px, struct session *l4, void *l7, unsigned int o
  */
 static int
 smp_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        int ret;
 
-       while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp)) > 0) {
+       while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw)) > 0) {
                if (url2ipv4((char *)smp->data.str.str, &smp->data.ipv4)) {
                        smp->type = SMP_T_IPV4;
                        break;
@@ -9450,7 +9450,7 @@ smp_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, unsigned int op
  */
 static int
 smp_fetch_path(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-               const struct arg *args, struct sample *smp)
+               const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        char *ptr, *end;
@@ -9482,7 +9482,7 @@ smp_fetch_path(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
  */
 static int
 smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-               const struct arg *args, struct sample *smp)
+               const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        char *ptr, *end, *beg;
@@ -9493,7 +9493,7 @@ smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
        ctx.idx = 0;
        if (!http_find_header2("Host", 4, txn->req.chn->buf->p + txn->req.sol, &txn->hdr_idx, &ctx) ||
            !ctx.vlen)
-               return smp_fetch_path(px, l4, l7, opt, args, smp);
+               return smp_fetch_path(px, l4, l7, opt, args, smp, kw);
 
        /* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */
        memcpy(trash.str, ctx.line + ctx.val, ctx.vlen);
@@ -9528,7 +9528,7 @@ smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
  */
 static int
 smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_ctx ctx;
@@ -9576,11 +9576,11 @@ smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int op
  */
 static int
 smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        struct chunk *temp;
 
-       if (!smp_fetch_base32(px, l4, l7, opt, args, smp))
+       if (!smp_fetch_base32(px, l4, l7, opt, args, smp, kw))
                return 0;
 
        temp = get_trash_chunk();
@@ -9607,7 +9607,7 @@ smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned in
 
 static int
 smp_fetch_proto_http(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        /* Note: hdr_idx.v cannot be NULL in this ACL because the ACL is tagged
         * as a layer7 ACL, which involves automatic allocation of hdr_idx.
@@ -9623,7 +9623,7 @@ smp_fetch_proto_http(struct proxy *px, struct session *l4, void *l7, unsigned in
 /* return a valid test if the current request is the first one on the connection */
 static int
 smp_fetch_http_first_req(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!s)
                return 0;
@@ -9636,7 +9636,7 @@ smp_fetch_http_first_req(struct proxy *px, struct session *s, void *l7, unsigned
 /* Accepts exactly 1 argument of type userlist */
 static int
 smp_fetch_http_auth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
 
        if (!args || args->type != ARGT_USR)
@@ -9655,7 +9655,7 @@ smp_fetch_http_auth(struct proxy *px, struct session *l4, void *l7, unsigned int
 /* Accepts exactly 1 argument of type userlist */
 static int
 smp_fetch_http_auth_grp(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
 
        if (!args || args->type != ARGT_USR)
@@ -9789,7 +9789,7 @@ extract_cookie_value(char *hdr, const char *hdr_end,
  */
 static int
 smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_idx *idx = &txn->hdr_idx;
@@ -9887,7 +9887,7 @@ smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int op
  */
 static int
 smp_fetch_cookie_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        struct http_txn *txn = l7;
        struct hdr_idx *idx = &txn->hdr_idx;
@@ -9952,9 +9952,9 @@ smp_fetch_cookie_cnt(struct proxy *px, struct session *l4, void *l7, unsigned in
  */
 static int
 smp_fetch_cookie_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
-       int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp);
+       int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp, kw);
 
        if (ret > 0) {
                smp->type = SMP_T_UINT;
@@ -10057,7 +10057,7 @@ find_url_param_value(char* path, size_t path_l,
 
 static int
 smp_fetch_url_param(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
        char delim = '?';
        struct http_txn *txn = l7;
@@ -10088,9 +10088,9 @@ smp_fetch_url_param(struct proxy *px, struct session *l4, void *l7, unsigned int
  */
 static int
 smp_fetch_url_param_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
-       int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp);
+       int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp, kw);
 
        if (ret > 0) {
                smp->type = SMP_T_UINT;
index 4357b0407f1c3da833984aa08601a5dcd85c7c6a..fe4a0d2b57fd19135e07d6670e31a19bf7b57f3e 100644 (file)
@@ -1539,7 +1539,7 @@ static int tcp_parse_tcp_req(char **args, int section_type, struct proxy *curpx,
 /* fetch the connection's source IPv4/IPv6 address */
 static int
 smp_fetch_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-              const struct arg *args, struct sample *smp)
+              const struct arg *args, struct sample *smp, const char *kw)
 {
        switch (l4->si[0].conn->addr.from.ss_family) {
        case AF_INET:
@@ -1561,7 +1561,7 @@ smp_fetch_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
 /* set temp integer to the connection's source port */
 static int
 smp_fetch_sport(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_UINT;
        if (!(smp->data.uint = get_host_port(&l4->si[0].conn->addr.from)))
@@ -1574,7 +1574,7 @@ smp_fetch_sport(struct proxy *px, struct session *l4, void *l7, unsigned int opt
 /* fetch the connection's destination IPv4/IPv6 address */
 static int
 smp_fetch_dst(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-              const struct arg *args, struct sample *smp)
+              const struct arg *args, struct sample *smp, const char *kw)
 {
        conn_get_to_addr(l4->si[0].conn);
 
@@ -1598,7 +1598,7 @@ smp_fetch_dst(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
 /* set temp integer to the frontend connexion's destination port */
 static int
 smp_fetch_dport(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        conn_get_to_addr(l4->si[0].conn);
 
index f8fa717cdd05e58c6eed307c600196582463323b..1a2ab478a7e2a96a7bdbfb257d26376392a29e50 100644 (file)
@@ -775,7 +775,7 @@ struct sample *sample_process(struct proxy *px, struct session *l4, void *l7,
                p->flags = 0;
        }
 
-       if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p))
+       if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p, expr->fetch->kw))
                return NULL;
 
        if ((p->flags & SMP_F_MAY_CHANGE) && !(opt & SMP_OPT_FINAL))
@@ -1088,7 +1088,7 @@ static int sample_conv_ipmask(const struct arg *arg_p, struct sample *smp)
 /* force TRUE to be returned at the fetch level */
 static int
 smp_fetch_true(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-               const struct arg *args, struct sample *smp)
+               const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_BOOL;
        smp->data.uint = 1;
@@ -1098,7 +1098,7 @@ smp_fetch_true(struct proxy *px, struct session *s, void *l7, unsigned int opt,
 /* force FALSE to be returned at the fetch level */
 static int
 smp_fetch_false(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-                const struct arg *args, struct sample *smp)
+                const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_BOOL;
        smp->data.uint = 0;
@@ -1108,7 +1108,7 @@ smp_fetch_false(struct proxy *px, struct session *s, void *l7, unsigned int opt,
 /* retrieve environment variable $1 as a string */
 static int
 smp_fetch_env(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-              const struct arg *args, struct sample *smp)
+              const struct arg *args, struct sample *smp, const char *kw)
 {
        char *env;
 
@@ -1130,7 +1130,7 @@ smp_fetch_env(struct proxy *px, struct session *s, void *l7, unsigned int opt,
  */
 static int
 smp_fetch_date(struct proxy *px, struct session *s, void *l7, unsigned int opt,
-               const struct arg *args, struct sample *smp)
+               const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->data.uint = date.tv_sec;
 
index 0a6b130252da7faff5368da330d40416b2c7629a..2fc2dcb4925e7e25249095187f2b208161a8f31e 100644 (file)
@@ -2581,7 +2581,7 @@ void session_shutdown(struct session *session, int why)
 /* set return a boolean indicating if sc0 is currently being tracked or not */
 static int
 smp_fetch_sc0_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                      const struct arg *args, struct sample *smp)
+                      const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_BOOL;
@@ -2592,7 +2592,7 @@ smp_fetch_sc0_tracked(struct proxy *px, struct session *l4, void *l7, unsigned i
 /* set return a boolean indicating if sc1 is currently being tracked or not */
 static int
 smp_fetch_sc1_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                      const struct arg *args, struct sample *smp)
+                      const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_BOOL;
@@ -2603,7 +2603,7 @@ smp_fetch_sc1_tracked(struct proxy *px, struct session *l4, void *l7, unsigned i
 /* set return a boolean indicating if sc2 is currently being tracked or not */
 static int
 smp_fetch_sc2_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                      const struct arg *args, struct sample *smp)
+                      const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_BOOL;
@@ -2632,7 +2632,7 @@ smp_fetch_get_gpc0(struct stktable *table, struct sample *smp, struct stksess *t
  */
 static int
 smp_fetch_sc0_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -2644,7 +2644,7 @@ smp_fetch_sc0_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -2656,7 +2656,7 @@ smp_fetch_sc1_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -2669,7 +2669,7 @@ smp_fetch_sc2_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -2703,7 +2703,7 @@ smp_fetch_gpc0_rate(struct stktable *table, struct sample *smp, struct stksess *
  */
 static int
 smp_fetch_sc0_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -2715,7 +2715,7 @@ smp_fetch_sc0_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -2727,7 +2727,7 @@ smp_fetch_sc1_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -2740,7 +2740,7 @@ smp_fetch_sc2_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -2787,7 +2787,7 @@ smp_fetch_inc_gpc0(struct stktable *table, struct sample *smp, struct stksess *t
  */
 static int
 smp_fetch_sc0_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -2799,7 +2799,7 @@ smp_fetch_sc0_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -2811,7 +2811,7 @@ smp_fetch_sc1_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -2824,7 +2824,7 @@ smp_fetch_sc2_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -2860,7 +2860,7 @@ smp_fetch_clr_gpc0(struct stktable *table, struct sample *smp, struct stksess *t
  */
 static int
 smp_fetch_sc0_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -2872,7 +2872,7 @@ smp_fetch_sc0_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -2884,7 +2884,7 @@ smp_fetch_sc1_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -2897,7 +2897,7 @@ smp_fetch_sc2_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -2928,7 +2928,7 @@ smp_fetch_conn_cnt(struct stktable *table, struct sample *smp, struct stksess *t
 /* set temp integer to the cumulated number of connections from the session's tracked FE counters */
 static int
 smp_fetch_sc0_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -2939,7 +2939,7 @@ smp_fetch_sc0_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the cumulated number of connections from the session's tracked BE counters */
 static int
 smp_fetch_sc1_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -2950,7 +2950,7 @@ smp_fetch_sc1_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the cumulated number of connections from the session's tracked BE counters */
 static int
 smp_fetch_sc2_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -2964,7 +2964,7 @@ smp_fetch_sc2_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -2998,7 +2998,7 @@ smp_fetch_conn_rate(struct stktable *table, struct sample *smp, struct stksess *
  */
 static int
 smp_fetch_sc0_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3011,7 +3011,7 @@ smp_fetch_sc0_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3024,7 +3024,7 @@ smp_fetch_sc1_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3038,7 +3038,7 @@ smp_fetch_sc2_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3056,7 +3056,7 @@ smp_fetch_src_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_updt_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stksess *ts;
        struct stktable_key *key;
@@ -3102,7 +3102,7 @@ smp_fetch_conn_cur(struct stktable *table, struct sample *smp, struct stksess *t
 /* set temp integer to the number of concurrent connections from the session's tracked FE counters */
 static int
 smp_fetch_sc0_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3113,7 +3113,7 @@ smp_fetch_sc0_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the number of concurrent connections from the session's tracked BE counters */
 static int
 smp_fetch_sc1_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3124,7 +3124,7 @@ smp_fetch_sc1_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the number of concurrent connections from the session's tracked BE counters */
 static int
 smp_fetch_sc2_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3138,7 +3138,7 @@ smp_fetch_sc2_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3169,7 +3169,7 @@ smp_fetch_sess_cnt(struct stktable *table, struct sample *smp, struct stksess *t
 /* set temp integer to the cumulated number of sessions from the session's tracked FE counters */
 static int
 smp_fetch_sc0_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3180,7 +3180,7 @@ smp_fetch_sc0_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
 static int
 smp_fetch_sc1_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3191,7 +3191,7 @@ smp_fetch_sc1_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
 static int
 smp_fetch_sc2_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3205,7 +3205,7 @@ smp_fetch_sc2_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3239,7 +3239,7 @@ smp_fetch_sess_rate(struct stktable *table, struct sample *smp, struct stksess *
  */
 static int
 smp_fetch_sc0_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3252,7 +3252,7 @@ smp_fetch_sc0_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3265,7 +3265,7 @@ smp_fetch_sc1_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3279,7 +3279,7 @@ smp_fetch_sc2_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3310,7 +3310,7 @@ smp_fetch_http_req_cnt(struct stktable *table, struct sample *smp, struct stkses
 /* set temp integer to the cumulated number of sessions from the session's tracked FE counters */
 static int
 smp_fetch_sc0_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3321,7 +3321,7 @@ smp_fetch_sc0_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsig
 /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
 static int
 smp_fetch_sc1_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3332,7 +3332,7 @@ smp_fetch_sc1_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsig
 /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
 static int
 smp_fetch_sc2_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3346,7 +3346,7 @@ smp_fetch_sc2_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsig
  */
 static int
 smp_fetch_src_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3380,7 +3380,7 @@ smp_fetch_http_req_rate(struct stktable *table, struct sample *smp, struct stkse
  */
 static int
 smp_fetch_sc0_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3393,7 +3393,7 @@ smp_fetch_sc0_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_sc1_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3406,7 +3406,7 @@ smp_fetch_sc1_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_sc2_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3420,7 +3420,7 @@ smp_fetch_sc2_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_src_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3451,7 +3451,7 @@ smp_fetch_http_err_cnt(struct stktable *table, struct sample *smp, struct stkses
 /* set temp integer to the cumulated number of sessions from the session's tracked FE counters */
 static int
 smp_fetch_sc0_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3462,7 +3462,7 @@ smp_fetch_sc0_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsig
 /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
 static int
 smp_fetch_sc1_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3473,7 +3473,7 @@ smp_fetch_sc1_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsig
 /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
 static int
 smp_fetch_sc2_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3487,7 +3487,7 @@ smp_fetch_sc2_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsig
  */
 static int
 smp_fetch_src_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3521,7 +3521,7 @@ smp_fetch_http_err_rate(struct stktable *table, struct sample *smp, struct stkse
  */
 static int
 smp_fetch_sc0_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3534,7 +3534,7 @@ smp_fetch_sc0_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_sc1_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3547,7 +3547,7 @@ smp_fetch_sc1_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_sc2_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3561,7 +3561,7 @@ smp_fetch_sc2_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_src_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3595,7 +3595,7 @@ smp_fetch_kbytes_in(struct stktable *table, struct sample *smp, struct stksess *
  */
 static int
 smp_fetch_sc0_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3608,7 +3608,7 @@ smp_fetch_sc0_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc1_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3621,7 +3621,7 @@ smp_fetch_sc1_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_sc2_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3635,7 +3635,7 @@ smp_fetch_sc2_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_src_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3671,7 +3671,7 @@ smp_fetch_bytes_in_rate(struct stktable *table, struct sample *smp, struct stkse
  */
 static int
 smp_fetch_sc0_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3684,7 +3684,7 @@ smp_fetch_sc0_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_sc1_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3697,7 +3697,7 @@ smp_fetch_sc1_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_sc2_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3711,7 +3711,7 @@ smp_fetch_sc2_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsi
  */
 static int
 smp_fetch_src_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3745,7 +3745,7 @@ smp_fetch_kbytes_out(struct stktable *table, struct sample *smp, struct stksess
  */
 static int
 smp_fetch_sc0_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3758,7 +3758,7 @@ smp_fetch_sc0_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigne
  */
 static int
 smp_fetch_sc1_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3771,7 +3771,7 @@ smp_fetch_sc1_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigne
  */
 static int
 smp_fetch_sc2_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3785,7 +3785,7 @@ smp_fetch_sc2_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigne
  */
 static int
 smp_fetch_src_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3821,7 +3821,7 @@ smp_fetch_bytes_out_rate(struct stktable *table, struct sample *smp, struct stks
  */
 static int
 smp_fetch_sc0_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3834,7 +3834,7 @@ smp_fetch_sc0_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns
  */
 static int
 smp_fetch_sc1_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3847,7 +3847,7 @@ smp_fetch_sc1_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns
  */
 static int
 smp_fetch_sc2_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3861,7 +3861,7 @@ smp_fetch_sc2_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns
  */
 static int
 smp_fetch_src_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        struct stktable_key *key;
 
@@ -3876,7 +3876,7 @@ smp_fetch_src_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns
 /* set temp integer to the number of active trackers on the SC0 entry */
 static int
 smp_fetch_sc0_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[0].entry)
                return 0;
@@ -3887,7 +3887,7 @@ smp_fetch_sc0_trackers(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the number of active trackers on the SC0 entry */
 static int
 smp_fetch_sc1_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[1].entry)
                return 0;
@@ -3898,7 +3898,7 @@ smp_fetch_sc1_trackers(struct proxy *px, struct session *l4, void *l7, unsigned
 /* set temp integer to the number of active trackers on the SC0 entry */
 static int
 smp_fetch_sc2_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4->stkctr[2].entry)
                return 0;
@@ -3911,7 +3911,7 @@ smp_fetch_sc2_trackers(struct proxy *px, struct session *l4, void *l7, unsigned
  */
 static int
 smp_fetch_table_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = SMP_F_VOL_TEST;
        smp->type = SMP_T_UINT;
@@ -3924,7 +3924,7 @@ smp_fetch_table_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int
  */
 static int
 smp_fetch_table_avl(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
        px = args->data.prx;
        smp->flags = SMP_F_VOL_TEST;
index 5d245cf999559e7a93daf2d4626813886abcee82..ce1712d4f28ae98c46c108ca75523e7b1081fc2f 100644 (file)
@@ -1573,7 +1573,7 @@ ssl_sock_get_dn_oneline(X509_NAME *a, struct chunk *out)
 /* boolean, returns true if client cert was present */
 static int
 smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
                return 0;
@@ -1593,7 +1593,7 @@ smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *l4, void *l7, unsigne
 /* bin, returns serial in a binary chunk */
 static int
 smp_fetch_ssl_c_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        int ret = 0;
@@ -1628,7 +1628,7 @@ out:
 /* bin, returns the client certificate's SHA-1 fingerprint (SHA-1 hash of DER-encoded certificate) in a binary chunk */
 static int
 smp_fetch_ssl_c_sha1(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        const EVP_MD *digest;
@@ -1664,7 +1664,7 @@ out:
 /*str, returns notafter date in ASN1_UTCTIME format */
 static int
 smp_fetch_ssl_c_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        int ret = 0;
@@ -1699,7 +1699,7 @@ out:
 /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
 static int
 smp_fetch_ssl_c_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        X509_NAME *name;
@@ -1750,7 +1750,7 @@ out:
 /*str, returns notbefore date in ASN1_UTCTIME format */
 static int
 smp_fetch_ssl_c_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        int ret = 0;
@@ -1785,7 +1785,7 @@ out:
 /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
 static int
 smp_fetch_ssl_c_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        X509_NAME *name;
@@ -1836,7 +1836,7 @@ out:
 /* integer, returns true if current session use a client certificate */
 static int
 smp_fetch_ssl_c_used(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
 
@@ -1862,7 +1862,7 @@ smp_fetch_ssl_c_used(struct proxy *px, struct session *l4, void *l7, unsigned in
 /* integer, returns the client certificate version */
 static int
 smp_fetch_ssl_c_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
 
@@ -1889,7 +1889,7 @@ smp_fetch_ssl_c_version(struct proxy *px, struct session *l4, void *l7, unsigned
 /* str, returns the client certificate sig alg */
 static int
 smp_fetch_ssl_c_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
        int nid;
@@ -1923,7 +1923,7 @@ smp_fetch_ssl_c_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned
 /* str, returns the client certificate key alg */
 static int
 smp_fetch_ssl_c_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
        int nid;
@@ -1957,7 +1957,7 @@ smp_fetch_ssl_c_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned
 /* boolean, returns true if front conn. transport layer is SSL */
 static int
 smp_fetch_ssl_fc(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                 const struct arg *args, struct sample *smp)
+                 const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->type = SMP_T_BOOL;
        smp->data.uint = (l4->si[0].conn->xprt == &ssl_sock);
@@ -1967,7 +1967,7 @@ smp_fetch_ssl_fc(struct proxy *px, struct session *l4, void *l7, unsigned int op
 /* boolean, returns true if client present a SNI */
 static int
 smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                         const struct arg *args, struct sample *smp)
+                         const struct arg *args, struct sample *smp, const char *kw)
 {
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
        smp->type = SMP_T_BOOL;
@@ -1983,7 +1983,7 @@ smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *l4, void *l7, unsigne
 /* bin, returns serial in a binary chunk */
 static int
 smp_fetch_ssl_f_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        int ret = 0;
@@ -2014,7 +2014,7 @@ out:
 /*str, returns notafter date in ASN1_UTCTIME format */
 static int
 smp_fetch_ssl_f_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        int ret = 0;
@@ -2046,7 +2046,7 @@ out:
 /*str, returns notbefore date in ASN1_UTCTIME format */
 static int
 smp_fetch_ssl_f_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        int ret = 0;
@@ -2078,7 +2078,7 @@ out:
 /* integer, returns the frontend certificate version */
 static int
 smp_fetch_ssl_f_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                           const struct arg *args, struct sample *smp)
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
 
@@ -2104,7 +2104,7 @@ smp_fetch_ssl_f_version(struct proxy *px, struct session *l4, void *l7, unsigned
 /* str, returns the client certificate sig alg */
 static int
 smp_fetch_ssl_f_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
        int nid;
@@ -2136,7 +2136,7 @@ smp_fetch_ssl_f_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned
 /* str, returns the client certificate key alg */
 static int
 smp_fetch_ssl_f_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt;
        int nid;
@@ -2168,7 +2168,7 @@ smp_fetch_ssl_f_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned
 /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
 static int
 smp_fetch_ssl_f_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        X509_NAME *name;
@@ -2216,7 +2216,7 @@ out:
 /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
 static int
 smp_fetch_ssl_f_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        X509 *crt = NULL;
        X509_NAME *name;
@@ -2263,7 +2263,7 @@ out:
 
 static int
 smp_fetch_ssl_fc_cipher(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                        const struct arg *args, struct sample *smp)
+                        const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = 0;
 
@@ -2282,7 +2282,7 @@ smp_fetch_ssl_fc_cipher(struct proxy *px, struct session *l4, void *l7, unsigned
 
 static int
 smp_fetch_ssl_fc_alg_keysize(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = 0;
 
@@ -2299,7 +2299,7 @@ smp_fetch_ssl_fc_alg_keysize(struct proxy *px, struct session *l4, void *l7, uns
 
 static int
 smp_fetch_ssl_fc_use_keysize(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = 0;
 
@@ -2318,7 +2318,7 @@ smp_fetch_ssl_fc_use_keysize(struct proxy *px, struct session *l4, void *l7, uns
 #ifdef OPENSSL_NPN_NEGOTIATED
 static int
 smp_fetch_ssl_fc_npn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = 0;
        smp->type = SMP_T_CSTR;
@@ -2340,7 +2340,7 @@ smp_fetch_ssl_fc_npn(struct proxy *px, struct session *l4, void *l7, unsigned in
 #ifdef OPENSSL_ALPN_NEGOTIATED
 static int
 smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                      const struct arg *args, struct sample *smp)
+                      const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = 0;
        smp->type = SMP_T_CSTR;
@@ -2361,7 +2361,7 @@ smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *l4, void *l7, unsigned i
 
 static int
 smp_fetch_ssl_fc_protocol(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                          const struct arg *args, struct sample *smp)
+                          const struct arg *args, struct sample *smp, const char *kw)
 {
        smp->flags = 0;
 
@@ -2380,7 +2380,7 @@ smp_fetch_ssl_fc_protocol(struct proxy *px, struct session *l4, void *l7, unsign
 
 static int
 smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp)
+                            const struct arg *args, struct sample *smp, const char *kw)
 {
 #if OPENSSL_VERSION_NUMBER > 0x0090800fL
        SSL_SESSION *sess;
@@ -2407,7 +2407,7 @@ smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *l4, void *l7, unsi
 
 static int
 smp_fetch_ssl_fc_sni(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                     const struct arg *args, struct sample *smp)
+                     const struct arg *args, struct sample *smp, const char *kw)
 {
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
        smp->flags = 0;
@@ -2430,7 +2430,7 @@ smp_fetch_ssl_fc_sni(struct proxy *px, struct session *l4, void *l7, unsigned in
 /* integer, returns the first verify error in CA chain of client certificate chain. */
 static int
 smp_fetch_ssl_c_ca_err(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
                return 0;
@@ -2450,7 +2450,7 @@ smp_fetch_ssl_c_ca_err(struct proxy *px, struct session *l4, void *l7, unsigned
 /* integer, returns the depth of the first verify error in CA chain of client certificate chain. */
 static int
 smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                             const struct arg *args, struct sample *smp)
+                             const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
                return 0;
@@ -2470,7 +2470,7 @@ smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, uns
 /* integer, returns the first verify error on client certificate */
 static int
 smp_fetch_ssl_c_err(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                    const struct arg *args, struct sample *smp)
+                    const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
                return 0;
@@ -2490,7 +2490,7 @@ smp_fetch_ssl_c_err(struct proxy *px, struct session *l4, void *l7, unsigned int
 /* integer, returns the verify result on client cert */
 static int
 smp_fetch_ssl_c_verify(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                       const struct arg *args, struct sample *smp)
+                       const struct arg *args, struct sample *smp, const char *kw)
 {
        if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
                return 0;