summaryrefslogtreecommitdiffstats
path: root/nest/protocol.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-10-12 23:31:42 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-10-12 23:31:42 +0200
commit4cdd078453d585ac97a183ea1f3951d85f1b8784 (patch)
tree0379c01489f48ac7686d9c1cfdb139add00f6c05 /nest/protocol.h
parent52b9b2a1786140c38af03de570b0cc96c835c1d3 (diff)
downloadbird-4cdd078453d585ac97a183ea1f3951d85f1b8784.tar
bird-4cdd078453d585ac97a183ea1f3951d85f1b8784.zip
Implements protocol-specific router id and updates documentation.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r--nest/protocol.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/nest/protocol.h b/nest/protocol.h
index 0f9d59d..484df84 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -12,6 +12,7 @@
#include "lib/lists.h"
#include "lib/resource.h"
#include "lib/timer.h"
+#include "conf/conf.h"
struct iface;
struct ifa;
@@ -81,6 +82,7 @@ struct proto_config {
struct proto *proto; /* Instance we've created */
char *name;
unsigned debug, preference, disabled; /* Generic parameters */
+ u32 router_id; /* Protocol specific router ID */
struct rtable_config *table; /* Table we're attached to */
struct filter *in_filter, *out_filter; /* Attached filters */
@@ -192,6 +194,12 @@ struct proto *proto_get_named(struct symbol *, struct protocol *);
void proto_xxable(char *, int);
void proto_debug(char *, unsigned int);
+static inline u32
+proto_get_router_id(struct proto_config *pc)
+{
+ return pc->router_id ? pc->router_id : pc->global->router_id;
+}
+
extern list active_proto_list;
/*