#include <types/stick_table.h>
-struct capture_prm {
- struct sample_expr *expr; /* expression used as the key */
- struct cap_hdr *hdr; /* the capture storage */
-};
-
struct act_rule {
struct list list;
struct acl_cond *cond; /* acl condition to meet */
int action;
} http;
struct {
- struct sample_expr *expr;
- struct cap_hdr *hdr;
+ struct sample_expr *expr; /* expression used as the key */
+ struct cap_hdr *hdr; /* the capture storage */
} cap;
struct {
struct sample_expr *expr;
void *p[4];
} act; /* generic pointers to be used by custom actions */
} arg; /* arguments used by some actions */
-
- union {
- struct capture_prm cap;
- } act_prm;
};
#endif /* _TYPES_ACTION_H */
if ((curproxy->cap & PR_CAP_FE) && !curproxy->tcp_req.inspect_delay) {
list_for_each_entry(trule, &curproxy->tcp_req.inspect_rules, list) {
if (trule->action == TCP_ACT_CAPTURE &&
- !(trule->act_prm.cap.expr->fetch->val & SMP_VAL_FE_SES_ACC))
+ !(trule->arg.cap.expr->fetch->val & SMP_VAL_FE_SES_ACC))
break;
if ((trule->action >= TCP_ACT_TRK_SC0 && trule->action <= TCP_ACT_TRK_SCMAX) &&
!(trule->arg.trk_ctr.expr->fetch->val & SMP_VAL_FE_SES_ACC))
}
else if (rule->action == TCP_ACT_CAPTURE) {
struct sample *key;
- struct cap_hdr *h = rule->act_prm.cap.hdr;
+ struct cap_hdr *h = rule->arg.cap.hdr;
char **cap = s->req_cap;
int len;
- key = sample_fetch_as_type(s->be, sess, s, SMP_OPT_DIR_REQ | partial, rule->act_prm.cap.expr, SMP_T_STR);
+ key = sample_fetch_as_type(s->be, sess, s, SMP_OPT_DIR_REQ | partial, rule->arg.cap.expr, SMP_T_STR);
if (!key)
continue;
/* check if we need to allocate an hdr_idx struct for HTTP parsing */
curpx->http_needed |= !!(expr->fetch->use & SMP_USE_HTTP_ANY);
- rule->act_prm.cap.expr = expr;
- rule->act_prm.cap.hdr = hdr;
+ rule->arg.cap.expr = expr;
+ rule->arg.cap.hdr = hdr;
rule->action = TCP_ACT_CAPTURE;
}
else if (strncmp(args[arg], "track-sc", 8) == 0 &&