]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
struct proto again contains instance name (a copy of proto->cf->name).
authorMartin Mares <mj@ucw.cz>
Thu, 11 Feb 1999 22:45:54 +0000 (22:45 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 11 Feb 1999 22:45:54 +0000 (22:45 +0000)
nest/iface.c
nest/protocol.h
nest/rt-attr.c
nest/rt-table.c

index 2b2af915a91507145582d7458cf0c731a39264a9..a0d4fb3fc4742a061318e9baff8639bbbde4776c 100644 (file)
@@ -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);
 }
index c97206084093204ff493095232f08d2c8ac1b2c3..f6facea6bdf8807a6d9011d52a641d1f584c978f 100644 (file)
@@ -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:
index 129ec0cef9d2c674b0e09faa4d61196ea5893cd5..aa4a59ad5f497f7c2374d68e2d12da060eab447b 100644 (file)
@@ -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");
index 916f887d38684422bd82ca4014d902e1c226f0d2..0ccb8da6d0117ce9275fd5d4f9955eff396618e4 100644 (file)
@@ -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)