summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsupd.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 6b99728..ba09fec 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -14,14 +14,14 @@ void ospf_dump_lsahdr(struct proto *p, struct ospf_lsa_header *lsa_n)
struct ospf_lsa_header lsa;
ntohlsah(lsa_n, &lsa);
- log(L_TRACE "%s: LSA Id: %I, Rt: %I, Type: %u, Age: %u, Seqno: 0x%08x, Sum: %u",
+ log(L_TRACE "%s: LSA Id: %R, Rt: %R, Type: %u, Age: %u, Seqno: 0x%08x, Sum: %u",
p->name, lsa.id, lsa.rt, lsa.type, lsa.age, lsa.sn, lsa.checksum);
}
void ospf_dump_common(struct proto *p, struct ospf_packet *op)
{
log(L_TRACE "%s: length %d", p->name, ntohs(op->length));
- log(L_TRACE "%s: router %I", p->name, _MI(ntohl(op->routerid)));
+ log(L_TRACE "%s: router %R", p->name, ntohl(op->routerid));
}
static void ospf_dump_lsupd(struct proto *p, struct ospf_lsupd_packet *pkt)
@@ -94,7 +94,7 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
continue;
}
- DBG("Wanted to flood LSA: Type: %u, ID: %I, RT: %I, SN: 0x%x, Age %u\n",
+ DBG("Wanted to flood LSA: Type: %u, ID: %R, RT: %R, SN: 0x%x, Age %u\n",
hh->type, hh->id, hh->rt, hh->sn, hh->age);
ret = 0;
@@ -106,7 +106,7 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
{
if ((en = ospf_hash_find_header(nn->lsrqh, nn->ifa->oa->areaid, hh)) != NULL)
{
- DBG("That LSA found in lsreq list for neigh %I\n", nn->rid);
+ DBG("That LSA found in lsreq list for neigh %R\n", nn->rid);
switch (lsa_comp(hh, &en->lsa))
{
@@ -118,7 +118,7 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
if (en->lsa_body != NULL)
mb_free(en->lsa_body);
en->lsa_body = NULL;
- DBG("Removing from lsreq list for neigh %I\n", nn->rid);
+ DBG("Removing from lsreq list for neigh %R\n", nn->rid);
ospf_hash_delete(nn->lsrqh, en);
if (EMPTY_SLIST(nn->lsrql))
ospf_neigh_sm(nn, INM_LOADDONE);
@@ -129,7 +129,7 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
if (en->lsa_body != NULL)
mb_free(en->lsa_body);
en->lsa_body = NULL;
- DBG("Removing from lsreq list for neigh %I\n", nn->rid);
+ DBG("Removing from lsreq list for neigh %R\n", nn->rid);
ospf_hash_delete(nn->lsrqh, en);
if (EMPTY_SLIST(nn->lsrql))
ospf_neigh_sm(nn, INM_LOADDONE);
@@ -293,7 +293,7 @@ ospf_lsupd_send_list(struct ospf_neighbor *n, list * l)
continue; /* Probably flushed LSA */
/* FIXME This is a bug! I cannot flush LSA that is in lsrt */
- DBG("Sending LSA: Type=%u, ID=%I, RT=%I, SN: 0x%x, Age: %u\n",
+ DBG("Sending LSA: Type=%u, ID=%R, RT=%R, SN: 0x%x, Age: %u\n",
llsh->lsh.type, llsh->lsh.id, llsh->lsh.rt, en->lsa.sn, en->lsa.age);
if (((u32) (len + en->lsa.length)) > ospf_pkt_maxsize(n->ifa))
{
@@ -345,9 +345,7 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
if (n->state < NEIGHBOR_EXCHANGE)
{
- OSPF_TRACE(D_PACKETS,
- "Received lsupd in lesser state than EXCHANGE from (%I)",
- n->ip);
+ OSPF_TRACE(D_PACKETS, "Received lsupd in lesser state than EXCHANGE from (%I)", n->ip);
return;
}
@@ -412,17 +410,16 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
ntohlsah(lsa, &lsatmp);
- DBG("Update Type: %u ID: %I RT: %I, Sn: 0x%08x Age: %u, Sum: %u\n",
- lsatmp.type, lsatmp.id, lsatmp.rt, lsatmp.sn, lsatmp.age,
- lsatmp.checksum);
+ DBG("Update Type: %u ID: %R RT: %R, Sn: 0x%08x Age: %u, Sum: %u\n",
+ lsatmp.type, lsatmp.id, lsatmp.rt, lsatmp.sn, lsatmp.age, lsatmp.checksum);
lsadb = ospf_hash_find_header(po->gr, oa->areaid, &lsatmp);
#ifdef LOCAL_DEBUG
if (lsadb)
- DBG("I have Type: %u ID: %I RT: %I, Sn: 0x%08x Age: %u, Sum: %u\n",
- lsadb->lsa.type, lsadb->lsa.id, lsadb->lsa.rt, lsadb->lsa.sn,
- lsadb->lsa.age, lsadb->lsa.checksum);
+ DBG("I have Type: %u ID: %R RT: %R, Sn: 0x%08x Age: %u, Sum: %u\n",
+ lsadb->lsa.type, lsadb->lsa.id, lsadb->lsa.rt,
+ lsadb->lsa.sn, lsadb->lsa.age, lsadb->lsa.checksum);
#endif
/* pg 143 (4) */
@@ -472,8 +469,8 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
lsa->age = htons(LSA_MAXAGE);
lsa->sn = htonl(LSA_MAXSEQNO);
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);
+ OSPF_TRACE(D_EVENTS, "Type: %d, Id: %R, Rt: %R",
+ lsatmp.type, lsatmp.id, lsatmp.rt);
lsasum_check(lsa, (lsa + 1)); /* It also calculates chsum! */
lsatmp.checksum = ntohs(lsa->checksum);
ospf_lsupd_flood(NULL, lsa, &lsatmp, NULL, oa, 0);
@@ -609,7 +606,6 @@ ospf_lsupd_flush_nlsa(struct top_hash_entry *en, struct ospf_area *oa)
lsa->sn = LSA_MAXSEQNO;
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);
+ OSPF_TRACE(D_EVENTS, "Type: %d, Id: %R, Rt: %R", lsa->type, lsa->id, lsa->rt);
ospf_lsupd_flood(NULL, NULL, lsa, NULL, oa, 0);
}