diff --git a/src/backend.c b/src/backend.c
index 17a55d6..08389df 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1486,9 +1486,11 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_nbsrv(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_nbsrv(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
+	struct proxy *px;
+
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
 	px = args->data.prx;
@@ -1509,8 +1511,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_srv_is_up(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_srv_is_up(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	struct server *srv = args->data.srv;
 
@@ -1529,8 +1531,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_connslots(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_connslots(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	struct server *iterator;
 
@@ -1557,25 +1559,25 @@
 
 /* set temp integer to the id of the backend */
 static int
-smp_fetch_be_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_be_id(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TXN;
 	smp->type = SMP_T_UINT;
-	smp->data.uint = strm->be->uuid;
+	smp->data.uint = smp->strm->be->uuid;
 	return 1;
 }
 
 /* set temp integer to the id of the server */
 static int
-smp_fetch_srv_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_srv_id(unsigned int opt, const struct arg *args, struct sample *smp,
+                 const char *kw, void *private)
 {
-	if (!objt_server(strm->target))
+	if (!objt_server(smp->strm->target))
 		return 0;
 
 	smp->type = SMP_T_UINT;
-	smp->data.uint = objt_server(strm->target)->puid;
+	smp->data.uint = objt_server(smp->strm->target)->puid;
 
 	return 1;
 }
@@ -1585,8 +1587,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_be_sess_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_be_sess_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -1599,8 +1601,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_be_conn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                  const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_be_conn(unsigned int opt, const struct arg *args, struct sample *smp,
+                  const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -1613,8 +1615,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_queue_size(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_queue_size(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -1631,10 +1633,11 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_avg_queue_size(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_avg_queue_size(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 	int nbsrv;
+	struct proxy *px;
 
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -1660,8 +1663,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_srv_conn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_srv_conn(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -1674,8 +1677,8 @@
  * undefined behaviour.
  */
 static int
-smp_fetch_srv_sess_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_srv_sess_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
diff --git a/src/compression.c b/src/compression.c
index dc5ad5a..1012148 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -838,26 +838,26 @@
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_res_comp(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
 	smp->type = SMP_T_BOOL;
-	smp->data.uint = (strm->comp_algo != NULL);
+	smp->data.uint = (smp->strm->comp_algo != NULL);
 	return 1;
 }
 
 /* string, returns algo */
 static int
-smp_fetch_res_comp_algo(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_res_comp_algo(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
-	if (!strm->comp_algo)
+	if (!smp->strm->comp_algo)
 		return 0;
 
 	smp->type = SMP_T_STR;
 	smp->flags = SMP_F_CONST;
-	smp->data.str.str = strm->comp_algo->cfg_name;
-	smp->data.str.len = strm->comp_algo->cfg_name_len;
+	smp->data.str.str = smp->strm->comp_algo->cfg_name;
+	smp->data.str.len = smp->strm->comp_algo->cfg_name_len;
 	return 1;
 }
 
diff --git a/src/frontend.c b/src/frontend.c
index e8531e9..001b74d 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -159,12 +159,12 @@
 
 /* set temp integer to the id of the frontend */
 static int
-smp_fetch_fe_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fe_id(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_SESS;
 	smp->type = SMP_T_UINT;
-	smp->data.uint = sess->fe->uuid;
+	smp->data.uint = smp->sess->fe->uuid;
 	return 1;
 }
 
@@ -173,8 +173,8 @@
  * an undefined behaviour.
  */
 static int
-smp_fetch_fe_sess_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fe_sess_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -187,8 +187,8 @@
  * an undefined behaviour.
  */
 static int
-smp_fetch_fe_conn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                  const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fe_conn(unsigned int opt, const struct arg *args, struct sample *smp,
+                  const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
diff --git a/src/hlua.c b/src/hlua.c
index d0eb7f5..d45cac9 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2773,7 +2773,7 @@
 	smp.px = hsmp->p;
 	smp.sess = hsmp->s->sess;
 	smp.strm = hsmp->s;
-	if (!f->process(hsmp->p, hsmp->s->sess, hsmp->s, 0, args, &smp, f->kw, f->private)) {
+	if (!f->process(0, args, &smp, f->kw, f->private)) {
 		if (hsmp->stringsafe)
 			lua_pushstring(L, "");
 		else
@@ -2894,7 +2894,7 @@
 	smp.px = hsmp->p;
 	smp.sess = hsmp->s->sess;
 	smp.strm = hsmp->s;
-	if (!conv->process(hsmp->s, args, &smp, conv->private)) {
+	if (!conv->process(args, &smp, conv->private)) {
 		if (hsmp->stringsafe)
 			lua_pushstring(L, "");
 		else
@@ -3854,10 +3854,10 @@
  * doesn't allow "yield" functions because the HAProxy engine cannot
  * resume converters.
  */
-static int hlua_sample_conv_wrapper(struct stream *stream, const struct arg *arg_p,
-                                    struct sample *smp, void *private)
+static int hlua_sample_conv_wrapper(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct hlua_function *fcn = (struct hlua_function *)private;
+	struct stream *stream = smp->strm;
 
 	/* In the execution wrappers linked with a stream, the
 	 * Lua context can be not initialized. This behavior
@@ -3955,80 +3955,79 @@
  * doesn't allow "yield" functions because the HAProxy engine cannot
  * resume sample-fetches.
  */
-static int hlua_sample_fetch_wrapper(struct proxy *px, struct session *sess,
-                                     struct stream *s, unsigned int opt,
-                                     const struct arg *arg_p,
+static int hlua_sample_fetch_wrapper(unsigned int opt, const struct arg *arg_p,
                                      struct sample *smp, const char *kw, void *private)
 {
 	struct hlua_function *fcn = (struct hlua_function *)private;
+	struct stream *stream = smp->strm;
 
 	/* In the execution wrappers linked with a stream, the
 	 * Lua context can be not initialized. This behavior
 	 * permits to save performances because a systematic
 	 * Lua initialization cause 5% performances loss.
 	 */
-	if (!s->hlua.T && !hlua_ctx_init(&s->hlua, s->task)) {
-		send_log(s->be, LOG_ERR, "Lua sample-fetch '%s': can't initialize Lua context.", fcn->name);
+	if (!stream->hlua.T && !hlua_ctx_init(&stream->hlua, stream->task)) {
+		send_log(stream->be, LOG_ERR, "Lua sample-fetch '%s': can't initialize Lua context.", fcn->name);
 		if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 			Alert("Lua sample-fetch '%s': can't initialize Lua context.\n", fcn->name);
 		return 0;
 	}
 
 	/* If it is the first run, initialize the data for the call. */
-	if (!HLUA_IS_RUNNING(&s->hlua)) {
+	if (!HLUA_IS_RUNNING(&stream->hlua)) {
 		/* Check stack available size. */
-		if (!lua_checkstack(s->hlua.T, 2)) {
-			send_log(px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
+		if (!lua_checkstack(stream->hlua.T, 2)) {
+			send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
 			if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 				Alert("Lua sample-fetch '%s': full stack.\n", fcn->name);
 			return 0;
 		}
 
 		/* Restore the function in the stack. */
-		lua_rawgeti(s->hlua.T, LUA_REGISTRYINDEX, fcn->function_ref);
+		lua_rawgeti(stream->hlua.T, LUA_REGISTRYINDEX, fcn->function_ref);
 
 		/* push arguments in the stack. */
-		if (!hlua_txn_new(s->hlua.T, s, px)) {
-			send_log(px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
+		if (!hlua_txn_new(stream->hlua.T, stream, smp->px)) {
+			send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
 			if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 				Alert("Lua sample-fetch '%s': full stack.\n", fcn->name);
 			return 0;
 		}
-		s->hlua.nargs = 1;
+		stream->hlua.nargs = 1;
 
 		/* push keywords in the stack. */
 		for (; arg_p && arg_p->type != ARGT_STOP; arg_p++) {
 			/* Check stack available size. */
-			if (!lua_checkstack(s->hlua.T, 1)) {
-				send_log(px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
+			if (!lua_checkstack(stream->hlua.T, 1)) {
+				send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
 				if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 					Alert("Lua sample-fetch '%s': full stack.\n", fcn->name);
 				return 0;
 			}
-			if (!lua_checkstack(s->hlua.T, 1)) {
-				send_log(px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
+			if (!lua_checkstack(stream->hlua.T, 1)) {
+				send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
 				if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 					Alert("Lua sample-fetch '%s': full stack.\n", fcn->name);
 				return 0;
 			}
-			hlua_arg2lua(s->hlua.T, arg_p);
-			s->hlua.nargs++;
+			hlua_arg2lua(stream->hlua.T, arg_p);
+			stream->hlua.nargs++;
 		}
 
 		/* We must initialize the execution timeouts. */
-		s->hlua.expire = tick_add(now_ms, hlua_timeout_session);
+		stream->hlua.expire = tick_add(now_ms, hlua_timeout_session);
 
 		/* Set the currently running flag. */
-		HLUA_SET_RUN(&s->hlua);
+		HLUA_SET_RUN(&stream->hlua);
 	}
 
 	/* Execute the function. */
-	switch (hlua_ctx_resume(&s->hlua, 0)) {
+	switch (hlua_ctx_resume(&stream->hlua, 0)) {
 	/* finished. */
 	case HLUA_E_OK:
 		/* Convert the returned value in sample. */
-		hlua_lua2smp(s->hlua.T, -1, smp);
-		lua_pop(s->hlua.T, 1);
+		hlua_lua2smp(stream->hlua.T, -1, smp);
+		lua_pop(stream->hlua.T, 1);
 
 		/* Set the end of execution flag. */
 		smp->flags &= ~SMP_F_MAY_CHANGE;
@@ -4036,7 +4035,7 @@
 
 	/* yield. */
 	case HLUA_E_AGAIN:
-		send_log(px, LOG_ERR, "Lua sample-fetch '%s': cannot use yielded functions.", fcn->name);
+		send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s': cannot use yielded functions.", fcn->name);
 		if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 			Alert("Lua sample-fetch '%s': cannot use yielded functions.\n", fcn->name);
 		return 0;
@@ -4044,15 +4043,15 @@
 	/* finished with error. */
 	case HLUA_E_ERRMSG:
 		/* Display log. */
-		send_log(px, LOG_ERR, "Lua sample-fetch '%s': %s.", fcn->name, lua_tostring(s->hlua.T, -1));
+		send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s': %s.", fcn->name, lua_tostring(stream->hlua.T, -1));
 		if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
-			Alert("Lua sample-fetch '%s': %s.\n", fcn->name, lua_tostring(s->hlua.T, -1));
-		lua_pop(s->hlua.T, 1);
+			Alert("Lua sample-fetch '%s': %s.\n", fcn->name, lua_tostring(stream->hlua.T, -1));
+		lua_pop(stream->hlua.T, 1);
 		return 0;
 
 	case HLUA_E_ERR:
 		/* Display log. */
-		send_log(px, LOG_ERR, "Lua sample-fetch '%s' returns an unknown error.", fcn->name);
+		send_log(smp->px, LOG_ERR, "Lua sample-fetch '%s' returns an unknown error.", fcn->name);
 		if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 			Alert("Lua sample-fetch '%s': returns an unknown error.\n", fcn->name);
 
diff --git a/src/listener.c b/src/listener.c
index 017dcff..f4bdcc6 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -591,21 +591,21 @@
 
 /* set temp integer to the number of connexions to the same listening socket */
 static int
-smp_fetch_dconn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_dconn(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	smp->type = SMP_T_UINT;
-	smp->data.uint = sess->listener->nbconn;
+	smp->data.uint = smp->sess->listener->nbconn;
 	return 1;
 }
 
 /* set temp integer to the id of the socket (listener) */
 static int
-smp_fetch_so_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_so_id(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	smp->type = SMP_T_UINT;
-	smp->data.uint = sess->listener->luid;
+	smp->data.uint = smp->sess->listener->luid;
 	return 1;
 }
 
diff --git a/src/map.c b/src/map.c
index eea3f4f..a75605c 100644
--- a/src/map.c
+++ b/src/map.c
@@ -164,8 +164,7 @@
 	return 1;
 }
 
-static int sample_conv_map(struct stream *stream, const struct arg *arg_p,
-                           struct sample *smp, void *private)
+static int sample_conv_map(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct map_descriptor *desc;
 	struct pattern *pat;
diff --git a/src/payload.c b/src/payload.c
index 7e254bc..a80ac10 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -29,8 +29,8 @@
  * used with content inspection.
  */
 static int
-smp_fetch_wait_end(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_wait_end(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
 	if (!(opt & SMP_OPT_FINAL)) {
 		smp->flags |= SMP_F_MAY_CHANGE;
@@ -43,12 +43,12 @@
 
 /* return the number of bytes in the request buffer */
 static int
-smp_fetch_len(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
-              const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_len(unsigned int opt, const struct arg *args, struct sample *smp,
+              const char *kw, void *private)
 {
 	struct channel *chn;
 
-	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &s->res : &s->req;
+	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
 	if (!chn->buf)
 		return 0;
 
@@ -60,15 +60,15 @@
 
 /* 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 *sess, struct stream *s, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_hello_type(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 	int hs_len;
 	int hs_type, bleft;
 	struct channel *chn;
 	const unsigned char *data;
 
-	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &s->res : &s->req;
+	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
 	if (!chn->buf)
 		goto not_ssl_hello;
 
@@ -128,21 +128,22 @@
  * Note: this decoder only works with non-wrapping data.
  */
 static int
-smp_fetch_req_ssl_ver(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_req_ssl_ver(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
 	int version, bleft, msg_len;
 	const unsigned char *data;
+	struct channel *req = &smp->strm->req;
 
-	if (!s->req.buf)
+	if (!req->buf)
 		return 0;
 
 	msg_len = 0;
-	bleft = s->req.buf->i;
+	bleft = req->buf->i;
 	if (!bleft)
 		goto too_short;
 
-	data = (const unsigned char *)s->req.buf->p;
+	data = (const unsigned char *)req->buf->p;
 	if ((*data >= 0x14 && *data <= 0x17) || (*data == 0xFF)) {
 		/* SSLv3 header format */
 		if (bleft < 5)
@@ -210,8 +211,8 @@
 	 * all the part of the request which fits in a buffer is already
 	 * there.
 	 */
-	if (msg_len > channel_recv_limit(&s->req) + s->req.buf->data - s->req.buf->p)
-		msg_len = channel_recv_limit(&s->req) + s->req.buf->data - s->req.buf->p;
+	if (msg_len > channel_recv_limit(req) + req->buf->data - req->buf->p)
+		msg_len = channel_recv_limit(req) + req->buf->data - req->buf->p;
 
 	if (bleft < msg_len)
 		goto too_short;
@@ -264,14 +265,14 @@
  *             - opaque hostname[name_len bytes]
  */
 static int
-smp_fetch_ssl_hello_sni(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_hello_sni(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	int hs_len, ext_len, bleft;
 	struct channel *chn;
 	unsigned char *data;
 
-	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &s->res : &s->req;
+	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
 	if (!chn->buf)
 		goto not_ssl_hello;
 
@@ -493,20 +494,20 @@
  * returned sample has type SMP_T_CSTR.
  */
 int
-smp_fetch_rdp_cookie(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_rdp_cookie(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
-	return fetch_rdp_cookie_name(strm, smp, args ? args->data.str.str : NULL, args ? args->data.str.len : 0);
+	return fetch_rdp_cookie_name(smp->strm, smp, args ? args->data.str.str : NULL, args ? args->data.str.len : 0);
 }
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_rdp_cookie_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 	int ret;
 
-	ret = smp_fetch_rdp_cookie(px, sess, strm, opt, args, smp, kw, private);
+	ret = smp_fetch_rdp_cookie(opt, args, smp, kw, private);
 
 	if (smp->flags & SMP_F_MAY_CHANGE)
 		return 0;
@@ -519,8 +520,8 @@
 
 /* extracts part of a payload with offset and length at a given position */
 static int
-smp_fetch_payload_lv(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
+smp_fetch_payload_lv(unsigned int opt, 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;
@@ -533,7 +534,7 @@
 	/* by default buf offset == len offset + len size */
 	/* buf offset could be absolute or relative to len offset + len size if prefixed by + or - */
 
-	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &strm->res : &strm->req;
+	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
 	if (!chn->buf)
 		return 0;
 
@@ -573,14 +574,14 @@
 
 /* extracts some payload at a fixed position and length */
 static int
-smp_fetch_payload(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                  const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
+smp_fetch_payload(unsigned int opt, 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;
 	struct channel *chn;
 
-	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &strm->res : &strm->req;
+	chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
 	if (!chn->buf)
 		return 0;
 
diff --git a/src/proto_http.c b/src/proto_http.c
index 810248b..70e3ab7 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -10176,10 +10176,10 @@
  * least the type and uint value are modified.
  */
 #define CHECK_HTTP_MESSAGE_FIRST() \
-	do { int r = smp_prefetch_http(px, strm, opt, args, smp, 1); if (r <= 0) return r; } while (0)
+	do { int r = smp_prefetch_http(smp->px, smp->strm, opt, args, smp, 1); if (r <= 0) return r; } while (0)
 
 #define CHECK_HTTP_MESSAGE_FIRST_PERM() \
-	do { int r = smp_prefetch_http(px, strm, opt, args, smp, 0); if (r <= 0) return r; } while (0)
+	do { int r = smp_prefetch_http(smp->px, smp->strm, opt, args, smp, 0); if (r <= 0) return r; } while (0)
 
 
 /* 1. Check on METHOD
@@ -10214,11 +10214,11 @@
  * This is intended to be used with pat_match_meth() only.
  */
 static int
-smp_fetch_meth(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_meth(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	int meth;
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 
 	CHECK_HTTP_MESSAGE_FIRST_PERM();
 
@@ -10268,10 +10268,10 @@
 }
 
 static int
-smp_fetch_rqver(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_rqver(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 	char *ptr;
 	int len;
 
@@ -10293,8 +10293,8 @@
 }
 
 static int
-smp_fetch_stver(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_stver(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	struct http_txn *txn;
 	char *ptr;
@@ -10302,7 +10302,7 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	if (txn->rsp.msg_state < HTTP_MSG_BODY)
 		return 0;
 
@@ -10323,8 +10323,8 @@
 
 /* 3. Check on Status Code. We manipulate integers here. */
 static int
-smp_fetch_stcode(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_stcode(unsigned int opt, const struct arg *args, struct sample *smp,
+                 const char *kw, void *private)
 {
 	struct http_txn *txn;
 	char *ptr;
@@ -10332,7 +10332,7 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	if (txn->rsp.msg_state < HTTP_MSG_BODY)
 		return 0;
 
@@ -10349,10 +10349,10 @@
  * has been waited for using http-buffer-request.
  */
 static int
-smp_fetch_body(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_body(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 	struct http_msg *msg;
 	unsigned long len;
 	unsigned long block1;
@@ -10398,10 +10398,10 @@
  * has been waited for using http-buffer-request.
  */
 static int
-smp_fetch_body_len(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_body_len(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 	struct http_msg *msg;
 
 	CHECK_HTTP_MESSAGE_FIRST();
@@ -10424,10 +10424,10 @@
  * for using http-buffer-request.
  */
 static int
-smp_fetch_body_size(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_body_size(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 	struct http_msg *msg;
 
 	CHECK_HTTP_MESSAGE_FIRST();
@@ -10447,14 +10447,14 @@
 
 /* 4. Check on URL/URI. A pointer to the URI is stored. */
 static int
-smp_fetch_url(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-              const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url(unsigned int opt, const struct arg *args, struct sample *smp,
+              const char *kw, void *private)
 {
 	struct http_txn *txn;
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	smp->type = SMP_T_STR;
 	smp->data.str.len = txn->req.sl.rq.u_l;
 	smp->data.str.str = txn->req.chn->buf->p + txn->req.sl.rq.u;
@@ -10463,15 +10463,15 @@
 }
 
 static int
-smp_fetch_url_ip(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url_ip(unsigned int opt, const struct arg *args, struct sample *smp,
+                 const char *kw, void *private)
 {
 	struct http_txn *txn;
 	struct sockaddr_storage addr;
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	url2sa(txn->req.chn->buf->p + txn->req.sl.rq.u, txn->req.sl.rq.u_l, &addr, NULL);
 	if (((struct sockaddr_in *)&addr)->sin_family != AF_INET)
 		return 0;
@@ -10483,15 +10483,15 @@
 }
 
 static int
-smp_fetch_url_port(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url_port(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
 	struct http_txn *txn;
 	struct sockaddr_storage addr;
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	url2sa(txn->req.chn->buf->p + txn->req.sl.rq.u, txn->req.sl.rq.u_l, &addr, NULL);
 	if (((struct sockaddr_in *)&addr)->sin_family != AF_INET)
 		return 0;
@@ -10510,8 +10510,8 @@
  * returns full lines instead (useful for User-Agent or Date for example).
  */
 static int
-smp_fetch_fhdr(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fhdr(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	struct hdr_idx *idx;
 	struct hdr_ctx *ctx = smp->ctx.a[0];
@@ -10539,8 +10539,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	idx = &strm->txn->hdr_idx;
-	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &strm->txn->req : &strm->txn->rsp;
+	idx = &smp->strm->txn->hdr_idx;
+	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &smp->strm->txn->req : &smp->strm->txn->rsp;
 
 	if (ctx && !(smp->flags & SMP_F_NOT_LAST))
 		/* search for header from the beginning */
@@ -10568,8 +10568,8 @@
  * returns full lines instead (useful for User-Agent or Date for example).
  */
 static int
-smp_fetch_fhdr_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fhdr_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
 	struct hdr_idx *idx;
 	struct hdr_ctx ctx;
@@ -10585,8 +10585,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	idx = &strm->txn->hdr_idx;
-	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &strm->txn->req : &strm->txn->rsp;
+	idx = &smp->strm->txn->hdr_idx;
+	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &smp->strm->txn->req : &smp->strm->txn->rsp;
 
 	ctx.idx = 0;
 	cnt = 0;
@@ -10600,8 +10600,8 @@
 }
 
 static int
-smp_fetch_hdr_names(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_hdr_names(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	struct hdr_idx *idx;
 	struct hdr_ctx ctx;
@@ -10614,8 +10614,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	idx = &strm->txn->hdr_idx;
-	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &strm->txn->req : &strm->txn->rsp;
+	idx = &smp->strm->txn->hdr_idx;
+	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &smp->strm->txn->req : &smp->strm->txn->rsp;
 
 	temp = get_trash_chunk();
 
@@ -10641,8 +10641,8 @@
  * headers are considered from the first one.
  */
 static int
-smp_fetch_hdr(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-              const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_hdr(unsigned int opt, const struct arg *args, struct sample *smp,
+              const char *kw, void *private)
 {
 	struct hdr_idx *idx;
 	struct hdr_ctx *ctx = smp->ctx.a[0];
@@ -10670,8 +10670,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	idx = &strm->txn->hdr_idx;
-	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &strm->txn->req : &strm->txn->rsp;
+	idx = &smp->strm->txn->hdr_idx;
+	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &smp->strm->txn->req : &smp->strm->txn->rsp;
 
 	if (ctx && !(smp->flags & SMP_F_NOT_LAST))
 		/* search for header from the beginning */
@@ -10698,8 +10698,8 @@
  * Accepts exactly 1 argument of type string.
  */
 static int
-smp_fetch_hdr_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                  const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_hdr_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                  const char *kw, void *private)
 {
 	struct hdr_idx *idx;
 	struct hdr_ctx ctx;
@@ -10715,8 +10715,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	idx = &strm->txn->hdr_idx;
-	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &strm->txn->req : &strm->txn->rsp;
+	idx = &smp->strm->txn->hdr_idx;
+	msg = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) ? &smp->strm->txn->req : &smp->strm->txn->rsp;
 
 	ctx.idx = 0;
 	cnt = 0;
@@ -10735,10 +10735,10 @@
  * may or may not be appropriate for everything.
  */
 static int
-smp_fetch_hdr_val(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                  const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_hdr_val(unsigned int opt, const struct arg *args, struct sample *smp,
+                  const char *kw, void *private)
 {
-	int ret = smp_fetch_hdr(px, sess, strm, opt, args, smp, kw, private);
+	int ret = smp_fetch_hdr(opt, args, smp, kw, private);
 
 	if (ret > 0) {
 		smp->type = SMP_T_UINT;
@@ -10753,12 +10753,12 @@
  * It returns an IPv4 or IPv6 address.
  */
 static int
-smp_fetch_hdr_ip(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_hdr_ip(unsigned int opt, const struct arg *args, struct sample *smp,
+                 const char *kw, void *private)
 {
 	int ret;
 
-	while ((ret = smp_fetch_hdr(px, sess, strm, opt, args, smp, kw, private)) > 0) {
+	while ((ret = smp_fetch_hdr(opt, args, smp, kw, private)) > 0) {
 		if (url2ipv4((char *)smp->data.str.str, &smp->data.ipv4)) {
 			smp->type = SMP_T_IPV4;
 			break;
@@ -10785,15 +10785,15 @@
  * the first '/' after the possible hostname, and ends before the possible '?'.
  */
 static int
-smp_fetch_path(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_path(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	struct http_txn *txn;
 	char *ptr, *end;
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	end = txn->req.chn->buf->p + txn->req.sl.rq.u + txn->req.sl.rq.u_l;
 	ptr = http_get_path(txn);
 	if (!ptr)
@@ -10819,8 +10819,8 @@
  * The returned sample is of type string.
  */
 static int
-smp_fetch_base(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_base(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	struct http_txn *txn;
 	char *ptr, *end, *beg;
@@ -10829,10 +10829,10 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	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, sess, strm, opt, args, smp, kw, private);
+		return smp_fetch_path(opt, args, smp, kw, private);
 
 	/* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */
 	temp = get_trash_chunk();
@@ -10867,8 +10867,8 @@
  * high-traffic sites without having to store whole paths.
  */
 int
-smp_fetch_base32(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_base32(unsigned int opt, const struct arg *args, struct sample *smp,
+                 const char *kw, void *private)
 {
 	struct http_txn *txn;
 	struct hdr_ctx ctx;
@@ -10878,7 +10878,7 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	ctx.idx = 0;
 	if (http_find_header2("Host", 4, txn->req.chn->buf->p, &txn->hdr_idx, &ctx)) {
 		/* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */
@@ -10916,16 +10916,16 @@
  * 8 bytes would still work.
  */
 static int
-smp_fetch_base32_src(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_base32_src(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	struct chunk *temp;
-	struct connection *cli_conn = objt_conn(sess->origin);
+	struct connection *cli_conn = objt_conn(smp->sess->origin);
 
 	if (!cli_conn)
 		return 0;
 
-	if (!smp_fetch_base32(px, sess, strm, opt, args, smp, kw, private))
+	if (!smp_fetch_base32(opt, args, smp, kw, private))
 		return 0;
 
 	temp = get_trash_chunk();
@@ -10955,15 +10955,15 @@
  * of type string carrying the whole query string.
  */
 static int
-smp_fetch_query(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_query(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	struct http_txn *txn;
 	char *ptr, *end;
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	ptr = txn->req.chn->buf->p + txn->req.sl.rq.u;
 	end = ptr + txn->req.sl.rq.u_l;
 
@@ -10981,8 +10981,8 @@
 }
 
 static int
-smp_fetch_proto_http(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_proto_http(unsigned int opt, 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.
@@ -10997,18 +10997,18 @@
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_http_first_req(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 	smp->type = SMP_T_BOOL;
-	smp->data.uint = !(strm->txn->flags & TX_NOT_FIRST);
+	smp->data.uint = !(smp->strm->txn->flags & TX_NOT_FIRST);
 	return 1;
 }
 
 /* Accepts exactly 1 argument of type userlist */
 static int
-smp_fetch_http_auth(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_http_auth(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 
 	if (!args || args->type != ARGT_USR)
@@ -11016,32 +11016,34 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	if (!get_http_auth(strm))
+	if (!get_http_auth(smp->strm))
 		return 0;
 
 	smp->type = SMP_T_BOOL;
-	smp->data.uint = check_user(args->data.usr, strm->txn->auth.user, strm->txn->auth.pass);
+	smp->data.uint = check_user(args->data.usr, smp->strm->txn->auth.user,
+	                            smp->strm->txn->auth.pass);
 	return 1;
 }
 
 /* Accepts exactly 1 argument of type userlist */
 static int
-smp_fetch_http_auth_grp(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_http_auth_grp(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	if (!args || args->type != ARGT_USR)
 		return 0;
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	if (!get_http_auth(strm))
+	if (!get_http_auth(smp->strm))
 		return 0;
 
 	/* if the user does not belong to the userlist or has a wrong password,
 	 * report that it unconditionally does not match. Otherwise we return
 	 * a string containing the username.
 	 */
-	if (!check_user(args->data.usr, strm->txn->auth.user, strm->txn->auth.pass))
+	if (!check_user(args->data.usr, smp->strm->txn->auth.user,
+	                smp->strm->txn->auth.pass))
 		return 0;
 
 	/* pat_match_auth() will need the user list */
@@ -11049,8 +11051,8 @@
 
 	smp->type = SMP_T_STR;
 	smp->flags = SMP_F_CONST;
-	smp->data.str.str = strm->txn->auth.user;
-	smp->data.str.len = strlen(strm->txn->auth.user);
+	smp->data.str.str = smp->strm->txn->auth.user;
+	smp->data.str.len = strlen(smp->strm->txn->auth.user);
 
 	return 1;
 }
@@ -11154,10 +11156,10 @@
  * the "capture" option in the configuration file
  */
 static int
-smp_fetch_capture_header_req(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                             const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_capture_header_req(unsigned int opt, const struct arg *args, struct sample *smp,
+                             const char *kw, void *private)
 {
-	struct proxy *fe = strm_fe(strm);
+	struct proxy *fe = strm_fe(smp->strm);
 	int idx;
 
 	if (!args || args->type != ARGT_UINT)
@@ -11165,13 +11167,13 @@
 
 	idx = args->data.uint;
 
-	if (idx > (fe->nb_req_cap - 1) || strm->req_cap == NULL || strm->req_cap[idx] == NULL)
+	if (idx > (fe->nb_req_cap - 1) || smp->strm->req_cap == NULL || smp->strm->req_cap[idx] == NULL)
 		return 0;
 
 	smp->type = SMP_T_STR;
 	smp->flags |= SMP_F_CONST;
-	smp->data.str.str = strm->req_cap[idx];
-	smp->data.str.len = strlen(strm->req_cap[idx]);
+	smp->data.str.str = smp->strm->req_cap[idx];
+	smp->data.str.len = strlen(smp->strm->req_cap[idx]);
 
 	return 1;
 }
@@ -11180,10 +11182,10 @@
  * the "capture" option in the configuration file
  */
 static int
-smp_fetch_capture_header_res(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                             const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_capture_header_res(unsigned int opt, const struct arg *args, struct sample *smp,
+                             const char *kw, void *private)
 {
-	struct proxy *fe = strm_fe(strm);
+	struct proxy *fe = strm_fe(smp->strm);
 	int idx;
 
 	if (!args || args->type != ARGT_UINT)
@@ -11191,24 +11193,24 @@
 
 	idx = args->data.uint;
 
-	if (idx > (fe->nb_rsp_cap - 1) || strm->res_cap == NULL || strm->res_cap[idx] == NULL)
+	if (idx > (fe->nb_rsp_cap - 1) || smp->strm->res_cap == NULL || smp->strm->res_cap[idx] == NULL)
 		return 0;
 
 	smp->type = SMP_T_STR;
 	smp->flags |= SMP_F_CONST;
-	smp->data.str.str = strm->res_cap[idx];
-	smp->data.str.len = strlen(strm->res_cap[idx]);
+	smp->data.str.str = smp->strm->res_cap[idx];
+	smp->data.str.len = strlen(smp->strm->res_cap[idx]);
 
 	return 1;
 }
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                             const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_capture_req_method(unsigned int opt, const struct arg *args, struct sample *smp,
+                             const char *kw, void *private)
 {
 	struct chunk *temp;
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 	char *ptr;
 
 	if (!txn || !txn->uri)
@@ -11232,11 +11234,11 @@
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_capture_req_uri(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
 	struct chunk *temp;
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 	char *ptr;
 
 	if (!txn || !txn->uri)
@@ -11271,10 +11273,10 @@
  * as a string (either "HTTP/1.0" or "HTTP/1.1").
  */
 static int
-smp_fetch_capture_req_ver(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_capture_req_ver(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 
 	if (!txn || txn->req.msg_state < HTTP_MSG_HDR_FIRST)
 		return 0;
@@ -11295,10 +11297,10 @@
  * as a string (either "HTTP/1.0" or "HTTP/1.1").
  */
 static int
-smp_fetch_capture_res_ver(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_capture_res_ver(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
-	struct http_txn *txn = strm->txn;
+	struct http_txn *txn = smp->strm->txn;
 
 	if (!txn || txn->rsp.msg_state < HTTP_MSG_HDR_FIRST)
 		return 0;
@@ -11326,8 +11328,8 @@
  * The returned sample is of type CSTR. Can be used to parse cookies in other
  * files.
  */
-int smp_fetch_cookie(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+int smp_fetch_cookie(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	struct http_txn *txn;
 	struct hdr_idx *idx;
@@ -11351,8 +11353,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
-	idx = &strm->txn->hdr_idx;
+	txn = smp->strm->txn;
+	idx = &smp->strm->txn->hdr_idx;
 
 	if ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) {
 		msg = &txn->req;
@@ -11428,8 +11430,8 @@
  * type UINT. Accepts exactly 1 argument of type string.
  */
 static int
-smp_fetch_cookie_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_cookie_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	struct http_txn *txn;
 	struct hdr_idx *idx;
@@ -11446,8 +11448,8 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
-	idx = &strm->txn->hdr_idx;
+	txn = smp->strm->txn;
+	idx = &smp->strm->txn->hdr_idx;
 
 	if ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ) {
 		msg = &txn->req;
@@ -11498,10 +11500,10 @@
  * takes a mandatory argument of type string. It relies on smp_fetch_cookie().
  */
 static int
-smp_fetch_cookie_val(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_cookie_val(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
-	int ret = smp_fetch_cookie(px, sess, strm, opt, args, smp, kw, private);
+	int ret = smp_fetch_cookie(opt, args, smp, kw, private);
 
 	if (ret > 0) {
 		smp->type = SMP_T_UINT;
@@ -11603,8 +11605,8 @@
 }
 
 static int
-smp_fetch_url_param(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url_param(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	char delim = '?';
 	struct http_msg *msg;
@@ -11615,7 +11617,7 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	msg = &strm->txn->req;
+	msg = &smp->strm->txn->req;
 
 	if (args[1].type)
 		delim = *args[1].data.str.str;
@@ -11635,10 +11637,10 @@
  * above).
  */
 static int
-smp_fetch_url_param_val(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url_param_val(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
-	int ret = smp_fetch_url_param(px, sess, strm, opt, args, smp, kw, private);
+	int ret = smp_fetch_url_param(opt, args, smp, kw, private);
 
 	if (ret > 0) {
 		smp->type = SMP_T_UINT;
@@ -11659,8 +11661,8 @@
  * as well as the path
  */
 static int
-smp_fetch_url32(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url32(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	struct http_txn *txn;
 	struct hdr_ctx ctx;
@@ -11670,7 +11672,7 @@
 
 	CHECK_HTTP_MESSAGE_FIRST();
 
-	txn = strm->txn;
+	txn = smp->strm->txn;
 	ctx.idx = 0;
 	if (http_find_header2("Host", 4, txn->req.chn->buf->p, &txn->hdr_idx, &ctx)) {
 		/* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */
@@ -11708,13 +11710,13 @@
  * 8 bytes would still work.
  */
 static int
-smp_fetch_url32_src(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_url32_src(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	struct chunk *temp;
-	struct connection *cli_conn = objt_conn(sess->origin);
+	struct connection *cli_conn = objt_conn(smp->sess->origin);
 
-	if (!smp_fetch_url32(px, sess, strm, opt, args, smp, kw, private))
+	if (!smp_fetch_url32(opt, args, smp, kw, private))
 		return 0;
 
 	temp = get_trash_chunk();
@@ -11760,8 +11762,7 @@
  * adds an optional offset found in args[0] and emits a string representing
  * the date in RFC-1123/5322 format.
  */
-static int sample_conv_http_date(struct stream *stream, const struct arg *args,
-                                 struct sample *smp, void *private)
+static int sample_conv_http_date(const struct arg *args, struct sample *smp, void *private)
 {
 	const char day[7][4] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
 	const char mon[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
@@ -11812,8 +11813,7 @@
 }
 
 /* Arguments: The list of expected value, the number of parts returned and the separator */
-static int sample_conv_q_prefered(struct stream *stream, const struct arg *args,
-                                  struct sample *smp, void *private)
+static int sample_conv_q_prefered(const struct arg *args, struct sample *smp, void *private)
 {
 	const char *al = smp->data.str.str;
 	const char *end = al + smp->data.str.len;
@@ -11960,8 +11960,7 @@
 }
 
 /* This fetch url-decode any input string. */
-static int sample_conv_url_dec(struct stream *stream, const struct arg *args,
-                               struct sample *smp, void *private)
+static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void *private)
 {
 	/* If the constant flag is set or if not size is avalaible at
 	 * the end of the buffer, copy the string in other buffer
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index cf0aaa8..19f878e 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1963,10 +1963,10 @@
 
 /* fetch the connection's source IPv4/IPv6 address */
 static int
-smp_fetch_src(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-              const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_src(unsigned int opt, const struct arg *args, struct sample *smp,
+              const char *kw, void *private)
 {
-	struct connection *cli_conn = objt_conn(sess->origin);
+	struct connection *cli_conn = objt_conn(smp->sess->origin);
 
 	if (!cli_conn)
 		return 0;
@@ -1990,10 +1990,10 @@
 
 /* set temp integer to the connection's source port */
 static int
-smp_fetch_sport(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *k, void *private)
+smp_fetch_sport(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *k, void *private)
 {
-	struct connection *cli_conn = objt_conn(sess->origin);
+	struct connection *cli_conn = objt_conn(smp->sess->origin);
 
 	if (!cli_conn)
 		return 0;
@@ -2008,10 +2008,10 @@
 
 /* fetch the connection's destination IPv4/IPv6 address */
 static int
-smp_fetch_dst(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-              const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_dst(unsigned int opt, const struct arg *args, struct sample *smp,
+              const char *kw, void *private)
 {
-	struct connection *cli_conn = objt_conn(sess->origin);
+	struct connection *cli_conn = objt_conn(smp->sess->origin);
 
 	if (!cli_conn)
 		return 0;
@@ -2037,10 +2037,10 @@
 
 /* set temp integer to the frontend connexion's destination port */
 static int
-smp_fetch_dport(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_dport(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
-	struct connection *cli_conn = objt_conn(sess->origin);
+	struct connection *cli_conn = objt_conn(smp->sess->origin);
 
 	if (!cli_conn)
 		return 0;
diff --git a/src/sample.c b/src/sample.c
index 53c9d0d..8cc2234 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -1036,7 +1036,7 @@
 	p->px   = px;
 	p->sess = sess;
 	p->strm = strm;
-	if (!expr->fetch->process(px, sess, strm, opt, expr->arg_p, p, expr->fetch->kw, expr->fetch->private))
+	if (!expr->fetch->process(opt, expr->arg_p, p, expr->fetch->kw, expr->fetch->private))
 		return NULL;
 
 	list_for_each_entry(conv_expr, &expr->conv_exprs, list) {
@@ -1055,7 +1055,7 @@
 
 		/* OK cast succeeded */
 
-		if (!conv_expr->conv->process(strm, conv_expr->arg_p, p, conv_expr->conv->private))
+		if (!conv_expr->conv->process(conv_expr->arg_p, p, conv_expr->conv->private))
 			return NULL;
 	}
 	return p;
@@ -1364,8 +1364,7 @@
 /*    These functions set the data type on return.               */
 /*****************************************************************/
 
-static int sample_conv_bin2base64(struct stream *stream, const struct arg *arg_p,
-                                  struct sample *smp, void *private)
+static int sample_conv_bin2base64(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct chunk *trash = get_trash_chunk();
 	int b64_len;
@@ -1382,8 +1381,7 @@
 	return 1;
 }
 
-static int sample_conv_bin2hex(struct stream *stream, const struct arg *arg_p,
-                               struct sample *smp, void *private)
+static int sample_conv_bin2hex(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct chunk *trash = get_trash_chunk();
 	unsigned char c;
@@ -1402,8 +1400,7 @@
 }
 
 /* hashes the binary input into a 32-bit unsigned int */
-static int sample_conv_djb2(struct stream *stream, const struct arg *arg_p,
-                            struct sample *smp, void *private)
+static int sample_conv_djb2(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint = hash_djb2(smp->data.str.str, smp->data.str.len);
 	if (arg_p && arg_p->data.uint)
@@ -1412,8 +1409,7 @@
 	return 1;
 }
 
-static int sample_conv_str2lower(struct stream *stream, const struct arg *arg_p,
-                                 struct sample *smp, void *private)
+static int sample_conv_str2lower(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	int i;
 
@@ -1430,8 +1426,7 @@
 	return 1;
 }
 
-static int sample_conv_str2upper(struct stream *stream, const struct arg *arg_p,
-                                 struct sample *smp, void *private)
+static int sample_conv_str2upper(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	int i;
 
@@ -1449,8 +1444,7 @@
 }
 
 /* takes the netmask in arg_p */
-static int sample_conv_ipmask(struct stream *stream, const struct arg *arg_p,
-                              struct sample *smp, void *private)
+static int sample_conv_ipmask(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.ipv4.s_addr &= arg_p->data.ipv4.s_addr;
 	smp->type = SMP_T_IPV4;
@@ -1461,8 +1455,7 @@
  * adds an optional offset found in args[1] and emits a string representing
  * the local time in the format specified in args[1] using strftime().
  */
-static int sample_conv_ltime(struct stream *stream, const struct arg *args,
-                             struct sample *smp, void *private)
+static int sample_conv_ltime(const struct arg *args, struct sample *smp, void *private)
 {
 	struct chunk *temp;
 	time_t curr_date = smp->data.uint;
@@ -1479,8 +1472,7 @@
 }
 
 /* hashes the binary input into a 32-bit unsigned int */
-static int sample_conv_sdbm(struct stream *stream, const struct arg *arg_p,
-                            struct sample *smp, void *private)
+static int sample_conv_sdbm(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint = hash_sdbm(smp->data.str.str, smp->data.str.len);
 	if (arg_p && arg_p->data.uint)
@@ -1493,8 +1485,7 @@
  * adds an optional offset found in args[1] and emits a string representing
  * the UTC date in the format specified in args[1] using strftime().
  */
-static int sample_conv_utime(struct stream *stream, const struct arg *args,
-                             struct sample *smp, void *private)
+static int sample_conv_utime(const struct arg *args, struct sample *smp, void *private)
 {
 	struct chunk *temp;
 	time_t curr_date = smp->data.uint;
@@ -1511,8 +1502,7 @@
 }
 
 /* hashes the binary input into a 32-bit unsigned int */
-static int sample_conv_wt6(struct stream *stream, const struct arg *arg_p,
-                           struct sample *smp, void *private)
+static int sample_conv_wt6(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint = hash_wt6(smp->data.str.str, smp->data.str.len);
 	if (arg_p && arg_p->data.uint)
@@ -1522,8 +1512,7 @@
 }
 
 /* hashes the binary input into a 32-bit unsigned int */
-static int sample_conv_crc32(struct stream *stream, const struct arg *arg_p,
-                             struct sample *smp, void *private)
+static int sample_conv_crc32(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint = hash_crc32(smp->data.str.str, smp->data.str.len);
 	if (arg_p && arg_p->data.uint)
@@ -1603,8 +1592,7 @@
 	return 0;
 }
 
-static int sample_conv_json(struct stream *stream, const struct arg *arg_p,
-                            struct sample *smp, void *private)
+static int sample_conv_json(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct chunk *temp;
 	char _str[7]; /* \u + 4 hex digit + null char for sprintf. */
@@ -1718,8 +1706,7 @@
 /* This sample function is designed to extract some bytes from an input buffer.
  * First arg is the offset.
  * Optional second arg is the length to truncate */
-static int sample_conv_bytes(struct stream *stream, const struct arg *arg_p,
-                             struct sample *smp, void *private)
+static int sample_conv_bytes(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	if (smp->data.str.len <= arg_p[0].data.uint) {
 		smp->data.str.len = 0;
@@ -1776,8 +1763,7 @@
  * First arg is the index of the field (start at 1)
  * Second arg is a char list of separators (type string)
  */
-static int sample_conv_field(struct stream *stream, const struct arg *arg_p,
-                             struct sample *smp, void *private)
+static int sample_conv_field(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	unsigned int field;
 	char *start, *end;
@@ -1828,8 +1814,7 @@
  * First arg is the index of the word (start at 1)
  * Second arg is a char list of words separators (type string)
  */
-static int sample_conv_word(struct stream *stream, const struct arg *arg_p,
-                            struct sample *smp, void *private)
+static int sample_conv_word(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	unsigned int word;
 	char *start, *end;
@@ -1923,8 +1908,7 @@
  * location until nothing matches anymore. First arg is the regex to apply to
  * the input string, second arg is the replacement expression.
  */
-static int sample_conv_regsub(struct stream *stream, const struct arg *arg_p,
-                              struct sample *smp, void *private)
+static int sample_conv_regsub(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	char *start, *end;
 	struct my_regex *reg = arg_p[0].data.reg;
@@ -1996,8 +1980,7 @@
 /* Takes a UINT on input, applies a binary twos complement and returns the UINT
  * result.
  */
-static int sample_conv_binary_cpl(struct stream *stream, const struct arg *arg_p,
-                                  struct sample *smp, void *private)
+static int sample_conv_binary_cpl(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint = ~smp->data.uint;
 	return 1;
@@ -2006,8 +1989,7 @@
 /* Takes a UINT on input, applies a binary "and" with the UINT in arg_p, and
  * returns the UINT result.
  */
-static int sample_conv_binary_and(struct stream *stream, const struct arg *arg_p,
-                                  struct sample *smp, void *private)
+static int sample_conv_binary_and(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint &= arg_p->data.uint;
 	return 1;
@@ -2016,8 +1998,7 @@
 /* Takes a UINT on input, applies a binary "or" with the UINT in arg_p, and
  * returns the UINT result.
  */
-static int sample_conv_binary_or(struct stream *stream, const struct arg *arg_p,
-                                 struct sample *smp, void *private)
+static int sample_conv_binary_or(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint |= arg_p->data.uint;
 	return 1;
@@ -2026,8 +2007,7 @@
 /* Takes a UINT on input, applies a binary "xor" with the UINT in arg_p, and
  * returns the UINT result.
  */
-static int sample_conv_binary_xor(struct stream *stream, const struct arg *arg_p,
-                                  struct sample *smp, void *private)
+static int sample_conv_binary_xor(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint ^= arg_p->data.uint;
 	return 1;
@@ -2036,8 +2016,7 @@
 /* Takes a UINT on input, applies an arithmetic "add" with the UINT in arg_p,
  * and returns the UINT result.
  */
-static int sample_conv_arith_add(struct stream *stream, const struct arg *arg_p,
-                                 struct sample *smp, void *private)
+static int sample_conv_arith_add(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	smp->data.uint += arg_p->data.uint;
 	return 1;
@@ -2046,7 +2025,7 @@
 /* Takes a UINT on input, applies an arithmetic "sub" with the UINT in arg_p,
  * and returns the UINT result.
  */
-static int sample_conv_arith_sub(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_sub(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	smp->data.uint -= arg_p->data.uint;
@@ -2056,7 +2035,7 @@
 /* Takes a UINT on input, applies an arithmetic "mul" with the UINT in arg_p,
  * and returns the UINT result.
  */
-static int sample_conv_arith_mul(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_mul(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	smp->data.uint *= arg_p->data.uint;
@@ -2067,7 +2046,7 @@
  * and returns the UINT result. If arg_p makes the result overflow, then the
  * largest possible quantity is returned.
  */
-static int sample_conv_arith_div(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_div(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	if (arg_p->data.uint)
@@ -2081,7 +2060,7 @@
  * and returns the UINT result. If arg_p makes the result overflow, then zero
  * is returned.
  */
-static int sample_conv_arith_mod(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_mod(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	if (arg_p->data.uint)
@@ -2094,7 +2073,7 @@
 /* Takes an UINT on input, applies an arithmetic "neg" and returns the UINT
  * result.
  */
-static int sample_conv_arith_neg(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_neg(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	smp->data.uint = -smp->data.uint;
@@ -2104,7 +2083,7 @@
 /* Takes a UINT on input, returns true is the value is non-null, otherwise
  * false. The output is a BOOL.
  */
-static int sample_conv_arith_bool(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_bool(const struct arg *arg_p,
                                   struct sample *smp, void *private)
 {
 	smp->data.uint = !!smp->data.uint;
@@ -2115,7 +2094,7 @@
 /* Takes a UINT on input, returns false is the value is non-null, otherwise
  * truee. The output is a BOOL.
  */
-static int sample_conv_arith_not(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_not(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	smp->data.uint = !smp->data.uint;
@@ -2126,7 +2105,7 @@
 /* Takes a UINT on input, returns true is the value is odd, otherwise false.
  * The output is a BOOL.
  */
-static int sample_conv_arith_odd(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_odd(const struct arg *arg_p,
                                  struct sample *smp, void *private)
 {
 	smp->data.uint = smp->data.uint & 1;
@@ -2137,7 +2116,7 @@
 /* Takes a UINT on input, returns true is the value is even, otherwise false.
  * The output is a BOOL.
  */
-static int sample_conv_arith_even(struct stream *stream, const struct arg *arg_p,
+static int sample_conv_arith_even(const struct arg *arg_p,
                                   struct sample *smp, void *private)
 {
 	smp->data.uint = !(smp->data.uint & 1);
@@ -2151,8 +2130,8 @@
 
 /* force TRUE to be returned at the fetch level */
 static int
-smp_fetch_true(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_true(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	smp->type = SMP_T_BOOL;
 	smp->data.uint = 1;
@@ -2161,8 +2140,8 @@
 
 /* force FALSE to be returned at the fetch level */
 static int
-smp_fetch_false(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_false(unsigned int opt, const struct arg *args, struct sample *smp,
+                const char *kw, void *private)
 {
 	smp->type = SMP_T_BOOL;
 	smp->data.uint = 0;
@@ -2171,8 +2150,8 @@
 
 /* retrieve environment variable $1 as a string */
 static int
-smp_fetch_env(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-              const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_env(unsigned int opt, const struct arg *args, struct sample *smp,
+              const char *kw, void *private)
 {
 	char *env;
 
@@ -2194,8 +2173,8 @@
  * of args[0] seconds.
  */
 static int
-smp_fetch_date(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_date(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	smp->data.uint = date.tv_sec;
 
@@ -2210,8 +2189,8 @@
 
 /* returns the number of processes */
 static int
-smp_fetch_nbproc(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_nbproc(unsigned int opt, const struct arg *args, struct sample *smp,
+                 const char *kw, void *private)
 {
 	smp->type = SMP_T_UINT;
 	smp->data.uint = global.nbproc;
@@ -2220,8 +2199,8 @@
 
 /* returns the number of the current process (between 1 and nbproc */
 static int
-smp_fetch_proc(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_proc(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	smp->type = SMP_T_UINT;
 	smp->data.uint = relative_pid;
@@ -2232,8 +2211,8 @@
  * range specified in argument.
  */
 static int
-smp_fetch_rand(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-               const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_rand(unsigned int opt, const struct arg *args, struct sample *smp,
+               const char *kw, void *private)
 {
 	smp->data.uint = random();
 
@@ -2248,8 +2227,8 @@
 
 /* returns true if the current process is stopping */
 static int
-smp_fetch_stopping(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                   const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_stopping(unsigned int opt, const struct arg *args, struct sample *smp,
+                   const char *kw, void *private)
 {
 	smp->type = SMP_T_BOOL;
 	smp->data.uint = stopping;
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index eb1d88c..d490955 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -3084,12 +3084,12 @@
 
 /* boolean, returns true if client cert was present */
 static int
-smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_has_crt(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3110,8 +3110,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_der(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_der(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3119,7 +3119,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3155,8 +3155,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_serial(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_serial(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3164,7 +3164,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3200,8 +3200,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_sha1(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_sha1(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3210,7 +3210,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3245,8 +3245,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_notafter(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_notafter(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3254,7 +3254,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3289,8 +3289,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_i_dn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_i_dn(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3299,7 +3299,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3349,8 +3349,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_notbefore(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_notbefore(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3358,7 +3358,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3393,8 +3393,8 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_s_dn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_s_dn(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt = NULL;
@@ -3403,7 +3403,7 @@
 	struct chunk *smp_trash;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3450,13 +3450,13 @@
 
 /* integer, returns true if current session use a client certificate */
 static int
-smp_fetch_ssl_c_used(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_c_used(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	X509 *crt;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3481,14 +3481,14 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_version(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_version(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3518,15 +3518,15 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_sig_alg(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_sig_alg(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt;
 	int nid;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3567,15 +3567,15 @@
  * should be use.
  */
 static int
-smp_fetch_ssl_x_key_alg(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_x_key_alg(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	int cert_peer = (kw[4] == 'c') ? 1 : 0;
 	X509 *crt;
 	int nid;
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3615,11 +3615,11 @@
  * char is 'b'.
  */
 static int
-smp_fetch_ssl_fc(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                 const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc(unsigned int opt, 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(strm->si[back_conn].end);
+	struct connection *conn = objt_conn(smp->strm->si[back_conn].end);
 
 	smp->type = SMP_T_BOOL;
 	smp->data.uint = (conn && conn->xprt == &ssl_sock);
@@ -3628,11 +3628,11 @@
 
 /* boolean, returns true if client present a SNI */
 static int
-smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                         const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_has_sni(unsigned int opt, const struct arg *args, struct sample *smp,
+                         const char *kw, void *private)
 {
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
-	struct connection *conn = objt_conn(sess->origin);
+	struct connection *conn = objt_conn(smp->sess->origin);
 
 	smp->type = SMP_T_BOOL;
 	smp->data.uint = (conn && conn->xprt == &ssl_sock) &&
@@ -3649,15 +3649,15 @@
  * char is 'b'.
  */
 static int
-smp_fetch_ssl_fc_cipher(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_cipher(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
 	int back_conn = (kw[4] == 'b') ? 1 : 0;
 	struct connection *conn;
 
 	smp->flags = 0;
 
-	conn = objt_conn(strm->si[back_conn].end);
+	conn = objt_conn(smp->strm->si[back_conn].end);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3678,15 +3678,15 @@
  * char is 'b'.
  */
 static int
-smp_fetch_ssl_fc_alg_keysize(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                             const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_alg_keysize(unsigned int opt, const struct arg *args, struct sample *smp,
+                             const char *kw, void *private)
 {
 	int back_conn = (kw[4] == 'b') ? 1 : 0;
 	struct connection *conn;
 
 	smp->flags = 0;
 
-	conn = objt_conn(strm->si[back_conn].end);
+	conn = objt_conn(smp->strm->si[back_conn].end);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3703,15 +3703,15 @@
  * char is 'b'.
  */
 static int
-smp_fetch_ssl_fc_use_keysize(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                             const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_use_keysize(unsigned int opt, const struct arg *args, struct sample *smp,
+                             const char *kw, void *private)
 {
 	int back_conn = (kw[4] == 'b') ? 1 : 0;
 	struct connection *conn;
 
 	smp->flags = 0;
 
-	conn = objt_conn(strm->si[back_conn].end);
+	conn = objt_conn(smp->strm->si[back_conn].end);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3726,15 +3726,15 @@
 
 #ifdef OPENSSL_NPN_NEGOTIATED
 static int
-smp_fetch_ssl_fc_npn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_npn(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	struct connection *conn;
 
 	smp->flags = SMP_F_CONST;
 	smp->type = SMP_T_STR;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3751,8 +3751,8 @@
 
 #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
 static int
-smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_alpn(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
 	struct connection *conn;
 
@@ -3779,15 +3779,15 @@
  * char is 'b'.
  */
 static int
-smp_fetch_ssl_fc_protocol(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_protocol(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
 	int back_conn = (kw[4] == 'b') ? 1 : 0;
 	struct connection *conn;
 
 	smp->flags = 0;
 
-	conn = objt_conn(strm->si[back_conn].end);
+	conn = objt_conn(smp->strm->si[back_conn].end);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3807,8 +3807,8 @@
  * char is 'b'.
  */
 static int
-smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_session_id(unsigned int opt, 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;
@@ -3818,7 +3818,7 @@
 	smp->flags = SMP_F_CONST;
 	smp->type = SMP_T_BIN;
 
-	conn = objt_conn(strm->si[back_conn].end);
+	conn = objt_conn(smp->strm->si[back_conn].end);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3837,8 +3837,8 @@
 }
 
 static int
-smp_fetch_ssl_fc_sni(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_sni(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
 	struct connection *conn;
@@ -3846,7 +3846,7 @@
 	smp->flags = SMP_F_CONST;
 	smp->type = SMP_T_STR;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3862,8 +3862,8 @@
 }
 
 static int
-smp_fetch_ssl_fc_unique_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                           const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_fc_unique_id(unsigned int opt, 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;
@@ -3873,7 +3873,7 @@
 
 	smp->flags = 0;
 
-	conn = objt_conn(strm->si[back_conn].end);
+	conn = objt_conn(smp->strm->si[back_conn].end);
 	if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3903,12 +3903,12 @@
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_c_ca_err(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3926,12 +3926,12 @@
 
 /* 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 *sess, struct stream *strm, unsigned int opt,
-                             const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_c_ca_err_depth(unsigned int opt, const struct arg *args, struct sample *smp,
+                             const char *kw, void *private)
 {
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3949,12 +3949,12 @@
 
 /* integer, returns the first verify error on client certificate */
 static int
-smp_fetch_ssl_c_err(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_c_err(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
@@ -3972,12 +3972,12 @@
 
 /* integer, returns the verify result on client cert */
 static int
-smp_fetch_ssl_c_verify(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_ssl_c_verify(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
 	struct connection *conn;
 
-	conn = objt_conn(sess->origin);
+	conn = objt_conn(smp->sess->origin);
 	if (!conn || conn->xprt != &ssl_sock)
 		return 0;
 
diff --git a/src/stick_table.c b/src/stick_table.c
index 8ebaa66..19d6af1 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -809,8 +809,7 @@
  * the table's type. This is a double conversion, but in the future we might
  * support automatic input types to perform the cast on the fly.
  */
-static int sample_conv_in_table(struct stream *stream, const struct arg *arg_p,
-                                struct sample *smp, void *private)
+static int sample_conv_in_table(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -836,8 +835,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_bytes_in_rate(struct stream *stream, const struct arg *arg_p,
-                                           struct sample *smp, void *private)
+static int sample_conv_table_bytes_in_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -873,8 +871,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_conn_cnt(struct stream *stream, const struct arg *arg_p,
-                                      struct sample *smp, void *private)
+static int sample_conv_table_conn_cnt(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -909,8 +906,7 @@
  * can be easily performed. If the inspected parameter is not stored in the
  * table, <not found> is returned.
  */
-static int sample_conv_table_conn_cur(struct stream *stream, const struct arg *arg_p,
-                                      struct sample *smp, void *private)
+static int sample_conv_table_conn_cur(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -945,8 +941,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_conn_rate(struct stream *stream, const struct arg *arg_p,
-                                       struct sample *smp, void *private)
+static int sample_conv_table_conn_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -982,8 +977,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_bytes_out_rate(struct stream *stream, const struct arg *arg_p,
-                                            struct sample *smp, void *private)
+static int sample_conv_table_bytes_out_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1019,8 +1013,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_gpc0(struct stream *stream, const struct arg *arg_p,
-                                  struct sample *smp, void *private)
+static int sample_conv_table_gpc0(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1055,8 +1048,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_gpc0_rate(struct stream *stream, const struct arg *arg_p,
-                                       struct sample *smp, void *private)
+static int sample_conv_table_gpc0_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1092,8 +1084,7 @@
  * comparisons can be easily performed. If the inspected parameter is not stored
  * in the table, <not found> is returned.
  */
-static int sample_conv_table_http_err_cnt(struct stream *stream, const struct arg *arg_p,
-                                          struct sample *smp, void *private)
+static int sample_conv_table_http_err_cnt(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1128,8 +1119,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_http_err_rate(struct stream *stream, const struct arg *arg_p,
-                                           struct sample *smp, void *private)
+static int sample_conv_table_http_err_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1165,8 +1155,7 @@
  * can be easily performed. If the inspected parameter is not stored in the
  * table, <not found> is returned.
  */
-static int sample_conv_table_http_req_cnt(struct stream *stream, const struct arg *arg_p,
-                                          struct sample *smp, void *private)
+static int sample_conv_table_http_req_cnt(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1201,8 +1190,7 @@
  * performed. If the inspected parameter is not stored in the table, <not found>
  * is returned.
  */
-static int sample_conv_table_http_req_rate(struct stream *stream, const struct arg *arg_p,
-                                           struct sample *smp, void *private)
+static int sample_conv_table_http_req_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1238,8 +1226,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_kbytes_in(struct stream *stream, const struct arg *arg_p,
-                                       struct sample *smp, void *private)
+static int sample_conv_table_kbytes_in(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1274,8 +1261,7 @@
  * be easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_kbytes_out(struct stream *stream, const struct arg *arg_p,
-                                        struct sample *smp, void *private)
+static int sample_conv_table_kbytes_out(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1310,8 +1296,7 @@
  * easily performed. If the inspected parameter is not stored in the table,
  * <not found> is returned.
  */
-static int sample_conv_table_server_id(struct stream *stream, const struct arg *arg_p,
-                                       struct sample *smp, void *private)
+static int sample_conv_table_server_id(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1346,8 +1331,7 @@
  * can be easily performed. If the inspected parameter is not stored in the
  * table, <not found> is returned.
  */
-static int sample_conv_table_sess_cnt(struct stream *stream, const struct arg *arg_p,
-                                      struct sample *smp, void *private)
+static int sample_conv_table_sess_cnt(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1382,8 +1366,7 @@
  * performed. If the inspected parameter is not stored in the table, <not found>
  * is returned.
  */
-static int sample_conv_table_sess_rate(struct stream *stream, const struct arg *arg_p,
-                                       struct sample *smp, void *private)
+static int sample_conv_table_sess_rate(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
@@ -1419,8 +1402,7 @@
  * comparisons can be easily performed. If the inspected parameter is not
  * stored in the table, <not found> is returned.
  */
-static int sample_conv_table_trackers(struct stream *stream, const struct arg *arg_p,
-                                      struct sample *smp, void *private)
+static int sample_conv_table_trackers(const struct arg *arg_p, struct sample *smp, void *private)
 {
 	struct stktable *t;
 	struct stktable_key *key;
diff --git a/src/stream.c b/src/stream.c
index 5b5494b..133a93f 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -2585,12 +2585,12 @@
  * Supports being called as "sc[0-9]_tracked" only.
  */
 static int
-smp_fetch_sc_tracked(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                     const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_tracked(unsigned int opt, const struct arg *args, struct sample *smp,
+                     const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_BOOL;
-	smp->data.uint = !!smp_fetch_sc_stkctr(sess, strm, args, kw);
+	smp->data.uint = !!smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 	return 1;
 }
 
@@ -2600,10 +2600,10 @@
  * zero is returned if the key is new.
  */
 static int
-smp_fetch_sc_get_gpc0(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_get_gpc0(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2627,10 +2627,10 @@
  * Value zero is returned if the key is new.
  */
 static int
-smp_fetch_sc_gpc0_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_gpc0_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2643,7 +2643,7 @@
 		if (!ptr)
 			return 0; /* parameter not stored */
 		smp->data.uint = read_freq_ctr_period(&stktable_data_cast(ptr, gpc0_rate),
-		                                      stkctr->table->data_arg[STKTABLE_DT_GPC0_RATE].u);
+		                  stkctr->table->data_arg[STKTABLE_DT_GPC0_RATE].u);
 	}
 	return 1;
 }
@@ -2653,10 +2653,10 @@
  * Supports being called as "sc[0-9]_inc_gpc0" or "src_inc_gpc0" only.
  */
 static int
-smp_fetch_sc_inc_gpc0(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_inc_gpc0(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2690,10 +2690,10 @@
  * Supports being called as "sc[0-9]_clr_gpc0" or "src_clr_gpc0" only.
  */
 static int
-smp_fetch_sc_clr_gpc0(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_clr_gpc0(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2716,10 +2716,10 @@
  * "src_conn_cnt" only.
  */
 static int
-smp_fetch_sc_conn_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_conn_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2741,10 +2741,10 @@
  * only.
  */
 static int
-smp_fetch_sc_conn_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_conn_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2767,18 +2767,19 @@
  * Accepts exactly 1 argument of type table.
  */
 static int
-smp_fetch_src_updt_conn_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_src_updt_conn_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                            const char *kw, void *private)
 {
-	struct connection *conn = objt_conn(sess->origin);
+	struct connection *conn = objt_conn(smp->sess->origin);
 	struct stksess *ts;
 	struct stktable_key *key;
 	void *ptr;
+	struct proxy *px;
 
 	if (!conn)
 		return 0;
 
-	key = addr_to_stktable_key(&conn->addr.from, px->table.type);
+	key = addr_to_stktable_key(&conn->addr.from, smp->px->table.type);
 	if (!key)
 		return 0;
 
@@ -2803,10 +2804,10 @@
  * "src_conn_cur" only.
  */
 static int
-smp_fetch_sc_conn_cur(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_conn_cur(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2828,10 +2829,10 @@
  * "src_sess_cnt" only.
  */
 static int
-smp_fetch_sc_sess_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                      const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_sess_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2852,10 +2853,10 @@
  * Supports being called as "sc[0-9]_sess_rate" or "src_sess_rate" only.
  */
 static int
-smp_fetch_sc_sess_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_sess_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2878,10 +2879,10 @@
  * "src_http_req_cnt" only.
  */
 static int
-smp_fetch_sc_http_req_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_http_req_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2903,10 +2904,10 @@
  * "src_http_req_rate" only.
  */
 static int
-smp_fetch_sc_http_req_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                           const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_http_req_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                           const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2929,10 +2930,10 @@
  * "src_http_err_cnt" only.
  */
 static int
-smp_fetch_sc_http_err_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                          const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_http_err_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                          const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2954,10 +2955,10 @@
  * "src_http_err_rate" only.
  */
 static int
-smp_fetch_sc_http_err_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                           const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_http_err_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                           const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -2980,10 +2981,10 @@
  * "sc[0-9]_kbytes_in" or "src_kbytes_in" only.
  */
 static int
-smp_fetch_sc_kbytes_in(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_kbytes_in(unsigned int opt, const struct arg *args, struct sample *smp,
+                       const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -3005,10 +3006,10 @@
  * "sc[0-9]_bytes_in_rate" or "src_bytes_in_rate" only.
  */
 static int
-smp_fetch_sc_bytes_in_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                           const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_bytes_in_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                           const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -3031,10 +3032,10 @@
  * "sc[0-9]_kbytes_out" or "src_kbytes_out" only.
  */
 static int
-smp_fetch_sc_kbytes_out(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                        const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_kbytes_out(unsigned int opt, const struct arg *args, struct sample *smp,
+                        const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -3056,10 +3057,10 @@
  * "sc[0-9]_bytes_out_rate" or "src_bytes_out_rate" only.
  */
 static int
-smp_fetch_sc_bytes_out_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_bytes_out_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+                            const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -3081,10 +3082,10 @@
  * tracked frontend counters. Supports being called as "sc[0-9]_trackers" only.
  */
 static int
-smp_fetch_sc_trackers(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                       const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_sc_trackers(unsigned int opt, const struct arg *args, struct sample *smp,
+                      const char *kw, void *private)
 {
-	struct stkctr *stkctr = smp_fetch_sc_stkctr(sess, strm, args, kw);
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(smp->sess, smp->strm, args, kw);
 
 	if (!stkctr)
 		return 0;
@@ -3099,8 +3100,8 @@
  * Accepts exactly 1 argument of type table.
  */
 static int
-smp_fetch_table_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_table_cnt(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
@@ -3112,9 +3113,11 @@
  * Accepts exactly 1 argument of type table.
  */
 static int
-smp_fetch_table_avl(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
-                    const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_table_avl(unsigned int opt, const struct arg *args, struct sample *smp,
+                    const char *kw, void *private)
 {
+	struct proxy *px;
+
 	px = args->data.prx;
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
