Many %u changer into %I.
This commit is contained in:
parent
89929e9daa
commit
4472402551
3 changed files with 26 additions and 26 deletions
|
@ -38,7 +38,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
|
|||
op->length=htons(length);
|
||||
ospf_pkt_finalize(ifa, op);
|
||||
sk_send_to(ifa->ip_sk,length, n->ip, OSPF_PROTO);
|
||||
debug("%s: DB_DES (I) sent for %u.\n", p->name, n->rid);
|
||||
debug("%s: DB_DES (I) sent for %I.\n", p->name, n->rid);
|
||||
break;
|
||||
|
||||
case NEIGHBOR_EXCHANGE:
|
||||
|
@ -128,7 +128,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
|
|||
}
|
||||
|
||||
sk_send_to(ifa->ip_sk,length, n->ip, OSPF_PROTO);
|
||||
debug("%s: DB_DES sent to %u.\n", p->name, n->rid);
|
||||
debug("%s: DB_DES sent to %I.\n", p->name, n->rid);
|
||||
if(n->myimms.bit.ms) tm_start(n->rxmt_timer,ifa->rxmtint);
|
||||
else
|
||||
{
|
||||
|
@ -158,7 +158,7 @@ rxmt_timer_hook(timer *timer)
|
|||
n=(struct ospf_neighbor *)timer->data;
|
||||
ifa=n->ifa;
|
||||
p=(struct proto *)(ifa->proto);
|
||||
debug("%s: RXMT timer fired on interface %s for neigh: %u.\n",
|
||||
debug("%s: RXMT timer fired on interface %s for neigh: %I.\n",
|
||||
p->name, ifa->iface->name, n->rid);
|
||||
if(n->state<NEIGHBOR_LOADING) ospf_dbdes_tx(n);
|
||||
else
|
||||
|
@ -218,14 +218,14 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
|
||||
if((n=find_neigh(ifa, nrid))==NULL)
|
||||
{
|
||||
debug("%s: Received dbdes from unknown neigbor! (%u)\n", p->name,
|
||||
debug("%s: Received dbdes from unknown neigbor! (%I)\n", p->name,
|
||||
nrid);
|
||||
return ;
|
||||
}
|
||||
|
||||
if(ifa->iface->mtu<size)
|
||||
{
|
||||
debug("%s: Received dbdes larger than MTU from (%u)!\n", p->name, nrid);
|
||||
debug("%s: Received dbdes larger than MTU from (%I)!\n", p->name, nrid);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
case NEIGHBOR_DOWN:
|
||||
case NEIGHBOR_ATTEMPT:
|
||||
case NEIGHBOR_2WAY:
|
||||
debug("%s: Received dbdes from %u in bad state. (%u)\n", p->name, nrid);
|
||||
debug("%s: Received dbdes from %I in bad state.\n", p->name, nrid);
|
||||
return;
|
||||
break;
|
||||
case NEIGHBOR_INIT:
|
||||
|
@ -251,7 +251,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
n->options=ps->options;
|
||||
n->myimms.bit.ms=0;
|
||||
n->imms.byte=ps->imms.byte;
|
||||
debug("%s: I'm slave to %u. \n", p->name, nrid);
|
||||
debug("%s: I'm slave to %I. \n", p->name, nrid);
|
||||
ospf_neigh_sm(n, INM_NEGDONE);
|
||||
tm_stop(n->rxmt_timer);
|
||||
ospf_dbdes_tx(n);
|
||||
|
@ -266,12 +266,12 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
n->options=ps->options;
|
||||
n->ddr=ntohl(ps->ddseq)-1;
|
||||
n->imms.byte=ps->imms.byte;
|
||||
debug("%s: I'm master to %u. \n", p->name, nrid);
|
||||
debug("%s: I'm master to %I. \n", p->name, nrid);
|
||||
ospf_neigh_sm(n, INM_NEGDONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("%s: Nothing happend to %u (imms=%u)", p->name, nrid,
|
||||
debug("%s: Nothing happend to %I (imms=%u)", p->name, nrid,
|
||||
ps->imms.byte);
|
||||
break;
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
(ntohl(ps->ddseq)==n->ddr))
|
||||
{
|
||||
/* Duplicate packet */
|
||||
debug("%s: Received duplicate dbdes from (%u)!\n", p->name, nrid);
|
||||
debug("%s: Received duplicate dbdes from (%I)!\n", p->name, nrid);
|
||||
if(n->imms.bit.ms==0)
|
||||
{
|
||||
ospf_dbdes_tx(n);
|
||||
|
@ -355,7 +355,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
if((ps->imms.byte==n->imms.byte) && (ps->options=n->options) &&
|
||||
(ps->ddseq==n->dds)) /* Only duplicate are accepted */
|
||||
{
|
||||
debug("%s: Received duplicate dbdes from (%u)!\n", p->name, nrid);
|
||||
debug("%s: Received duplicate dbdes from (%I)!\n", p->name, nrid);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -364,7 +364,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
}
|
||||
break;
|
||||
defaut:
|
||||
die("%s: Received dbdes from %u in unknown state. (%u)\n", p->name, nrid);
|
||||
die("%s: Received dbdes from %I in unknown state.\n", p->name, nrid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ ospf_lsreq_tx(struct ospf_neighbor *n)
|
|||
lsh->type=en->lsa.type;
|
||||
lsh->rt=htonl(en->lsa.rt);
|
||||
lsh->id=htonl(en->lsa.id);
|
||||
DBG("Requesting %uth LSA: Type: %u, Id: %u, RT: %u\n",i, en->lsa.type,
|
||||
DBG("Requesting %uth LSA: Type: %u, Id: %I, RT: %I\n",i, en->lsa.type,
|
||||
en->lsa.id, en->lsa.rt);
|
||||
lsh++;
|
||||
if(sn==STAIL(n->lsrql)) break;
|
||||
|
@ -54,7 +54,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);
|
||||
DBG("Lsreq send to: %u\n", n->rid);
|
||||
DBG("Lsreq send to: %I\n", n->rid);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -67,7 +67,7 @@ lsrr_timer_hook(timer *timer)
|
|||
n=(struct ospf_neighbor *)timer->data;
|
||||
ifa=n->ifa;
|
||||
p=(struct proto *)(ifa->proto);
|
||||
debug("%s: LSRR timer fired on interface %s for neigh: %u.\n",
|
||||
debug("%s: LSRR timer fired on interface %s for neigh: %I.\n",
|
||||
p->name, ifa->iface->name, n->rid);
|
||||
ospf_lsreq_tx(n);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ ospf_lsreq_rx(struct ospf_lsreq_packet *ps, struct proto *p,
|
|||
|
||||
if((n=find_neigh(ifa, nrid))==NULL)
|
||||
{
|
||||
debug("%s: Received lsreq from unknown neigbor! (%u)\n", p->name,
|
||||
debug("%s: Received lsreq from unknown neigbor! (%I)\n", p->name,
|
||||
nrid);
|
||||
return ;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ ospf_lsreq_rx(struct ospf_lsreq_packet *ps, struct proto *p,
|
|||
for(i=0;i<(length-sizeof(struct ospf_lsreq_packet))/
|
||||
sizeof(struct ospf_lsreq_header);i++);
|
||||
{
|
||||
DBG("Processing LSA: ID=%u, Type=%u, Router=%u\n", ntohl(lsh->id),
|
||||
DBG("Processing LSA: ID=%I, Type=%u, Router=%I\n", ntohl(lsh->id),
|
||||
lsh->type, ntohl(lsh->rt));
|
||||
llsh=sl_alloc(upslab);
|
||||
llsh->lsh.id=ntohl(lsh->id);
|
||||
|
|
|
@ -59,14 +59,14 @@ flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
|
|||
break;
|
||||
case CMP_SAME:
|
||||
s_rem_node(SNODE en);
|
||||
DBG("Removing from lsreq list for neigh %u\n", nn->rid);
|
||||
DBG("Removing from lsreq list for neigh %I\n", nn->rid);
|
||||
ospf_hash_delete(nn->lsrqh,en);
|
||||
if(EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE);
|
||||
continue;
|
||||
break;
|
||||
case CMP_NEWER:
|
||||
s_rem_node(SNODE en);
|
||||
DBG("Removing from lsreq list for neigh %u\n", nn->rid);
|
||||
DBG("Removing from lsreq list for neigh %I\n", nn->rid);
|
||||
ospf_hash_delete(nn->lsrqh,en);
|
||||
if(EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE);
|
||||
break;
|
||||
|
@ -162,7 +162,7 @@ ospf_lsupd_tx_list(struct ospf_neighbor *n, list *l)
|
|||
WALK_LIST(llsh, *l)
|
||||
{
|
||||
en=ospf_hash_find(n->ifa->oa->gr,llsh->lsh.id,llsh->lsh.rt,llsh->lsh.type);
|
||||
DBG("Sending ID=%u, Type=%u, RT=%u\n", llsh->lsh.id, llsh->lsh.type,
|
||||
DBG("Sending ID=%I, Type=%u, RT=%I\n", llsh->lsh.id, llsh->lsh.type,
|
||||
llsh->lsh.rt);
|
||||
if((len+sizeof(struct ospf_lsa_header)+en->lsa.length)>n->ifa->iface->mtu)
|
||||
{
|
||||
|
@ -217,13 +217,13 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
|
|||
|
||||
if((n=find_neigh(ifa, nrid))==NULL)
|
||||
{
|
||||
debug("%s: Received lsupd from unknown neigbor! (%u)\n", p->name,
|
||||
debug("%s: Received lsupd from unknown neigbor! (%I)\n", p->name,
|
||||
nrid);
|
||||
return ;
|
||||
}
|
||||
if(n->state<NEIGHBOR_EXCHANGE)
|
||||
{
|
||||
debug("%s: Received lsupd in lesser state than EXCHANGE from (%u)\n",
|
||||
debug("%s: Received lsupd in lesser state than EXCHANGE from (%I)\n",
|
||||
p->name);
|
||||
return;
|
||||
}
|
||||
|
@ -239,23 +239,23 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
|
|||
/* pg 143 (1) */
|
||||
if(lsa->checksum!=lsasum_check(lsa,NULL,po))
|
||||
{
|
||||
log("Received bad lsa checksum from %u\n",n->rid);
|
||||
log("Received bad lsa checksum from %I\n",n->rid);
|
||||
continue;
|
||||
}
|
||||
/* pg 143 (2) */
|
||||
if((lsa->type<LSA_T_RT)||(lsa->type>LSA_T_EXT))
|
||||
{
|
||||
log("Unknown LSA type from %u\n",n->rid);
|
||||
log("Unknown LSA type from %I\n",n->rid);
|
||||
continue;
|
||||
}
|
||||
/* pg 143 (3) */
|
||||
if((lsa->type==LSA_T_EXT)&&oa->stub)
|
||||
{
|
||||
log("Received External LSA in stub area from %u\n",n->rid);
|
||||
log("Received External LSA in stub area from %I\n",n->rid);
|
||||
continue;
|
||||
}
|
||||
ntohlsah(lsa,&lsatmp);
|
||||
DBG("Processing update Type: %u ID: %u RT: %u\n",lsatmp.type,
|
||||
DBG("Processing update Type: %u ID: %I RT: %I\n",lsatmp.type,
|
||||
lsatmp.id, lsatmp.rt);
|
||||
lsadb=ospf_hash_find_header(oa->gr, &lsatmp);
|
||||
|
||||
|
|
Loading…
Reference in a new issue