diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-19 16:23:42 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-04 15:39:19 +0200 |
commit | 17f91f9e6e70f7e3f29502e854823c0d48571eaa (patch) | |
tree | fab70e2115ce8d4e070382368df3eff4f3f44b97 /sysdep/unix/krt.h | |
parent | 165156beeb2926472bbceca3c103aacc3f81a8cc (diff) |
Explicit definition structures of route attributes
Changes in internal API:
* Every route attribute must be defined as struct ea_class somewhere.
* Registration of route attributes known at startup must be done by
ea_register_init() from protocol build functions.
* Every attribute has now its symbol registered in a global symbol table
defined as SYM_ATTRIBUTE
* All attribute ID's are dynamically allocated.
* Attribute value custom formatting hook is defined in the ea_class.
* Attribute names are the same for display and filters, always prefixed
by protocol name.
Also added some unit testing code for filters with route attributes.
Diffstat (limited to 'sysdep/unix/krt.h')
-rw-r--r-- | sysdep/unix/krt.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h index 20858cd7..04b04162 100644 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@ -21,8 +21,12 @@ struct kif_proto; #define KRT_DEFAULT_ECMP_LIMIT 16 +#if 0 #define EA_KRT_SOURCE EA_CODE(PROTOCOL_KERNEL, 0) #define EA_KRT_METRIC EA_CODE(PROTOCOL_KERNEL, 1) +#endif + +extern struct ea_class ea_krt_source, ea_krt_metric; #define KRT_REF_SEEN 0x1 /* Seen in table */ #define KRT_REF_BEST 0x2 /* Best in table */ |