summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-07-05 21:18:55 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-07-05 21:18:55 +0200
commit2389c46fe314867f99bbdfa1f6c9ff92d433d754 (patch)
treecd8ef3c101dc22ec6990056f463227283bf850d8 /proto/ospf
parentb082c1bfcc53b10012a427aa3b4b8281fe2f496c (diff)
downloadbird-2389c46fe314867f99bbdfa1f6c9ff92d433d754.tar
bird-2389c46fe314867f99bbdfa1f6c9ff92d433d754.zip
Another pile of ipa_from_u32() calls.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/dbdes.c4
-rw-r--r--proto/ospf/lsack.c2
-rw-r--r--proto/ospf/lsalib.c11
-rw-r--r--proto/ospf/lsreq.c9
-rw-r--r--proto/ospf/lsupd.c28
-rw-r--r--proto/ospf/neighbor.c6
-rw-r--r--proto/ospf/rt.c42
-rw-r--r--proto/ospf/topology.c15
8 files changed, 62 insertions, 55 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c
index c190fe7..2394658 100644
--- a/proto/ospf/dbdes.c
+++ b/proto/ospf/dbdes.c
@@ -115,8 +115,8 @@ ospf_dbdes_send(struct ospf_neighbor *n, int next)
{
htonlsah(&(en->lsa), lsa);
DBG("Working on: %d\n", i);
- DBG("\tX%01x %-1I %-1I %p\n", en->lsa.type, en->lsa.id,
- en->lsa.rt, en->lsa_body);
+ DBG("\tX%01x %-1I %-1I %p\n", en->lsa.type, ipa_from_u32(en->lsa.id),
+ ipa_from_u32(en->lsa.rt), en->lsa_body);
lsa++;
}
diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c
index cc26666..619e91d 100644
--- a/proto/ospf/lsack.c
+++ b/proto/ospf/lsack.c
@@ -182,7 +182,7 @@ ospf_lsack_receive(struct ospf_lsack_packet *ps,
OSPF_TRACE(D_PACKETS, "Strange LS acknoledgement from %I", n->ip);
OSPF_TRACE(D_PACKETS, "Id: %I, Rt: %I, Type: %u",
- lsa.id, lsa.rt, lsa.type);
+ ipa_from_u32(lsa.id), ipa_from_u32(lsa.rt), lsa.type);
OSPF_TRACE(D_PACKETS, "I have: Age: %4u, Seqno: 0x%08x, Sum: %u",
en->lsa.age, en->lsa.sn, en->lsa.checksum);
OSPF_TRACE(D_PACKETS, "He has: Age: %4u, Seqno: 0x%08x, Sum: %u",
diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c
index 567942d..c0eaf88 100644
--- a/proto/ospf/lsalib.c
+++ b/proto/ospf/lsalib.c
@@ -15,7 +15,7 @@ flush_lsa(struct top_hash_entry *en, struct proto_ospf *po)
OSPF_TRACE(D_EVENTS,
"Going to remove node Type: %u, Id: %I, Rt: %I, Age: %u, SN: 0x%x",
- en->lsa.type, en->lsa.id, en->lsa.rt, en->lsa.age, en->lsa.sn);
+ en->lsa.type, ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt), en->lsa.age, en->lsa.sn);
s_rem_node(SNODE en);
if (en->lsa_body != NULL)
mb_free(en->lsa_body);
@@ -56,8 +56,8 @@ ospf_age(struct proto_ospf *po)
en->nhi = NULL;
en->nh = IPA_NONE;
en->lb = IPA_NONE;
- DBG("Infinitying Type: %u, Id: %I, Rt: %I\n", en->lsa.type, en->lsa.id,
- en->lsa.rt);
+ DBG("Infinitying Type: %u, Id: %I, Rt: %I\n", en->lsa.type,
+ ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt));
}
if (en->lsa.age == LSA_MAXAGE)
{
@@ -69,7 +69,7 @@ ospf_age(struct proto_ospf *po)
LSREFRESHTIME))
{
OSPF_TRACE(D_EVENTS, "Refreshing my LSA: Type: %u, Id: %I, Rt: %I",
- en->lsa.type, en->lsa.id, en->lsa.rt);
+ en->lsa.type, ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt));
en->lsa.sn++;
en->lsa.age = 0;
en->inst_t = now;
@@ -460,7 +460,8 @@ lsa_install_new(struct ospf_lsa_header *lsa, void *body, struct ospf_area *oa)
}
DBG("Inst lsa: Id: %I, Rt: %I, Type: %u, Age: %u, Sum: %u, Sn: 0x%x\n",
- lsa->id, lsa->rt, lsa->type, lsa->age, lsa->checksum, lsa->sn);
+ ipa_from_u32(lsa->id), ipa_from_u32(lsa->rt),
+ lsa->type, lsa->age, lsa->checksum, lsa->sn);
s_add_tail(&po->lsal, SNODE en);
en->inst_t = now;
diff --git a/proto/ospf/lsreq.c b/proto/ospf/lsreq.c
index e179189..45062f9 100644
--- a/proto/ospf/lsreq.c
+++ b/proto/ospf/lsreq.c
@@ -23,7 +23,8 @@ static void ospf_dump_lsreq(struct proto *p, struct ospf_lsreq_packet *pkt)
for (i = 0; i < j; i++)
log(L_TRACE "%s: LSR Id: %I, Rt: %I, Type: %u",
- p->name, htonl(plsr[i].id), htonl(plsr[i].rt), plsr[i].type);
+ p->name, ipa_from_u32(htonl(plsr[i].id)),
+ ipa_from_u32(htonl(plsr[i].rt)), plsr[i].type);
}
void
@@ -64,7 +65,7 @@ ospf_lsreq_send(struct ospf_neighbor *n)
lsh->rt = htonl(en->lsa.rt);
lsh->id = htonl(en->lsa.id);
DBG("Requesting %uth LSA: Type: %u, ID: %I, RT: %I, SN: 0x%x, Age %u\n",
- i, en->lsa.type, en->lsa.id, en->lsa.rt, en->lsa.sn, en->lsa.age);
+ i, en->lsa.type, ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt), en->lsa.sn, en->lsa.age);
lsh++;
if (sn == STAIL(n->lsrql))
break;
@@ -114,7 +115,7 @@ ospf_lsreq_receive(struct ospf_lsreq_packet *ps,
{
u32 hid = ntohl(lsh->id);
u32 hrt = ntohl(lsh->rt);
- DBG("Processing requested LSA: Type: %u, ID: %I, RT: %I\n", lsh->type, hid, hrt);
+ DBG("Processing requested LSA: Type: %u, ID: %I, RT: %I\n", lsh->type, ipa_from_u32(hid), ipa_from_u32(hrt));
llsh = sl_alloc(upslab);
llsh->lsh.id = hid;
llsh->lsh.rt = hrt;
@@ -125,7 +126,7 @@ ospf_lsreq_receive(struct ospf_lsreq_packet *ps,
{
log(L_WARN
"Received bad LS req from: %I looking: Type: %u, ID: %I, RT: %I",
- n->ip, lsh->type, hid, hrt);
+ n->ip, lsh->type, ipa_from_u32(hid), ipa_from_u32(hrt));
ospf_neigh_sm(n, INM_BADLSREQ);
rfree(upslab);
return;
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);
}
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index 6e72764..cb43140 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -506,7 +506,7 @@ bdr_election(struct ospf_iface *ifa)
ifa->bdrip = nbdr->ip;
}
- DBG("DR=%I, BDR=%I\n", ifa->drid, ifa->bdrid);
+ DBG("DR=%I, BDR=%I\n", ipa_from_u32(ifa->drid), ipa_from_u32(ifa->bdrid));
if (myid == ifa->drid)
ospf_iface_chstate(ifa, OSPF_IS_DR);
@@ -624,7 +624,7 @@ ospf_sh_neigh_info(struct ospf_neighbor *n)
if ((n->ifa->type == OSPF_IT_PTP) || (n->ifa->type == OSPF_IT_VLINK))
pos = "ptp ";
- cli_msg(-1013, "%-1I\t%3u\t%s/%s\t%-5s\t%-1I\t%-10s", n->rid, n->priority,
+ cli_msg(-1013, "%-1I\t%3u\t%s/%s\t%-5s\t%-1I\t%-10s", ipa_from_u32(n->rid), n->priority,
ospf_ns[n->state], pos, etime, n->ip,
(ifa->type == OSPF_IT_VLINK ? "vlink" : ifa->iface->name));
}
@@ -673,7 +673,7 @@ rxmt_timer_hook(timer * timer)
llsh->lsh.rt = en->lsa.rt;
llsh->lsh.type = en->lsa.type;
DBG("Working on ID: %I, RT: %I, Type: %u\n",
- en->lsa.id, en->lsa.rt, en->lsa.type);
+ ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt), en->lsa.type);
add_tail(&uplist, NODE llsh);
}
ospf_lsupd_send_list(n, &uplist);
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 79b21e6..123d4fb 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -155,7 +155,7 @@ ospf_rt_spfa(struct ospf_area *oa)
return;
OSPF_TRACE(D_EVENTS, "Starting routing table calculation for area %I",
- oa->areaid);
+ ipa_from_u32(oa->areaid));
if (oa->rt->dist != LSINFINITY)
bug("Aging was not processed.");
@@ -168,8 +168,8 @@ ospf_rt_spfa(struct ospf_area *oa)
oa->rt->dist = 0;
oa->rt->color = CANDIDATE;
add_head(&oa->cand, &oa->rt->cn);
- DBG("RT LSA: rt: %I, id: %I, type: %u\n", oa->rt->lsa.rt,
- oa->rt->lsa.id, oa->rt->lsa.type);
+ DBG("RT LSA: rt: %I, id: %I, type: %u\n", ipa_from_u32(oa->rt->lsa.rt),
+ ipa_from_u32(oa->rt->lsa.id), oa->rt->lsa.type);
while (!EMPTY_LIST(oa->cand))
{
@@ -177,8 +177,8 @@ ospf_rt_spfa(struct ospf_area *oa)
act = SKIP_BACK(struct top_hash_entry, cn, n);
rem_node(n);
- DBG("Working on LSA: rt: %I, id: %I, type: %u\n", act->lsa.rt,
- act->lsa.id, act->lsa.type);
+ DBG("Working on LSA: rt: %I, id: %I, type: %u\n", ipa_from_u32(act->lsa.rt),
+ ipa_from_u32(act->lsa.id), act->lsa.type);
act->color = INSPF;
switch (act->lsa.type)
@@ -208,7 +208,7 @@ ospf_rt_spfa(struct ospf_area *oa)
{
tmp = NULL;
rtl = (rr + i);
- DBG(" Working on link: %I (type: %u) ", rtl->id, rtl->type);
+ DBG(" Working on link: %I (type: %u) ", ipa_from_u32(rtl->id), rtl->type);
switch (rtl->type)
{
case LSART_STUB:
@@ -265,7 +265,7 @@ ospf_rt_spfa(struct ospf_area *oa)
DBG("PTP found.\n");
break;
default:
- log("Unknown link type in router lsa. (rid = %I)", act->lsa.id);
+ log("Unknown link type in router lsa. (rid = %I)", ipa_from_u32(act->lsa.id));
break;
}
if (tmp)
@@ -292,8 +292,8 @@ ospf_rt_spfa(struct ospf_area *oa)
for (i = 0; i < (act->lsa.length - sizeof(struct ospf_lsa_header) -
sizeof(struct ospf_lsa_net)) / sizeof(u32); i++)
{
- DBG(" Working on router %I ", *(rts + i));
- tmp = ospf_hash_find(po->gr, oa->areaid, *(rts + i), *(rts + i), LSA_T_RT);
+ DBG(" Working on router %I ", ipa_from_u32(rts[i]));
+ tmp = ospf_hash_find(po->gr, oa->areaid, rts[i], rts[i], LSA_T_RT);
if (tmp != NULL)
DBG("Found :-)\n");
else
@@ -314,7 +314,7 @@ ospf_rt_spfa(struct ospf_area *oa)
{
if ((iface->state != OSPF_IS_PTP) || (iface->iface != tmp->nhi->iface) || (!ipa_equal(iface->vip, tmp->lb)))
{
- OSPF_TRACE(D_EVENTS, "Vlink peer %I found", tmp->lsa.id);
+ OSPF_TRACE(D_EVENTS, "Vlink peer %I found", ipa_from_u32(tmp->lsa.id));
ospf_iface_sm(iface, ISM_DOWN);
iface->iface = tmp->nhi->iface;
iface->vip = tmp->lb;
@@ -325,7 +325,7 @@ ospf_rt_spfa(struct ospf_area *oa)
{
if (iface->state > OSPF_IS_DOWN)
{
- OSPF_TRACE(D_EVENTS, "Vlink peer %I lost", iface->vid);
+ OSPF_TRACE(D_EVENTS, "Vlink peer %I lost", ipa_from_u32(iface->vid));
ospf_iface_sm(iface, ISM_DOWN);
}
}
@@ -372,7 +372,7 @@ link_back(struct ospf_area *oa, struct top_hash_entry *fol, struct top_hash_entr
}
break;
default:
- log("Unknown link type in router lsa. (rid = %I)", fol->lsa.id);
+ log("Unknown link type in router lsa. (rid = %I)", ipa_from_u32(fol->lsa.id));
break;
}
}
@@ -390,7 +390,7 @@ link_back(struct ospf_area *oa, struct top_hash_entry *fol, struct top_hash_entr
}
break;
default:
- bug("Unknown lsa type. (id = %I)", fol->lsa.id);
+ bug("Unknown lsa type. (id = %I)", ipa_from_u32(fol->lsa.id));
}
return 0;
}
@@ -480,7 +480,7 @@ ospf_rt_sum(struct ospf_area *oa)
int mlen = -1, type = -1;
union ospf_lsa_sum_tm *tm;
- OSPF_TRACE(D_EVENTS, "Starting routing table calculation for inter-area (area %I)", oa->areaid);
+ OSPF_TRACE(D_EVENTS, "Starting routing table calculation for inter-area (area %I)", ipa_from_u32(oa->areaid));
WALK_SLIST(en, po->lsal)
{
@@ -664,7 +664,8 @@ ospf_ext_spf(struct proto_ospf *po)
lt = (struct ospf_lsa_ext_tos *) (le + 1);
DBG("%s: Working on LSA. ID: %I, RT: %I, Type: %u, Mask %I\n",
- p->name, en->lsa.id, en->lsa.rt, en->lsa.type, le->netmask);
+ p->name, ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt),
+ en->lsa.type, le->netmask);
if ((lt->etm.metric & METRIC_MASK) == LSINFINITY)
continue;
@@ -673,7 +674,8 @@ ospf_ext_spf(struct proto_ospf *po)
if ((mlen < 0) || (mlen > 32))
{
log("%s: Invalid mask in LSA. ID: %I, RT: %I, Type: %u, Mask %I",
- p->name, en->lsa.id, en->lsa.rt, en->lsa.type, le->netmask);
+ p->name, ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt),
+ en->lsa.type, le->netmask);
continue;
}
nhi = NULL;
@@ -796,8 +798,8 @@ add_cand(list * l, struct top_hash_entry *en, struct top_hash_entry *par,
if (!link_back(oa, en, par))
return;
- DBG(" Adding candidate: rt: %I, id: %I, type: %u\n", en->lsa.rt,
- en->lsa.id, en->lsa.type);
+ DBG(" Adding candidate: rt: %I, id: %I, type: %u\n",
+ ipa_from_u32(en->lsa.rt), ipa_from_u32(en->lsa.id), en->lsa.type);
en->nhi = NULL;
en->nh = IPA_NONE;
@@ -860,7 +862,7 @@ calc_next_hop(struct top_hash_entry *en, struct top_hash_entry *par,
{
neighbor *nn;
DBG(" Next hop calculating for id: %I rt: %I type: %u\n",
- en->lsa.id, en->lsa.rt, en->lsa.type);
+ ipa_from_u32(en->lsa.id), ipa_from_u32(en->lsa.rt), en->lsa.type);
if (par == oa->rt)
{
@@ -915,7 +917,7 @@ calc_next_hop(struct top_hash_entry *en, struct top_hash_entry *par,
else
{ /* Parent is some RT neighbor */
log(L_ERR "Router's parent has no next hop. (EN=%I, PAR=%I)",
- en->lsa.id, par->lsa.id);
+ ipa_from_u32(en->lsa.id), ipa_from_u32(par->lsa.id));
/* I hope this would never happen */
return;
}
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index 371856f..51d585c 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -83,7 +83,7 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 * length)
struct ospf_neighbor *neigh;
DBG("%s: Originating RT_lsa body for area \"%I\".\n", po->proto.name,
- oa->areaid);
+ ipa_from_u32(oa->areaid));
ASSERT(po->lsab_used == 0);
rt = lsab_allocz(po, sizeof(struct ospf_lsa_rt));
@@ -244,7 +244,7 @@ originate_rt_lsa(struct ospf_area *oa)
* try to do it next tick.
*/
- OSPF_TRACE(D_EVENTS, "Originating RT_lsa for area \"%I\".", oa->areaid);
+ OSPF_TRACE(D_EVENTS, "Originating RT_lsa for area \"%I\".", ipa_from_u32(oa->areaid));
lsa.age = 0;
lsa.id = rtid;
@@ -464,7 +464,8 @@ flush_sum_lsa(struct ospf_area *oa, struct fib_node *fn, int type)
en->lsa.age = LSA_MAXAGE;
en->lsa.sn = LSA_MAXSEQNO;
lsasum_calculate(&en->lsa, sum);
- OSPF_TRACE(D_EVENTS, "Flushing summary lsa. (id=%I, type=%d)", en->lsa.id, en->lsa.type);
+ OSPF_TRACE(D_EVENTS, "Flushing summary lsa. (id=%I, type=%d)",
+ ipa_from_u32(en->lsa.id), en->lsa.type);
ospf_lsupd_flood(NULL, NULL, &en->lsa, NULL, oa, 1);
if (can_flush_lsa(po)) flush_lsa(en, po);
break;
@@ -914,8 +915,8 @@ ospf_dump_lsa(struct top_hash_entry *he, struct proto *p)
u32 i, max;
OSPF_TRACE(D_EVENTS, "- %1x %-1I %-1I %4u 0x%08x 0x%04x %-1I",
- he->lsa.type, he->lsa.id, he->lsa.rt, he->lsa.age,
- he->lsa.sn, he->lsa.checksum, he->oa ? he->oa->areaid : 0 );
+ he->lsa.type, ipa_from_u32(he->lsa.id), ipa_from_u32(he->lsa.rt),
+ he->lsa.age, he->lsa.sn, he->lsa.checksum, he->oa ? he->oa->areaid : 0 );
switch (he->lsa.type)
{
@@ -924,7 +925,7 @@ ospf_dump_lsa(struct top_hash_entry *he, struct proto *p)
rr = (struct ospf_lsa_rt_link *) (rt + 1);
for (i = 0; i < rt->links; i++)
- OSPF_TRACE(D_EVENTS, " - %1x %-1I %-1I %5u", rr[i].type, rr[i].id, rr[i].data, rr[i].metric);
+ OSPF_TRACE(D_EVENTS, " - %1x %-1I %-1I %5u", rr[i].type, ipa_from_u32(rr[i].id), ipa_from_u32(rr[i].data), rr[i].metric);
break;
case LSA_T_NET:
@@ -934,7 +935,7 @@ ospf_dump_lsa(struct top_hash_entry *he, struct proto *p)
sizeof(struct ospf_lsa_net)) / sizeof(u32);
for (i = 0; i < max; i++)
- OSPF_TRACE(D_EVENTS, " - %-1I", rts[i]);
+ OSPF_TRACE(D_EVENTS, " - %-1I", ipa_from_u32(rts[i]));
break;
default: