]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Deleted unused parameters.
authorOndrej Filip <feela@network.cz>
Sun, 6 Jun 2004 18:45:08 +0000 (18:45 +0000)
committerOndrej Filip <feela@network.cz>
Sun, 6 Jun 2004 18:45:08 +0000 (18:45 +0000)
proto/ospf/lsalib.c
proto/ospf/lsalib.h
proto/ospf/lsupd.c
proto/ospf/neighbor.c
proto/ospf/ospf.c
proto/ospf/topology.c
proto/ospf/topology.h

index fcf23fc6a25c83b2cc5d47746ae87f4e686caf71..e3df74c86d051e8919e5cac91b9dfc934be17021 100644 (file)
@@ -73,7 +73,7 @@ ospf_age(struct ospf_area *oa)
       en->lsa.age = 0;
       en->inst_t = now;
       en->ini_age = 0;
-      lsasum_calculate(&en->lsa, en->lsa_body, po);
+      lsasum_calculate(&en->lsa, en->lsa_body);
       ospf_lsupd_flood(NULL, NULL, &en->lsa, NULL, oa, 1);
       continue;
     }
@@ -321,7 +321,7 @@ ntohlsab(void *n, void *h, u8 type, u16 len)
 
 /* FIXME This is VERY uneficient, I have huge endianity problems */
 void
