summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-02-11 23:45:54 +0100
committerMartin Mares <mj@ucw.cz>1999-02-11 23:45:54 +0100
commit64011f898c1bc99183a57f21d6e099c8f4496a09 (patch)
tree5c76fb9b991b1682108d28848b92b6d0a614379e /nest
parent3b15402fd4055cb5bd66cd9ac1106ceecff9f760 (diff)
downloadbird-64011f898c1bc99183a57f21d6e099c8f4496a09.tar
bird-64011f898c1bc99183a57f21d6e099c8f4496a09.zip
struct proto again contains instance name (a copy of proto->cf->name).
Diffstat (limited to 'nest')
-rw-r--r--nest/iface.c4
-rw-r--r--nest/protocol.h6
-rw-r--r--nest/rt-attr.c2
-rw-r--r--nest/rt-table.c2
4 files changed, 9 insertions, 5 deletions
diff --git a/nest/iface.c b/nest/iface.c
index 2b2af91..a0d4fb3 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -101,7 +101,7 @@ neigh_dump(neighbor *n)
debug("%s ", n->iface->name);
else
debug("[] ");
- debug("%s %p", n->proto->cf->name, n->data);
+ debug("%s %p", n->proto->name, n->data);
if (n->flags & NEF_STICKY)
debug(" STICKY");
debug("\n");
@@ -319,7 +319,7 @@ if_feed_baby(struct proto *p)
if (!p->if_notify)
return;
- debug("Announcing interfaces to new protocol %s\n", p->cf->name);
+ debug("Announcing interfaces to new protocol %s\n", p->name);
WALK_LIST(i, iface_list)
p->if_notify(p, IF_CHANGE_CREATE | ((i->flags & IF_UP) ? IF_CHANGE_UP : 0), NULL, i);
}
diff --git a/nest/protocol.h b/nest/protocol.h
index c972060..f6facea 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -20,6 +20,7 @@ struct network;
struct proto_config;
struct config;
struct proto;
+struct event;
/*
* Routing Protocol
@@ -75,12 +76,15 @@ struct proto {
struct protocol *proto; /* Protocol */
struct proto_config *cf; /* Configuration data */
pool *pool; /* Pool containing local objects */
+ struct event *attn; /* "Pay attention" event */
+ char *name; /* Name of this instance (== cf->name) */
unsigned debug; /* Debugging flags */
unsigned preference; /* Default route preference */
unsigned disabled; /* Manually disabled */
unsigned proto_state; /* Protocol state machine (see below) */
unsigned core_state; /* Core state machine (see below) */
+ unsigned core_goal; /* State we want to reach (see below) */
void (*if_notify)(struct proto *, unsigned flags, struct iface *new, struct iface *old);
void (*rt_notify)(struct proto *, struct network *net, struct rte *new, struct rte *old);
@@ -101,7 +105,7 @@ void proto_build(struct proto_config *);
void *proto_new(struct proto_config *, unsigned size);
void *proto_config_new(struct protocol *, unsigned size);
-extern list proto_list, inactive_proto_list;
+extern list proto_list;
/*
* Each protocol instance runs two different state machines:
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 129ec0c..aa4a59a 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -139,7 +139,7 @@ rta_dump(rta *a)
static char *rtd[] = { "", " DEV", " HOLE", " UNREACH", " PROHIBIT" };
debug("p=%s uc=%d %s %s%s%s TOS=%d",
- a->proto->cf->name, a->uc, rts[a->source], sco[a->scope], rtc[a->cast],
+ a->proto->name, a->uc, rts[a->source], sco[a->scope], rtc[a->cast],
rtd[a->dest], a->tos);
if (a->flags & RTF_EXTERIOR)
debug(" EXT");
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 916f887..0ccb8da 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -121,7 +121,7 @@ rt_feed_baby(struct proto *p)
if (!p->rt_notify)
return;
- debug("Announcing routes to new protocol %s\n", p->cf->name);
+ debug("Announcing routes to new protocol %s\n", p->name);
while (t)
{
FIB_WALK(&t->fib, fn)