eth.src binary binary
eth.vlan binary integer
even integer boolean
+fe_exists string boolean
field(index,delimiters[,count]) string string
fix_is_valid binary boolean
fix_tag_value(tag) binary binary
str(f1_f2_f3__f5),field(-2,_,3) # f2_f3_
str(f1_f2_f3__f5),field(-3,_,0) # f1_f2_f3
+fe_exists
+ Takes a frontend name as input value and returns a boolean TRUE if the said
+ frontend with that name exists in the current configuration, otherwise returns
+ FALSE. Can be used in places where checking the existence of a frontend from a
+ dynamic name is valuable, like map lookups or answering to an external check.
+
+ Example :
+ http-request deny unless { var(txn.fe_name),fe_exists }
+
fix_is_valid
Parses a binary payload and performs sanity checks regarding FIX (Financial
Information eXchange):
return 1;
}
+static int
+sample_conv_fe_exists(const struct arg *args, struct sample *smp, void *private)
+{
+ if (!smp_make_safe(smp))
+ return 0;
+
+ smp->data.type = SMP_T_BOOL;
+ smp->data.u.sint = proxy_fe_by_name(smp->data.u.str.area) != NULL;
+ return 1;
+}
/* Note: must not be declared <const> as its list will be overwritten.
* Please take care of keeping this list alphabetically sorted.
INITCALL1(STG_REGISTER, sample_register_fetches, &smp_kws);
+/* Note: must not be declared <const> as its list will be overwritten */
+static struct sample_conv_kw_list sample_conv_kws = {ILH, {
+ { "fe_exists", sample_conv_fe_exists, 0, NULL, SMP_T_STR, SMP_T_BOOL },
+ { /* END */ },
+}};
+
+INITCALL1(STG_REGISTER, sample_register_convs, &sample_conv_kws);
+
/* Note: must not be declared <const> as its list will be overwritten.
* Please take care of keeping this list alphabetically sorted.
*/