-lsasum_calculate(struct ospf_lsa_header *h, void *body, struct proto_ospf *po)
+lsasum_calculate(struct ospf_lsa_header *h, void *body)
 {
   u16 length;
 
@@ -330,7 +330,7 @@ lsasum_calculate(struct ospf_lsa_header *h, void *body, struct proto_ospf *po)
   htonlsah(h, h);
   htonlsab(body, body, h->type, length - sizeof(struct ospf_lsa_header));
 
-  (void) lsasum_check(h, body, po);
+  (void) lsasum_check(h, body);
 
   ntohlsah(h, h);
   ntohlsab(body, body, h->type, length - sizeof(struct ospf_lsa_header));
@@ -341,7 +341,7 @@ lsasum_calculate(struct ospf_lsa_header *h, void *body, struct proto_ospf *po)
  * It also returns value in big endian
  */
 u16
-lsasum_check(struct ospf_lsa_header *h, void *body, struct proto_ospf *po)
+lsasum_check(struct ospf_lsa_header *h, void *body)
 {
   u8 *sp, *ep, *p, *q, *b;
   int c0 = 0, c1 = 0;
index cde30de8c0f47063411054d0a1d2d1128e5877fd..43f95130a35b05c62382eb0058155b4bc5f9c415 100644 (file)
@@ -14,10 +14,8 @@ void htonlsah(struct ospf_lsa_header *h, struct ospf_lsa_header *n);
 void ntohlsah(struct ospf_lsa_header *n, struct ospf_lsa_header *h);
 void htonlsab(void *h, void *n, u8 type, u16 len);
 void ntohlsab(void *n, void *h, u8 type, u16 len);
-void lsasum_calculate(struct ospf_lsa_header *header, void *body,
-                     struct proto_ospf *p);
-u16 lsasum_check(struct ospf_lsa_header *h, void *body,
-                struct proto_ospf *po);
+void lsasum_calculate(struct ospf_lsa_header *header, void *body);
+u16 lsasum_check(struct ospf_lsa_header *h, void *body);
 #define CMP_NEWER 1
 #define CMP_SAME 0
 #define CMP_OLDER -1
index d9065672c428424989a6d5f4dd68036fb11df44d..52531bf5277a7f6bc9cccbd35fb43ca6b02906d0 100644 (file)
@@ -350,7 +350,7 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
 
     /* pg 143 (1) */
     chsum = lsa->checksum;
-    if (chsum != lsasum_check(lsa, NULL, po))
+    if (chsum != lsasum_check(lsa, NULL))
     {
       log(L_WARN "Received bad lsa checksum from %I", n->ip);
       continue;
@@ -433,7 +433,7 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
        OSPF_TRACE(D_EVENTS, "Premature aging self originated lsa.");
        OSPF_TRACE(D_EVENTS, "Type: %d, Id: %I, Rt: %I", lsatmp.type,
                   lsatmp.id, lsatmp.rt);
-       lsasum_check(lsa, (lsa + 1), po);       /* It also calculates chsum! */
+       lsasum_check(lsa, (lsa + 1));   /* It also calculates chsum! */
        lsatmp.checksum = ntohs(lsa->checksum);
        ospf_lsupd_flood(NULL, lsa, &lsatmp, NULL, oa, 0);
        if (en = ospf_hash_find_header(oa->gr, &lsatmp))
@@ -566,7 +566,7 @@ ospf_lsupd_flush_nlsa(struct top_hash_entry *en, struct ospf_area *oa)
 
   lsa->age = LSA_MAXAGE;
   lsa->sn = LSA_MAXSEQNO;
-  lsasum_calculate(lsa, en->lsa_body, po);
+  lsasum_calculate(lsa, en->lsa_body);
   OSPF_TRACE(D_EVENTS, "Premature aging self originated lsa!");
   OSPF_TRACE(D_EVENTS, "Type: %d, Id: %I, Rt: %I", lsa->type,
             lsa->id, lsa->rt);
index c3f4c32147804e23e2583d48ec8973bf7c91b6ed..2527cef1d58e5b3bea5f51d35931631d050d8661 100644 (file)
@@ -57,9 +57,9 @@ ospf_neighbor_new(struct ospf_iface *ifa)
   n->rxmt_timer->hook = rxmt_timer_hook;
   n->rxmt_timer->recurrent = ifa->rxmtint;
   s_init_list(&(n->lsrql));
-  n->lsrqh = ospf_top_new(pool, n->ifa->proto);
+  n->lsrqh = ospf_top_new(pool);
   s_init_list(&(n->lsrtl));
-  n->lsrth = ospf_top_new(pool, n->ifa->proto);
+  n->lsrth = ospf_top_new(pool);
   s_init(&(n->lsrqi), &(n->lsrql));
   s_init(&(n->lsrti), &(n->lsrtl));
   tm_start(n->rxmt_timer, n->ifa->rxmtint);
index 302f56dfc3727d3e323b005d41413151a722da8d..d3067e86b081056349c50f5c9fb9c4e056daef03 100644 (file)
@@ -114,7 +114,7 @@ ospf_start(struct proto *p)
     oa->stub = ac->stub;
     oa->tick = ac->tick;
     oa->areaid = ac->areaid;
-    oa->gr = ospf_top_new(po->proto.pool, po);
+    oa->gr = ospf_top_new(p->pool);
     s_init_list(&(oa->lsal));
     oa->rt = NULL;
     oa->po = po;
@@ -175,8 +175,6 @@ static struct proto *
 ospf_init(struct proto_config *c)
 {
   struct proto *p = proto_new(c, sizeof(struct proto_ospf));
-  struct proto_ospf *po = (struct proto_ospf *) p;
-  struct ospf_config *oc = (struct ospf_config *) c;
 
   p->import_control = ospf_import_control;
   p->make_tmp_attrs = ospf_make_tmp_attrs;
index 75e074a73af5ff05366f79660698597232a338cf..f1e691ccc59ddbbb253194e4a0e75a56e9888202 100644 (file)
@@ -198,7 +198,7 @@ originate_rt_lsa(struct ospf_area *oa)
     lsa.sn = oa->rt->lsa.sn + 1;
   }
   body = originate_rt_lsa_body(oa, &lsa.length);
-  lsasum_calculate(&lsa, body, po);
+  lsasum_calculate(&lsa, body);
   en = lsa_install_new(&lsa, body, oa);
   oa->rt = en;
   en->dist = 0; /* Force area aging */
@@ -299,7 +299,7 @@ originate_net_lsa(struct ospf_iface *ifa)
   }
 
   body = originate_net_lsa_body(ifa, &lsa.length, po);
-  lsasum_calculate(&lsa, body, po);
+  lsasum_calculate(&lsa, body);
   ifa->nlsa = lsa_install_new(&lsa, body, ifa->oa);
   ospf_lsupd_flood(NULL, NULL, &ifa->nlsa->lsa, NULL, ifa->oa, 1);
   ifa->orignet = 0;
@@ -437,7 +437,7 @@ originate_ext_lsa(net * n, rte * e, struct proto_ospf *po,
     mb_free(body);
     return;
   }
-  lsasum_calculate(&lsa, body, po);
+  lsasum_calculate(&lsa, body);
   WALK_LIST(oa, po->area_list)
   {
     en = lsa_install_new(&lsa, body, oa);
@@ -514,7 +514,7 @@ ospf_top_hash(struct top_graph *f, u32 lsaid, u32 rtrid, u32 type)
  * its used in @ospf_area structure.
  */
 struct top_graph *
-ospf_top_new(pool * pool, struct proto_ospf *p)
+ospf_top_new(pool *pool)
 {
   struct top_graph *f;
 
index 5baa0c9e4634fe6e47b15b38cd4dc1998a2c69ea..55ecb4fed667b5f23e4ece03ff813f28ae93ea02 100644 (file)
@@ -44,7 +44,7 @@ struct top_graph
   unsigned int hash_entries_min, hash_entries_max;
 };
 
-struct top_graph *ospf_top_new(pool *, struct proto_ospf *);
+struct top_graph *ospf_top_new(pool *);
 void ospf_top_free(struct top_graph *);
 void ospf_top_dump(struct top_graph *, struct proto *);
 struct top_hash_entry *ospf_hash_find_header(struct top_graph *f,