#include <types/sample.h>
#include <types/session.h>
-int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp);
+int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw);
#endif /* _PROTO_PROTO_PAYLOAD_H */
void *l7,
unsigned int opt, /* fetch options (SMP_OPT_*) */
const struct arg *arg_p,
- struct sample *smp); /* fetch processing function */
+ struct sample *smp,
+ const char *kw); /* fetch processing function */
unsigned int arg_mask; /* arguments (ARG*()) */
int (*val_args)(struct arg *arg_p,
char **err_msg); /* argument validation function */
/* we need to reset context and flags */
memset(&smp, 0, sizeof(smp));
fetch_next:
- if (!expr->smp->process(px, l4, l7, opt, expr->args, &smp)) {
+ if (!expr->smp->process(px, l4, l7, opt, expr->args, &smp, expr->smp->kw)) {
/* maybe we could not fetch because of missing data */
if (smp.flags & SMP_F_MAY_CHANGE && !(opt & SMP_OPT_FINAL))
acl_res |= ACL_PAT_MISS;
b_rew(s->req->buf, rewind = s->req->buf->o);
- ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp);
+ ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp, NULL);
len = smp.data.str.len;
b_adv(s->req->buf, rewind);
args[0].data.str.len = s->be->rdp_cookie_len;
args[1].type = ARGT_STOP;
- ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp);
+ ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp, NULL);
if (ret == 0 || (smp.flags & SMP_F_MAY_CHANGE) || smp.data.str.len == 0)
goto no_cookie;
*/
static int
smp_fetch_nbsrv(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_srv_is_up(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct server *srv = args->data.srv;
*/
static int
smp_fetch_connslots(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct server *iterator;
/* set temp integer to the id of the backend */
static int
smp_fetch_be_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TXN;
smp->type = SMP_T_UINT;
/* set temp integer to the id of the server */
static int
smp_fetch_srv_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!objt_server(l4->target))
return 0;
*/
static int
smp_fetch_be_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_be_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_avg_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int nbsrv;
*/
static int
smp_fetch_srv_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_srv_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
/* boolean, returns true if compression is used (either gzip or deflate) in the response */
static int
smp_fetch_res_comp(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_BOOL;
smp->data.uint = (l4->comp_algo != NULL);
/* string, returns algo */
static int
smp_fetch_res_comp_algo(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->comp_algo)
return 0;
/* set temp integer to the id of the frontend */
static int
smp_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_SESS;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_fe_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
/* set temp integer to the number of connexions to the same listening socket */
static int
smp_fetch_dconn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_UINT;
smp->data.uint = l4->listener->nbconn;
/* set temp integer to the id of the socket (listener) */
static int
smp_fetch_so_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_UINT;
smp->data.uint = l4->listener->luid;
*/
static int
smp_fetch_wait_end(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!(opt & SMP_OPT_FINAL)) {
smp->flags |= SMP_F_MAY_CHANGE;
/* return the number of bytes in the request buffer */
static int
smp_fetch_req_len(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!s || !s->req)
return 0;
/* returns the type of SSL hello message (mainly used to detect an SSL hello) */
static int
smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int hs_len;
int hs_type, bleft;
*/
static int
smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int version, bleft, msg_len;
const unsigned char *data;
*/
static int
smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int hs_len, ext_len, bleft;
struct channel *chn;
*/
int
smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int bleft;
const unsigned char *data;
/* returns either 1 or 0 depending on whether an RDP cookie is found or not */
static int
smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int ret;
- ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp);
+ ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw);
if (smp->flags & SMP_F_MAY_CHANGE)
return 0;
/* extracts part of a payload with offset and length at a given position */
static int
smp_fetch_payload_lv(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *arg_p, struct sample *smp)
+ const struct arg *arg_p, struct sample *smp, const char *kw)
{
unsigned int len_offset = arg_p[0].data.uint;
unsigned int len_size = arg_p[1].data.uint;
/* extracts some payload at a fixed position and length */
static int
smp_fetch_payload(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *arg_p, struct sample *smp)
+ const struct arg *arg_p, struct sample *smp, const char *kw)
{
unsigned int buf_offset = arg_p[0].data.uint;
unsigned int buf_size = arg_p[1].data.uint;
*/
static int
smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int meth;
struct http_txn *txn = l7;
static int
smp_fetch_rqver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
char *ptr;
static int
smp_fetch_stver(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
char *ptr;
/* 3. Check on Status Code. We manipulate integers here. */
static int
smp_fetch_stcode(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
char *ptr;
/* 4. Check on URL/URI. A pointer to the URI is stored. */
static int
smp_fetch_url(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
static int
smp_fetch_url_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
static int
smp_fetch_url_port(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
*/
static int
smp_fetch_fhdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
*/
static int
smp_fetch_fhdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
*/
static int
smp_fetch_hdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
*/
static int
smp_fetch_hdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
*/
static int
smp_fetch_hdr_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
- int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp);
+ int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw);
if (ret > 0) {
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
int ret;
- while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp)) > 0) {
+ while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw)) > 0) {
if (url2ipv4((char *)smp->data.str.str, &smp->data.ipv4)) {
smp->type = SMP_T_IPV4;
break;
*/
static int
smp_fetch_path(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
char *ptr, *end;
*/
static int
smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
char *ptr, *end, *beg;
ctx.idx = 0;
if (!http_find_header2("Host", 4, txn->req.chn->buf->p + txn->req.sol, &txn->hdr_idx, &ctx) ||
!ctx.vlen)
- return smp_fetch_path(px, l4, l7, opt, args, smp);
+ return smp_fetch_path(px, l4, l7, opt, args, smp, kw);
/* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */
memcpy(trash.str, ctx.line + ctx.val, ctx.vlen);
*/
static int
smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_ctx ctx;
*/
static int
smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct chunk *temp;
- if (!smp_fetch_base32(px, l4, l7, opt, args, smp))
+ if (!smp_fetch_base32(px, l4, l7, opt, args, smp, kw))
return 0;
temp = get_trash_chunk();
static int
smp_fetch_proto_http(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
/* Note: hdr_idx.v cannot be NULL in this ACL because the ACL is tagged
* as a layer7 ACL, which involves automatic allocation of hdr_idx.
/* return a valid test if the current request is the first one on the connection */
static int
smp_fetch_http_first_req(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!s)
return 0;
/* Accepts exactly 1 argument of type userlist */
static int
smp_fetch_http_auth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!args || args->type != ARGT_USR)
/* Accepts exactly 1 argument of type userlist */
static int
smp_fetch_http_auth_grp(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!args || args->type != ARGT_USR)
*/
static int
smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
*/
static int
smp_fetch_cookie_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
*/
static int
smp_fetch_cookie_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
- int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp);
+ int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp, kw);
if (ret > 0) {
smp->type = SMP_T_UINT;
static int
smp_fetch_url_param(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
char delim = '?';
struct http_txn *txn = l7;
*/
static int
smp_fetch_url_param_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
- int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp);
+ int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp, kw);
if (ret > 0) {
smp->type = SMP_T_UINT;
/* fetch the connection's source IPv4/IPv6 address */
static int
smp_fetch_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
switch (l4->si[0].conn->addr.from.ss_family) {
case AF_INET:
/* set temp integer to the connection's source port */
static int
smp_fetch_sport(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_UINT;
if (!(smp->data.uint = get_host_port(&l4->si[0].conn->addr.from)))
/* fetch the connection's destination IPv4/IPv6 address */
static int
smp_fetch_dst(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
conn_get_to_addr(l4->si[0].conn);
/* set temp integer to the frontend connexion's destination port */
static int
smp_fetch_dport(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
conn_get_to_addr(l4->si[0].conn);
p->flags = 0;
}
- if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p))
+ if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p, expr->fetch->kw))
return NULL;
if ((p->flags & SMP_F_MAY_CHANGE) && !(opt & SMP_OPT_FINAL))
/* force TRUE to be returned at the fetch level */
static int
smp_fetch_true(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_BOOL;
smp->data.uint = 1;
/* force FALSE to be returned at the fetch level */
static int
smp_fetch_false(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_BOOL;
smp->data.uint = 0;
/* retrieve environment variable $1 as a string */
static int
smp_fetch_env(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
char *env;
*/
static int
smp_fetch_date(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->data.uint = date.tv_sec;
/* set return a boolean indicating if sc0 is currently being tracked or not */
static int
smp_fetch_sc0_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_BOOL;
/* set return a boolean indicating if sc1 is currently being tracked or not */
static int
smp_fetch_sc1_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_BOOL;
/* set return a boolean indicating if sc2 is currently being tracked or not */
static int
smp_fetch_sc2_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_BOOL;
*/
static int
smp_fetch_sc0_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
/* set temp integer to the cumulated number of connections from the session's tracked FE counters */
static int
smp_fetch_sc0_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
/* set temp integer to the cumulated number of connections from the session's tracked BE counters */
static int
smp_fetch_sc1_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
/* set temp integer to the cumulated number of connections from the session's tracked BE counters */
static int
smp_fetch_sc2_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_src_updt_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stksess *ts;
struct stktable_key *key;
/* set temp integer to the number of concurrent connections from the session's tracked FE counters */
static int
smp_fetch_sc0_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
/* set temp integer to the number of concurrent connections from the session's tracked BE counters */
static int
smp_fetch_sc1_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
/* set temp integer to the number of concurrent connections from the session's tracked BE counters */
static int
smp_fetch_sc2_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
/* set temp integer to the cumulated number of sessions from the session's tracked FE counters */
static int
smp_fetch_sc0_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
/* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
static int
smp_fetch_sc1_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
/* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
static int
smp_fetch_sc2_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
/* set temp integer to the cumulated number of sessions from the session's tracked FE counters */
static int
smp_fetch_sc0_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
/* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
static int
smp_fetch_sc1_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
/* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
static int
smp_fetch_sc2_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
/* set temp integer to the cumulated number of sessions from the session's tracked FE counters */
static int
smp_fetch_sc0_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
/* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
static int
smp_fetch_sc1_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
/* set temp integer to the cumulated number of sessions from the session's tracked BE counters */
static int
smp_fetch_sc2_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
*/
static int
smp_fetch_sc0_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
*/
static int
smp_fetch_sc1_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
*/
static int
smp_fetch_sc2_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_src_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
struct stktable_key *key;
/* set temp integer to the number of active trackers on the SC0 entry */
static int
smp_fetch_sc0_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[0].entry)
return 0;
/* set temp integer to the number of active trackers on the SC0 entry */
static int
smp_fetch_sc1_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[1].entry)
return 0;
/* set temp integer to the number of active trackers on the SC0 entry */
static int
smp_fetch_sc2_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->stkctr[2].entry)
return 0;
*/
static int
smp_fetch_table_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
*/
static int
smp_fetch_table_avl(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
px = args->data.prx;
smp->flags = SMP_F_VOL_TEST;
/* boolean, returns true if client cert was present */
static int
smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
return 0;
/* bin, returns serial in a binary chunk */
static int
smp_fetch_ssl_c_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
int ret = 0;
/* bin, returns the client certificate's SHA-1 fingerprint (SHA-1 hash of DER-encoded certificate) in a binary chunk */
static int
smp_fetch_ssl_c_sha1(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
const EVP_MD *digest;
/*str, returns notafter date in ASN1_UTCTIME format */
static int
smp_fetch_ssl_c_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
int ret = 0;
/* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
static int
smp_fetch_ssl_c_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
X509_NAME *name;
/*str, returns notbefore date in ASN1_UTCTIME format */
static int
smp_fetch_ssl_c_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
int ret = 0;
/* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
static int
smp_fetch_ssl_c_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
X509_NAME *name;
/* integer, returns true if current session use a client certificate */
static int
smp_fetch_ssl_c_used(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
/* integer, returns the client certificate version */
static int
smp_fetch_ssl_c_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
/* str, returns the client certificate sig alg */
static int
smp_fetch_ssl_c_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
int nid;
/* str, returns the client certificate key alg */
static int
smp_fetch_ssl_c_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
int nid;
/* boolean, returns true if front conn. transport layer is SSL */
static int
smp_fetch_ssl_fc(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->type = SMP_T_BOOL;
smp->data.uint = (l4->si[0].conn->xprt == &ssl_sock);
/* boolean, returns true if client present a SNI */
static int
smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
smp->type = SMP_T_BOOL;
/* bin, returns serial in a binary chunk */
static int
smp_fetch_ssl_f_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
int ret = 0;
/*str, returns notafter date in ASN1_UTCTIME format */
static int
smp_fetch_ssl_f_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
int ret = 0;
/*str, returns notbefore date in ASN1_UTCTIME format */
static int
smp_fetch_ssl_f_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
int ret = 0;
/* integer, returns the frontend certificate version */
static int
smp_fetch_ssl_f_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
/* str, returns the client certificate sig alg */
static int
smp_fetch_ssl_f_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
int nid;
/* str, returns the client certificate key alg */
static int
smp_fetch_ssl_f_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt;
int nid;
/* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
static int
smp_fetch_ssl_f_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
X509_NAME *name;
/* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */
static int
smp_fetch_ssl_f_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
X509 *crt = NULL;
X509_NAME *name;
static int
smp_fetch_ssl_fc_cipher(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = 0;
static int
smp_fetch_ssl_fc_alg_keysize(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = 0;
static int
smp_fetch_ssl_fc_use_keysize(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = 0;
#ifdef OPENSSL_NPN_NEGOTIATED
static int
smp_fetch_ssl_fc_npn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = 0;
smp->type = SMP_T_CSTR;
#ifdef OPENSSL_ALPN_NEGOTIATED
static int
smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = 0;
smp->type = SMP_T_CSTR;
static int
smp_fetch_ssl_fc_protocol(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
smp->flags = 0;
static int
smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
#if OPENSSL_VERSION_NUMBER > 0x0090800fL
SSL_SESSION *sess;
static int
smp_fetch_ssl_fc_sni(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
smp->flags = 0;
/* integer, returns the first verify error in CA chain of client certificate chain. */
static int
smp_fetch_ssl_c_ca_err(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
return 0;
/* integer, returns the depth of the first verify error in CA chain of client certificate chain. */
static int
smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
return 0;
/* integer, returns the first verify error on client certificate */
static int
smp_fetch_ssl_c_err(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
return 0;
/* integer, returns the verify result on client cert */
static int
smp_fetch_ssl_c_verify(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp)
+ const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
return 0;