diff options
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r-- | proto/ospf/lsupd.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 6b99728..afec45f 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -15,13 +15,14 @@ void ospf_dump_lsahdr(struct proto *p, struct ospf_lsa_header *lsa_n) ntohlsah(lsa_n, &lsa); log(L_TRACE "%s: LSA Id: %I, Rt: %I, Type: %u, Age: %u, Seqno: 0x%08x, Sum: %u", - p->name, lsa.id, lsa.rt, lsa.type, lsa.age, lsa.sn, lsa.checksum); + p->name, ipa_from_u32(lsa.id), ipa_from_u32(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 %I", p->name, ipa_from_u32(ntohl(op->routerid))); } static void ospf_dump_lsupd(struct proto *p, struct ospf_lsupd_packet *pkt) @@ -95,7 +96,7 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn, } DBG("Wanted to flood LSA: Type: %u, ID: %I, RT: %I, SN: 0x%x, Age %u\n", - hh->type, hh->id, hh->rt, hh->sn, hh->age); + hh->type, ipa_from_u32(hh->id), ipa_from_u32(hh->rt), hh->sn, hh->age); ret = 0; WALK_LIST(nn, ifa->neigh_list) @@ -106,7 +107,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 %I\n", ipa_from_u32(nn->rid)); switch (lsa_comp(hh, &en->lsa)) { @@ -118,7 +119,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 %I\n", ipa_from_u32(nn->rid)); ospf_hash_delete(nn->lsrqh, en); if (EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE); @@ -129,7 +130,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 %I\n", ipa_from_u32(nn->rid)); ospf_hash_delete(nn->lsrqh, en); if (EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE); @@ -294,7 +295,8 @@ ospf_lsupd_send_list(struct ospf_neighbor *n, list * l) /* 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", - llsh->lsh.type, llsh->lsh.id, llsh->lsh.rt, en->lsa.sn, en->lsa.age); + llsh->lsh.type, ipa_from_u32(llsh->lsh.id), ipa_from_u32(llsh->lsh.rt), + en->lsa.sn, en->lsa.age); if (((u32) (len + en->lsa.length)) > ospf_pkt_maxsize(n->ifa)) { pk->lsano = htonl(lsano); @@ -413,16 +415,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); + lsatmp.type, ipa_from_u32(lsatmp.id), ipa_from_u32(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); + lsadb->lsa.type, ipa_from_u32(lsadb->lsa.id), ipa_from_u32(lsadb->lsa.rt), + lsadb->lsa.sn, lsadb->lsa.age, lsadb->lsa.checksum); #endif /* pg 143 (4) */ @@ -473,7 +475,7 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps, 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); + ipa_from_u32(lsatmp.id), ipa_from_u32(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); @@ -610,6 +612,6 @@ ospf_lsupd_flush_nlsa(struct top_hash_entry *en, struct ospf_area *oa) 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); + ipa_from_u32(lsa->id), ipa_from_u32(lsa->rt)); ospf_lsupd_flood(NULL, NULL, lsa, NULL, oa, 0); } |