diff options
-rw-r--r-- | nest/iface.c | 4 | ||||
-rw-r--r-- | nest/protocol.h | 6 | ||||
-rw-r--r-- | nest/rt-attr.c | 2 | ||||
-rw-r--r-- | nest/rt-table.c | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/nest/iface.c b/nest/iface.c index 2b2af915..a0d4fb3f 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 c9720608..f6facea6 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 129ec0ce..aa4a59ad 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 916f887d..0ccb8da6 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) |