summaryrefslogtreecommitdiff
path: root/filter/f-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/f-util.c')
-rw-r--r--filter/f-util.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/filter/f-util.c b/filter/f-util.c
index 11a5e97e..4f11a6d9 100644
--- a/filter/f-util.c
+++ b/filter/f-util.c
@@ -30,8 +30,7 @@ struct f_inst *
f_new_inst_da(enum f_instruction_code fi_code, struct f_dynamic_attr da)
{
struct f_inst *ret = f_new_inst(fi_code);
- ret->aux = (da.f_type << 8) | da.type;
- ret->a[1].i = da.ea_code;
+ ret->da = da;
return ret;
}
@@ -39,9 +38,7 @@ struct f_inst *
f_new_inst_sa(enum f_instruction_code fi_code, struct f_static_attr sa)
{
struct f_inst *ret = f_new_inst(fi_code);
- ret->aux = sa.f_type;
- ret->a[1].i = sa.sa_code;
- ret->a[0].i = sa.readonly;
+ ret->sa = sa;
return ret;
}
@@ -49,13 +46,12 @@ f_new_inst_sa(enum f_instruction_code fi_code, struct f_static_attr sa)
* Generate set_dynamic( operation( get_dynamic(), argument ) )
*/
struct f_inst *
-f_generate_complex(int operation, int operation_aux, struct f_dynamic_attr da, struct f_inst *argument)
+f_generate_complex(enum f_instruction_code fi_code, struct f_dynamic_attr da, struct f_inst *argument)
{
struct f_inst *set_dyn = f_new_inst_da(FI_EA_SET, da),
- *oper = f_new_inst(operation),
+ *oper = f_new_inst(fi_code),
*get_dyn = f_new_inst_da(FI_EA_GET, da);
- oper->aux = operation_aux;
oper->a[0].p = get_dyn;
oper->a[1].p = argument;
@@ -63,21 +59,6 @@ f_generate_complex(int operation, int operation_aux, struct f_dynamic_attr da, s
return set_dyn;
}
-struct f_inst *
-f_generate_roa_check(struct rtable_config *table, struct f_inst *prefix, struct f_inst *asn)
-{
- struct f_inst *ret = f_new_inst(FI_ROA_CHECK);
- ret->arg1 = prefix;
- ret->arg2 = asn;
- /* prefix == NULL <-> asn == NULL */
-
- if (table->addr_type != NET_ROA4 && table->addr_type != NET_ROA6)
- cf_error("%s is not a ROA table", table->name);
- ret->arg3 = table;
-
- return ret;
-}
-
static const char * const f_instruction_name_str[] = {
#define F(c,a,b) \
[c] = #c,
@@ -219,7 +200,7 @@ ca_lookup(pool *p, const char *name, int f_type)
}
cas = mb_allocz(&root_pool, sizeof(struct ca_storage) + strlen(name) + 1);
- cas->fda = f_new_dynamic_attr(ea_type, f_type, EA_CUSTOM(id));
+ cas->fda = f_new_dynamic_attr(ea_type, 0, f_type, EA_CUSTOM(id));
cas->uc = 1;
strcpy(cas->name, name);