]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Tracing.
authorOndrej Filip <feela@network.cz>
Tue, 6 Jun 2000 02:50:49 +0000 (02:50 +0000)
committerOndrej Filip <feela@network.cz>
Tue, 6 Jun 2000 02:50:49 +0000 (02:50 +0000)
proto/ospf/hello.c
proto/ospf/lsalib.c
proto/ospf/lsreq.c

index 8117afe1eb2da64a87e33cb8b30faa53920c3808..ef9bf59336c0e6fe6e2a6054901a943c836f671d 100644 (file)
@@ -266,8 +266,8 @@ wait_timer_hook(timer *timer)
 
   ifa=(struct ospf_iface *)timer->data;
   p=(struct proto *)(ifa->proto);
-  debug("%s: Wait timer fired on interface %s.\n",
-    p->name, ifa->iface->name);
+  OSPF_TRACE(D_EVENTS, "Wait timer fired on interface %s.",
+    ifa->iface->name);
   ospf_int_sm(ifa, ISM_WAITF);
 }
 
index 0741c7953e4c11e136e0b11e654ca44dc92480e9..46b6d09d38db4b265d1591c98fa35c6cf8280c57 100644 (file)
@@ -11,7 +11,8 @@
 void
 flush_lsa(struct top_hash_entry *en, struct ospf_area *oa)
 {
-  debug("Going to remove node: Type: %u, Id: %I, Rt: %I, Age: %u\n",
+  struct proto *p=&oa->po->proto;
+  OSPF_TRACE(D_EVENTS, "Going to remove node Type: %u, Id: %I, Rt: %I, Age: %u",
     en->lsa.type, en->lsa.id, en->lsa.rt, en->lsa.age);
   s_rem_node(SNODE en);
   ospf_hash_delete(oa->gr,en);
@@ -35,8 +36,8 @@ ospf_age(struct ospf_area *oa)
     }
     if((en->lsa.rt==p->cf->global->router_id)&&(en->lsa.age>=LSREFRESHTIME))
     {
-       debug("%s: Refreshing my LSA: Type: %u, Id: %I, Rt: %I\n",
-         p->name,en->lsa.type, en->lsa.id, en->lsa.rt);
+       OSPF_TRACE(D_EVENTS, "Refreshing my LSA: Type: %u, Id: %I, Rt: %I",
+         en->lsa.type, en->lsa.id, en->lsa.rt);
        en->lsa.sn++;
        en->lsa.age=0;
        lsasum_calculate(&en->lsa,en->lsa_body,po);
index 504ab588135d16b8499d64f1c19ae600bd2b7c7c..4951c844f9204efbd100cc996d05dcb9c92da750 100644 (file)
@@ -55,7 +55,7 @@ ospf_lsreq_tx(struct ospf_neighbor *n)
   op->length=htons(length);
   ospf_pkt_finalize(n->ifa, op);
   sk_send_to(n->ifa->ip_sk,length, n->ip, OSPF_PROTO);
-  debug("%s: LS request sent to: %I\n", p->name, n->rid);
+  OSPF_TRACE(D_PACKETS, "LS request sent to: %I", n->rid);
 }
 
 void
@@ -120,13 +120,13 @@ ospf_lsreq_rx(struct ospf_lsreq_packet *ps, struct proto *p,
 
   if((n=find_neigh(ifa, nrid))==NULL)
   {
-    debug("%s: Received lsreq from unknown neighbor! (%I)\n", p->name,
+    OSPF_TRACE(D_PACKETS, "Received lsreq from unknown neighbor! (%I)",
       nrid);
     return ;
   }
   if(n->state<NEIGHBOR_EXCHANGE) return;
 
-  debug("%s: Received LS req from neighbor: %I\n",p->name, n->ip);
+  OSPF_TRACE(D_EVENTS, "Received LS req from neighbor: %I", n->ip);
   ospf_neigh_sm(n, INM_HELLOREC);
 
   length=ntohs(ps->ospf_packet.length);