]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Preparing for building LS databaze. Huh, why is it so complicated? :-(
authorOndrej Filip <feela@network.cz>
Wed, 5 Jan 2000 00:03:47 +0000 (00:03 +0000)
committerOndrej Filip <feela@network.cz>
Wed, 5 Jan 2000 00:03:47 +0000 (00:03 +0000)
Adding definition of some constants.

proto/ospf/ospf.c
proto/ospf/ospf.h

index ccaad535d9df38383f78eb10c720add4031cad1c..db773369ebcd9b98b785df7d800eb9fd13848186 100644 (file)
@@ -17,7 +17,11 @@ ospf_start(struct proto *p)
   p->if_notify=ospf_if_notify;
 
   /* Create graph of LSA's */
-  po->gr=ospf_top_new(po);
+  po->areano=1;                /* FIXME should respect config! */
+  po->firstarea=(struct ospf_area *)malloc(sizeof(struct ospf_area));
+  po->firstarea->gr=ospf_top_new(po);
+  po->firstarea->next=NULL;
+  po->firstarea->areaid=0;
   
   return PS_UP;
 }
@@ -30,6 +34,7 @@ ospf_dump(struct proto *p)
   struct ospf_neighbor *n;
   struct ospf_config *c = (void *) p->cf;
   struct proto_ospf *po=(struct proto_ospf *)p;
+  struct ospf_area *oa;
 
   debug("%s: AreaID: %u\n", p->name, c->area );
 
@@ -45,9 +50,15 @@ ospf_dump(struct proto *p)
     }
   }
 
-  debug("\n%s: LSA graph dump start:\n", p->name);
-  ospf_top_dump(po->gr);
-  debug("%s: LSA graph dump finished\n\n", p->name);
+  oa=po->firstarea;
+  while(oa!=NULL)
+  {
+    debug("\n%s: LSA graph dump for area \"%d\" start:\n", p->name,oa->areaid);
+    ospf_top_dump(oa->gr);
+    debug("%s: LSA graph dump for area \"%d\" finished\n\n", p->name,
+      oa->areaid);
+    oa=oa->next;
+  }
 
 }
 
index 5b8758bcd0033290951f57cf5bbc57be660117bf..647debad95a0d7ec055b65094d8677c166915562 100644 (file)
 #error Multicast address not defined in IPv6
 #endif
 
+
+#define LSREFRESHTIME 1800     /* 30 minut */
+#define MINLSINTERVAL 5
+#define MINLSARRIVAL 1
+#define MAXAGE 3600            /* 1 hour */
+#define CHECKAGE 300           /* 5 min */
+#define MAXAGEDIFF 900         /* 15 min */
+#define LSINFINITY 0xffffff
+/*#define DEFAULTDES 0.0.0.0 FIXME: How to define it? */
+#define INITSEQNUM 0x80000001  /* Initial Sequence Number */
+#define MAXSEQNUM 0x7fffffff   /* Maximal Sequence Number */
+
 struct ospf_config {
   struct proto_config c;
   u32 area;            /* FIXME: Area ID  !!! This is wrong !!!
@@ -197,10 +209,17 @@ struct ospf_neighbor
 #define INM_INACTTIM 11        /* Inactivity timer */
 #define INM_LLDOWN 12  /* Line down */
 
+struct ospf_area {
+  struct ospf_area *next;
+  u32 areaid;
+  struct top_graph *gr;                /* LSA graph */
+};
+
 struct proto_ospf {
   struct proto proto;
   list iface_list;             /* Interfaces we really use */
-  struct top_graph *gr;                /* LSA graph */
+  int areano;                  /* Number of area I belong to */
+  struct ospf_area *firstarea;
 };
 
 static int ospf_start(struct proto *p);