diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-26 11:56:02 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-04 15:37:41 +0200 |
commit | 0d0f6554a5c233bf2bf830ae319191c4b1808d49 (patch) | |
tree | b90790a9450dc4eaefd1cab522d49221d358a5d9 /proto/rip | |
parent | 80272d4b64a38ee6f04a1c4e8566cac3a2293176 (diff) |
Unified attribute and filter types
This commit removes the EAF_TYPE_* namespace completely and also for
route attributes, filter-based types T_* are used. This simplifies
fetching and setting route attributes from filters.
Also, there is now union bval which serves as an universal value holder
instead of private unions held separately by eattr and filter code.
Diffstat (limited to 'proto/rip')
-rw-r--r-- | proto/rip/config.Y | 4 | ||||
-rw-r--r-- | proto/rip/rip.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/proto/rip/config.Y b/proto/rip/config.Y index 28ee9609..3934d337 100644 --- a/proto/rip/config.Y +++ b/proto/rip/config.Y @@ -190,8 +190,8 @@ rip_iface: rip_iface_start iface_patt_list_nopx rip_iface_opt_list rip_iface_finish; -dynamic_attr: RIP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_RIP_METRIC); } ; -dynamic_attr: RIP_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_RIP_TAG); } ; +dynamic_attr: RIP_METRIC { $$ = f_new_dynamic_attr(T_INT, EA_RIP_METRIC); } ; +dynamic_attr: RIP_TAG { $$ = f_new_dynamic_attr(T_INT, EA_RIP_TAG); } ; CF_CLI_HELP(SHOW RIP, ..., [[Show information about RIP protocol]]); diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 6ca7a6b5..fa5b1289 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -202,17 +202,17 @@ rip_announce_rte(struct rip_proto *p, struct rip_entry *en) .e = { { .id = EA_RIP_METRIC, - .type = EAF_TYPE_INT, + .type = T_INT, .u.data = rt_metric, }, { .id = EA_RIP_TAG, - .type = EAF_TYPE_INT, + .type = T_INT, .u.data = rt_tag, }, { .id = EA_RIP_FROM, - .type = EAF_TYPE_IFACE, + .type = T_IFACE, .u.ptr = &ea_block.riad.ad, } }, |