diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-03-30 11:04:12 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-03-30 11:04:12 +0200 |
commit | bf2abe2f515d7b7aaed5fb4f37af82169adcd2f2 (patch) | |
tree | 158a3edcfa3a79a954cb5a26989929120ec8912b /nest/protocol.h | |
parent | fb829de69052755a31d76d73e17525d050e5ff4d (diff) | |
parent | c0adf7e9fc0bb920175a639c6f56ed7b4190f3e4 (diff) |
Merge branch 'soon'
Conflicts:
nest/proto.c
nest/rt-table.c
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index c914c40a..983ce75a 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -39,6 +39,7 @@ struct protocol { char *template; /* Template for automatic generation of names */ int name_counter; /* Counter for automatic name generation */ int attr_class; /* Attribute class known to this protocol */ + int multitable; /* Protocol handles all announce hooks itself */ unsigned preference; /* Default protocol preference */ void (*preconfig)(struct protocol *, struct config *); /* Just before configuring */ @@ -194,8 +195,7 @@ struct proto { void (*rte_remove)(struct network *, struct rte *); struct rtable *table; /* Our primary routing table */ - struct filter *in_filter; /* Input filter */ - struct filter *out_filter; /* Output filter */ + struct announce_hook *main_ahook; /* Primary announcement hook */ struct announce_hook *ahooks; /* Announcement hooks for this protocol */ struct fib_iterator *feed_iterator; /* Routing table iterator used during protocol feeding */ @@ -219,6 +219,9 @@ static inline void proto_copy_rest(struct proto_config *dest, struct proto_config *src, unsigned size) { memcpy(dest + 1, src + 1, size - sizeof(struct proto_config)); } + +void proto_show_basic_info(struct proto *p); + void proto_cmd_show(struct proto *, unsigned int, int); void proto_cmd_disable(struct proto *, unsigned int, int); void proto_cmd_enable(struct proto *, unsigned int, int); @@ -353,18 +356,13 @@ struct announce_hook { node n; struct rtable *table; struct proto *proto; + struct filter *in_filter; /* Input filter */ + struct filter *out_filter; /* Output filter */ + struct proto_stats *stats; /* Per-table protocol statistics */ struct announce_hook *next; /* Next hook for the same protocol */ }; -struct announce_hook *proto_add_announce_hook(struct proto *, struct rtable *); - -/* - * Some pipe-specific nest hacks - */ - -#ifdef CONFIG_PIPE -#include "proto/pipe/pipe.h" -#endif - +struct announce_hook *proto_add_announce_hook(struct proto *, struct rtable *, struct filter *, struct filter *, struct proto_stats *); +struct announce_hook *proto_find_announce_hook(struct proto *p, struct rtable *t); #endif |