MINOR: sample: add private argument to the struct sample_fetch

The add of this private argument is to prepare the integration
of the lua fetchs.
This commit is contained in:
Thierry FOURNIER 2014-12-07 18:37:57 +01:00 committed by Willy Tarreau
parent 68a556e282
commit f41a809dc9
12 changed files with 138 additions and 136 deletions

View File

@ -122,10 +122,10 @@ struct chunk *http_error_message(struct session *s, int msgnum);
struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, struct proxy *curproxy,
const char **args, char **errmsg, int use_fmt);
int smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw);
const struct arg *args, struct sample *smp, const char *kw, void *private);
int
smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw);
const struct arg *args, struct sample *smp, const char *kw, void *private);
enum http_meth_t find_http_meth(const char *str, const int len);

View File

@ -290,13 +290,15 @@ struct sample_fetch {
unsigned int opt, /* fetch options (SMP_OPT_*) */
const struct arg *arg_p,
struct sample *smp,
const char *kw); /* fetch processing function */
const char *kw, /* fetch processing function */
void *private); /* private value. */
unsigned int arg_mask; /* arguments (ARG*()) */
int (*val_args)(struct arg *arg_p,
char **err_msg); /* argument validation function */
unsigned long out_type; /* output sample type */
unsigned int use; /* fetch source (SMP_USE_*) */
unsigned int val; /* fetch validity (SMP_VAL_*) */
void *private; /* private values. only used by Lua */
};
/* sample expression */

View File

@ -1484,7 +1484,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -1507,7 +1507,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct server *srv = args->data.srv;
@ -1527,7 +1527,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct server *iterator;
@ -1555,7 +1555,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TXN;
smp->type = SMP_T_UINT;
@ -1566,7 +1566,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!objt_server(l4->target))
return 0;
@ -1583,7 +1583,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -1597,7 +1597,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -1611,7 +1611,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -1629,7 +1629,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int nbsrv;
@ -1658,7 +1658,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -1672,7 +1672,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;

View File

@ -618,7 +618,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_BOOL;
smp->data.uint = (l4->comp_algo != NULL);
@ -628,7 +628,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!l4->comp_algo)
return 0;

View File

@ -219,7 +219,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_SESS;
smp->type = SMP_T_UINT;
@ -233,7 +233,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -247,7 +247,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;

View File

@ -590,7 +590,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_UINT;
smp->data.uint = l4->listener->nbconn;
@ -600,7 +600,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_UINT;
smp->data.uint = l4->listener->luid;

View File

