Commit 2c6e00c0 authored by Maria Jan Matejka's avatar Maria Jan Matejka

TMP

parent 98d4bd69
Pipeline #21655 failed with stages
in 7 minutes and 58 seconds
This diff is collapsed.
......@@ -22,13 +22,25 @@ f_new_inst(enum filter_instruction_code fi_code, struct f_dynamic_attr da)
ret->aux = 0;
ret->arg1 = ret->arg2 = ret->next = NULL;
ret->lineno = ifs->lino;
if (da->type) {
ret->aux = da->type;
ret->a2.i = da->ea_code;
}
return ret;
}
struct f_inst *
f_new_inst_da(enum filter_instruction_code fi_code, struct f_dynamic_attr da)
{
struct f_inst *ret = f_new_inst(fi_code);
ret->aux = da.type;
ret->a2.i = da.ea_code;
}
struct f_inst *
f_new_inst_sa(enum filter_instruction_code fi_code, struct f_static_attr sa)
{
struct f_inst *ret = f_new_inst(fi_code);
ret->aux = sa.type;
ret->a2.i = sa.sa_code;
}
/*
* Generate set_dynamic( operation( get_dynamic(), argument ) )
*/
......
......@@ -51,7 +51,7 @@
F(pref_get, 0, 'P') \
F(pref_set, 'P', 'S') \
F(length, 0, 'L') \
F(prefix_convert, 'c', 'p') \
F(ip, 'c', 'p') \
F(as_path_first, 'a', 'f') \
F(as_path_last, 'a', 'l') \
F(as_path_last_nag, 'a', 'L') \
......@@ -151,6 +151,8 @@ struct filter {
};
struct f_inst *f_new_inst(enum filter_instruction_code fi_code);
struct f_inst *f_new_inst_da(enum filter_instruction_code fi_code, struct f_dynamic_attr da);
struct f_inst *f_new_inst_sa(enum filter_instruction_code fi_code, struct f_static_attr sa);
static inline struct f_dynamic_attr f_new_dynamic_attr(int type, int f_type, int code) /* Type as core knows it, type as filters know it, and code of dynamic attribute */
{ return (struct f_dynamic_attr) { .type = type, .f_type = f_type, .ea_code = code }; } /* f_type currently unused; will be handy for static type checking */
static inline struct f_static_attr f_new_static_attr(int f_type, int code, int readonly)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment