]> git.ipfire.org Git - thirdparty/bird.git/commit
Explicit definition structures of route attributes
authorMaria Matejka <mq@ucw.cz>
Sat, 19 Mar 2022 15:23:42 +0000 (16:23 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 4 May 2022 13:39:19 +0000 (15:39 +0200)
commit17f91f9e6e70f7e3f29502e854823c0d48571eaa
treefab70e2115ce8d4e070382368df3eff4f3f44b97
parent165156beeb2926472bbceca3c103aacc3f81a8cc
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.
54 files changed:
conf/cf-lex.l
conf/conf.h
conf/confbase.Y
filter/config.Y
filter/data.h
filter/decl.m4
filter/f-inst.c
filter/f-inst.h
filter/f-util.c
filter/filter.h
filter/test.conf
lib/event_test.c
lib/mempool.c
lib/resource.c
lib/resource.h
lib/route.h
nest/config.Y
nest/proto.c
nest/protocol.h
nest/rt-attr.c
nest/rt-dev.c
nest/rt-table.c
proto/babel/babel.c
proto/babel/babel.h
proto/babel/config.Y
proto/bfd/bfd.c
proto/bgp/attrs.c
proto/bgp/bgp.c
proto/bgp/bgp.h
proto/bgp/config.Y
proto/mrt/mrt.c
proto/ospf/config.Y
proto/ospf/ospf.c
proto/ospf/ospf.h
proto/ospf/rt.c
proto/ospf/topology.c
proto/perf/perf.c
proto/pipe/pipe.c
proto/radv/config.Y
proto/radv/radv.c
proto/radv/radv.h
proto/rip/config.Y
proto/rip/rip.c
proto/rip/rip.h
proto/rpki/rpki.c
proto/static/static.c
sysdep/linux/krt-sys.h
sysdep/linux/netlink.Y
sysdep/linux/netlink.c
sysdep/unix/krt.Y
sysdep/unix/krt.c
sysdep/unix/krt.h
sysdep/unix/main.c
test/bt-utils.c