@ -30,7 +30,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!(opt & SMP_OPT_FINAL)) {
smp->flags |= SMP_F_MAY_CHANGE;
@ -44,7 +44,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_len(struct proxy *px, struct session *s, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct channel *chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? s->rep : s->req;
@ -60,7 +60,7 @@ smp_fetch_len(struct proxy *px, struct session *s, void *l7, unsigned int opt,
/* 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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int hs_len;
int hs_type, bleft;
@ -132,7 +132,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int version, bleft, msg_len;
const unsigned char *data;
@ -268,7 +268,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int hs_len, ext_len, bleft;
struct channel *chn;
@ -501,7 +501,7 @@ fetch_rdp_cookie_name(struct session *s, struct sample *smp, const char *cname,
*/
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)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
return fetch_rdp_cookie_name(s, smp, args ? args->data.str.str : NULL, args ? args->data.str.len : 0);
}
@ -509,11 +509,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret;
ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw);
ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw, private);
if (smp->flags & SMP_F_MAY_CHANGE)
return 0;
@ -527,7 +527,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 char *kw)
const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
{
unsigned int len_offset = arg_p[0].data.uint;
unsigned int len_size = arg_p[1].data.uint;
@ -585,7 +585,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 char *kw)
const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
{
unsigned int buf_offset = arg_p[0].data.uint;
unsigned int buf_size = arg_p[1].data.uint;

View File

@ -9961,7 +9961,7 @@ static int pat_parse_meth(const char *text, struct pattern *pattern, int mflags,
*/
static int
smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int meth;
struct http_txn *txn = l7;
@ -10015,7 +10015,7 @@ static struct pattern *pat_match_meth(struct sample *smp, struct pattern_expr *e
static int
smp_fetch_rqver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
char *ptr;
@ -10040,7 +10040,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
char *ptr;
@ -10069,7 +10069,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
char *ptr;
@ -10092,7 +10092,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
@ -10107,7 +10107,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct sockaddr_storage addr;
@ -10126,7 +10126,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct sockaddr_storage addr;
@ -10152,7 +10152,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -10208,7 +10208,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -10234,7 +10234,7 @@ smp_fetch_fhdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int
static int
smp_fetch_hdr_names(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -10273,7 +10273,7 @@ smp_fetch_hdr_names(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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -10328,7 +10328,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -10359,9 +10359,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw);
int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw, private);
if (ret > 0) {
smp->type = SMP_T_UINT;
@ -10377,11 +10377,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret;
while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw)) > 0) {
while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw, private)) > 0) {
if (url2ipv4((char *)smp->data.str.str, &smp->data.ipv4)) {
smp->type = SMP_T_IPV4;
break;
@ -10409,7 +10409,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
char *ptr, *end;
@ -10442,7 +10442,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
char *ptr, *end, *beg;
@ -10453,7 +10453,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->hdr_idx, &ctx) || !ctx.vlen)
return smp_fetch_path(px, l4, l7, opt, args, smp, kw);
return smp_fetch_path(px, l4, l7, opt, args, smp, kw, private);
/* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */
temp = get_trash_chunk();
@ -10489,7 +10489,7 @@ smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
*/
int
smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_ctx ctx;
@ -10537,7 +10537,7 @@ 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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct connection *cli_conn = objt_conn(l4->si[0].end);
@ -10545,7 +10545,7 @@ smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned in
if (!cli_conn)
return 0;
if (!smp_fetch_base32(px, l4, l7, opt, args, smp, kw))
if (!smp_fetch_base32(px, l4, l7, opt, args, smp, kw, private))
return 0;
temp = get_trash_chunk();
@ -10576,7 +10576,7 @@ smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned in
*/
static int
smp_fetch_query(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
char *ptr, *end;
@ -10601,7 +10601,7 @@ smp_fetch_query(struct proxy *px, struct session *l4, void *l7, unsigned int opt
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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
/* 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.
@ -10617,7 +10617,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!s)
return 0;
@ -10630,7 +10630,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!args || args->type != ARGT_USR)
@ -10649,7 +10649,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!args || args->type != ARGT_USR)
@ -10778,7 +10778,7 @@ extract_cookie_value(char *hdr, const char *hdr_end,
*/
static int
smp_fetch_capture_header_req(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct proxy *fe = l4->fe;
struct http_txn *txn = l7;
@ -10805,7 +10805,7 @@ smp_fetch_capture_header_req(struct proxy *px, struct session *l4, void *l7, uns
*/
static int
smp_fetch_capture_header_res(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct proxy *fe = l4->fe;
struct http_txn *txn = l7;
@ -10830,7 +10830,7 @@ smp_fetch_capture_header_res(struct proxy *px, struct session *l4, void *l7, uns
/* Extracts the METHOD in the HTTP request, the txn->uri should be filled before the call */
static int
smp_fetch_capture_req_method(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct http_txn *txn = l7;
@ -10858,7 +10858,7 @@ smp_fetch_capture_req_method(struct proxy *px, struct session *l4, void *l7, uns
/* Extracts the path in the HTTP request, the txn->uri should be filled before the call */
static int
smp_fetch_capture_req_uri(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct http_txn *txn = l7;
@ -10897,7 +10897,7 @@ smp_fetch_capture_req_uri(struct proxy *px, struct session *l4, void *l7, unsign
*/
static int
smp_fetch_capture_req_ver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
@ -10921,7 +10921,7 @@ smp_fetch_capture_req_ver(struct proxy *px, struct session *l4, void *l7, unsign
*/
static int
smp_fetch_capture_res_ver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
@ -10952,7 +10952,7 @@ smp_fetch_capture_res_ver(struct proxy *px, struct session *l4, void *l7, unsign
* files.
*/
int smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -11051,7 +11051,7 @@ int smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned in
*/
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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
@ -11118,9 +11118,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp, kw);
int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp, kw, private);
if (ret > 0) {
smp->type = SMP_T_UINT;
@ -11223,7 +11223,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
char delim = '?';
struct http_txn *txn = l7;
@ -11254,9 +11254,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp, kw);
int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp, kw, private);
if (ret > 0) {
smp->type = SMP_T_UINT;
@ -11278,7 +11278,7 @@ smp_fetch_url_param_val(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_url32(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = l7;
struct hdr_ctx ctx;
@ -11326,12 +11326,12 @@ smp_fetch_url32(struct proxy *px, struct session *l4, void *l7, unsigned int opt
*/
static int
smp_fetch_url32_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct connection *cli_conn = objt_conn(l4->si[0].end);
if (!smp_fetch_url32(px, l4, l7, opt, args, smp, kw))
if (!smp_fetch_url32(px, l4, l7, opt, args, smp, kw, private))
return 0;
temp = get_trash_chunk();

View File

@ -1825,7 +1825,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *cli_conn = objt_conn(l4->si[0].end);
@ -1852,7 +1852,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 char *kw)
const struct arg *args, struct sample *smp, const char *k, void *private)
{
struct connection *cli_conn = objt_conn(l4->si[0].end);
@ -1870,7 +1870,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *cli_conn = objt_conn(l4->si[0].end);
@ -1899,7 +1899,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *cli_conn = objt_conn(l4->si[0].end);

View File

@ -948,7 +948,7 @@ struct sample *sample_process(struct proxy *px, struct session *l4, void *l7,
memset(p, 0, sizeof(*p));
}
if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p, expr->fetch->kw))
if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p, expr->fetch->kw, expr->fetch->private))
return NULL;
list_for_each_entry(conv_expr, &expr->conv_exprs, list) {
@ -2063,7 +2063,7 @@ static int sample_conv_arith_even(struct session *session, const struct arg *arg
/* 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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_BOOL;
smp->data.uint = 1;
@ -2073,7 +2073,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_BOOL;
smp->data.uint = 0;
@ -2083,7 +2083,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
char *env;
@ -2106,7 +2106,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->data.uint = date.tv_sec;
@ -2122,7 +2122,7 @@ smp_fetch_date(struct proxy *px, struct session *s, void *l7, unsigned int opt,
/* returns the number of processes */
static int
smp_fetch_nbproc(struct proxy *px, struct session *s, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_UINT;
smp->data.uint = global.nbproc;
@ -2132,7 +2132,7 @@ smp_fetch_nbproc(struct proxy *px, struct session *s, void *l7, unsigned int opt
/* returns the number of the current process (between 1 and nbproc */
static int
smp_fetch_proc(struct proxy *px, struct session *s, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_UINT;
smp->data.uint = relative_pid;
@ -2144,7 +2144,7 @@ smp_fetch_proc(struct proxy *px, struct session *s, void *l7, unsigned int opt,
*/
static int
smp_fetch_rand(struct proxy *px, struct session *s, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->data.uint = random();
@ -2160,7 +2160,7 @@ smp_fetch_rand(struct proxy *px, struct session *s, void *l7, unsigned int opt,
/* returns true if the current process is stopping */
static int
smp_fetch_stopping(struct proxy *px, struct session *s, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->type = SMP_T_BOOL;
smp->data.uint = stopping;

View File

@ -2931,7 +2931,7 @@ smp_fetch_sc_stkctr(struct session *l4, const struct arg *args, const char *kw)
*/
static int
smp_fetch_sc_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_BOOL;
@ -2946,7 +2946,7 @@ smp_fetch_sc_tracked(struct proxy *px, struct session *l4, void *l7, unsigned in
*/
static int
smp_fetch_sc_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -2973,7 +2973,7 @@ smp_fetch_sc_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
static int
smp_fetch_sc_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -2999,7 +2999,7 @@ smp_fetch_sc_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_sc_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3036,7 +3036,7 @@ smp_fetch_sc_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
static int
smp_fetch_sc_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3062,7 +3062,7 @@ smp_fetch_sc_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
static int
smp_fetch_sc_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3087,7 +3087,7 @@ smp_fetch_sc_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
static int
smp_fetch_sc_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3113,7 +3113,7 @@ smp_fetch_sc_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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn = objt_conn(l4->si[0].end);
struct stksess *ts;
@ -3149,7 +3149,7 @@ smp_fetch_src_updt_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsi
*/
static int
smp_fetch_sc_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3174,7 +3174,7 @@ smp_fetch_sc_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
static int
smp_fetch_sc_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3198,7 +3198,7 @@ smp_fetch_sc_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
static int
smp_fetch_sc_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3224,7 +3224,7 @@ smp_fetch_sc_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_sc_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3249,7 +3249,7 @@ smp_fetch_sc_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsign
*/
static int
smp_fetch_sc_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3275,7 +3275,7 @@ smp_fetch_sc_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsig
*/
static int
smp_fetch_sc_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3300,7 +3300,7 @@ smp_fetch_sc_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsign
*/
static int
smp_fetch_sc_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3326,7 +3326,7 @@ smp_fetch_sc_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsig
*/
static int
smp_fetch_sc_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3351,7 +3351,7 @@ smp_fetch_sc_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_sc_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3377,7 +3377,7 @@ smp_fetch_sc_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsig
*/
static int
smp_fetch_sc_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3402,7 +3402,7 @@ smp_fetch_sc_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_sc_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3427,7 +3427,7 @@ smp_fetch_sc_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsi
*/
static int
smp_fetch_sc_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
@ -3445,7 +3445,7 @@ smp_fetch_sc_trackers(struct proxy *px, struct session *l4, void *l7, unsigned i
*/
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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@ -3458,7 +3458,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
px = args->data.prx;
smp->flags = SMP_F_VOL_TEST;

View File

@ -2937,7 +2937,7 @@ unsigned int ssl_sock_get_verify_result(struct connection *conn)
/* 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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;
@ -2966,7 +2966,7 @@ smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *l4, void *l7, unsigne
*/
static int
smp_fetch_ssl_x_der(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3014,7 +3014,7 @@ smp_fetch_ssl_x_der(struct proxy *px, struct session *l4, void *l7, unsigned int
*/
static int
smp_fetch_ssl_x_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3062,7 +3062,7 @@ smp_fetch_ssl_x_serial(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_ssl_x_sha1(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3110,7 +3110,7 @@ smp_fetch_ssl_x_sha1(struct proxy *px, struct session *l4, void *l7, unsigned in
*/
static int
smp_fetch_ssl_x_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3157,7 +3157,7 @@ smp_fetch_ssl_x_notafter(struct proxy *px, struct session *l4, void *l7, unsigne
*/
static int
smp_fetch_ssl_x_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3220,7 +3220,7 @@ smp_fetch_ssl_x_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned in
*/
static int
smp_fetch_ssl_x_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3267,7 +3267,7 @@ smp_fetch_ssl_x_notbefore(struct proxy *px, struct session *l4, void *l7, unsign
*/
static int
smp_fetch_ssl_x_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt = NULL;
@ -3327,7 +3327,7 @@ smp_fetch_ssl_x_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned in
/* 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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
X509 *crt;
struct connection *conn;
@ -3361,7 +3361,7 @@ smp_fetch_ssl_c_used(struct proxy *px, struct session *l4, void *l7, unsigned in
*/
static int
smp_fetch_ssl_x_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt;
@ -3401,7 +3401,7 @@ smp_fetch_ssl_x_version(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_ssl_x_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt;
@ -3453,7 +3453,7 @@ smp_fetch_ssl_x_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned
*/
static int
smp_fetch_ssl_x_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int cert_peer = (kw[4] == 'c') ? 1 : 0;
X509 *crt;
@ -3504,7 +3504,7 @@ smp_fetch_ssl_x_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned
*/
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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int back_conn = (kw[4] == 'b') ? 1 : 0;
struct connection *conn = objt_conn(l4->si[back_conn].end);
@ -3517,7 +3517,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
struct connection *conn = objt_conn(l4->si[0].end);
@ -3538,7 +3538,7 @@ smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *l4, void *l7, unsigne
*/
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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int back_conn = (kw[4] == 'b') ? 1 : 0;
struct connection *conn;
@ -3570,7 +3570,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int back_conn = (kw[4] == 'b') ? 1 : 0;
struct connection *conn;
@ -3598,7 +3598,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int back_conn = (kw[4] == 'b') ? 1 : 0;
struct connection *conn;
@ -3624,7 +3624,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;
@ -3652,7 +3652,7 @@ smp_fetch_ssl_fc_npn(struct proxy *px, struct session *l4, void *l7, unsigned in
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;
@ -3683,7 +3683,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int back_conn = (kw[4] == 'b') ? 1 : 0;
struct connection *conn;
@ -3714,7 +3714,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
int back_conn = (kw[4] == 'b') ? 1 : 0;
@ -3747,7 +3747,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
struct connection *conn;
@ -3775,7 +3775,7 @@ smp_fetch_ssl_fc_sni(struct proxy *px, struct session *l4, void *l7, unsigned in
static int
smp_fetch_ssl_fc_unique_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
int back_conn = (kw[4] == 'b') ? 1 : 0;
@ -3819,7 +3819,7 @@ smp_fetch_ssl_fc_unique_id(struct proxy *px, struct session *l4, void *l7, unsig
/* 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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;
@ -3845,7 +3845,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;
@ -3871,7 +3871,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;
@ -3897,7 +3897,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 char *kw)
const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct connection *conn;