mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Removes phantom protocol from the pipe design.
It seems that by adding one pipe-specific exception to route announcement code and by adding one argument to rt_notify() callback i could completely eliminate the need for the phantom protocol instance and therefore make the code more straightforward. It will also fix some minor bugs (like ignoring debug flag changes from the command line).
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
struct iface;
|
||||
struct ifa;
|
||||
struct rtable;
|
||||
struct rte;
|
||||
struct neighbor;
|
||||
struct rta;
|
||||
@@ -162,7 +163,7 @@ struct proto {
|
||||
|
||||
void (*if_notify)(struct proto *, unsigned flags, struct iface *i);
|
||||
void (*ifa_notify)(struct proto *, unsigned flags, struct ifa *a);
|
||||
void (*rt_notify)(struct proto *, struct network *net, struct rte *new, struct rte *old, struct ea_list *attrs);
|
||||
void (*rt_notify)(struct proto *, struct rtable *table, struct network *net, struct rte *new, struct rte *old, struct ea_list *attrs);
|
||||
void (*neigh_notify)(struct neighbor *neigh);
|
||||
struct ea_list *(*make_tmp_attrs)(struct rte *rt, struct linpool *pool);
|
||||
void (*store_tmp_attrs)(struct rte *rt, struct ea_list *attrs);
|
||||
@@ -339,13 +340,7 @@ struct announce_hook *proto_add_announce_hook(struct proto *, struct rtable *);
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PIPE
|
||||
|
||||
static inline int proto_is_pipe(struct proto *p)
|
||||
{ return p->proto == &proto_pipe; }
|
||||
|
||||
struct rtable *pipe_get_peer_table(struct proto *p);
|
||||
struct proto_stats *pipe_get_peer_stats(struct proto *p);
|
||||
|
||||
#include "proto/pipe/pipe.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user