rtadvd: use %u to print unsigned variables
This commit is contained in:
parent
b553c427d4
commit
4dae353ba2
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: dump.c,v 1.16 2018/04/20 10:39:37 roy Exp $ */
|
/* $NetBSD: dump.c,v 1.17 2018/11/16 08:57:10 ozaki-r Exp $ */
|
||||||
/* $KAME: dump.c,v 1.34 2004/06/14 05:35:59 itojun Exp $ */
|
/* $KAME: dump.c,v 1.34 2004/06/14 05:35:59 itojun Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -138,23 +138,23 @@ if_dump(void)
|
|||||||
if (rai->advlinkopt)
|
if (rai->advlinkopt)
|
||||||
fprintf(fp, " Link-layer address: %s\n",
|
fprintf(fp, " Link-layer address: %s\n",
|
||||||
ether_str(rai->sdl));
|
ether_str(rai->sdl));
|
||||||
fprintf(fp, " MTU: %d\n", rai->phymtu);
|
fprintf(fp, " MTU: %u\n", rai->phymtu);
|
||||||
|
|
||||||
/* Router configuration variables */
|
/* Router configuration variables */
|
||||||
fprintf(fp, " DefaultLifetime: %d, MaxAdvInterval: %d, "
|
fprintf(fp, " DefaultLifetime: %u, MaxAdvInterval: %u, "
|
||||||
"MinAdvInterval: %d\n", rai->lifetime, rai->maxinterval,
|
"MinAdvInterval: %u\n", rai->lifetime, rai->maxinterval,
|
||||||
rai->mininterval);
|
rai->mininterval);
|
||||||
fprintf(fp, " Flags: %s%s%s, ",
|
fprintf(fp, " Flags: %s%s%s, ",
|
||||||
rai->managedflg ? "M" : "", rai->otherflg ? "O" : "",
|
rai->managedflg ? "M" : "", rai->otherflg ? "O" : "",
|
||||||
"");
|
"");
|
||||||
fprintf(fp, "Preference: %s, ",
|
fprintf(fp, "Preference: %s, ",
|
||||||
rtpref_str[(rai->rtpref >> 3) & 0xff]);
|
rtpref_str[(rai->rtpref >> 3) & 0xff]);
|
||||||
fprintf(fp, "MTU: %d\n", rai->linkmtu);
|
fprintf(fp, "MTU: %u\n", rai->linkmtu);
|
||||||
fprintf(fp, " ReachableTime: %d, RetransTimer: %d, "
|
fprintf(fp, " ReachableTime: %u, RetransTimer: %u, "
|
||||||
"CurHopLimit: %d\n", rai->reachabletime,
|
"CurHopLimit: %u\n", rai->reachabletime,
|
||||||
rai->retranstimer, rai->hoplimit);
|
rai->retranstimer, rai->hoplimit);
|
||||||
if (rai->clockskew)
|
if (rai->clockskew)
|
||||||
fprintf(fp, " Clock skew: %dsec\n",
|
fprintf(fp, " Clock skew: %usec\n",
|
||||||
rai->clockskew);
|
rai->clockskew);
|
||||||
TAILQ_FOREACH(pfx, &rai->prefix, next) {
|
TAILQ_FOREACH(pfx, &rai->prefix, next) {
|
||||||
if (pfx == TAILQ_FIRST(&rai->prefix))
|
if (pfx == TAILQ_FIRST(&rai->prefix))
|
||||||
@ -176,8 +176,7 @@ if_dump(void)
|
|||||||
if (pfx->validlifetime == ND6_INFINITE_LIFETIME)
|
if (pfx->validlifetime == ND6_INFINITE_LIFETIME)
|
||||||
fprintf(fp, "vltime: infinity");
|
fprintf(fp, "vltime: infinity");
|
||||||
else
|
else
|
||||||
fprintf(fp, "vltime: %ld",
|
fprintf(fp, "vltime: %u", pfx->validlifetime);
|
||||||
(long)pfx->validlifetime);
|
|
||||||
if (pfx->vltimeexpire != 0)
|
if (pfx->vltimeexpire != 0)
|
||||||
fprintf(fp, "(decr,expire %lld), ", (long long)
|
fprintf(fp, "(decr,expire %lld), ", (long long)
|
||||||
(pfx->vltimeexpire > now.tv_sec ?
|
(pfx->vltimeexpire > now.tv_sec ?
|
||||||
@ -187,8 +186,7 @@ if_dump(void)
|
|||||||
if (pfx->preflifetime == ND6_INFINITE_LIFETIME)
|
if (pfx->preflifetime == ND6_INFINITE_LIFETIME)
|
||||||
fprintf(fp, "pltime: infinity");
|
fprintf(fp, "pltime: infinity");
|
||||||
else
|
else
|
||||||
fprintf(fp, "pltime: %ld",
|
fprintf(fp, "pltime: %u", pfx->preflifetime);
|
||||||
(long)pfx->preflifetime);
|
|
||||||
if (pfx->pltimeexpire != 0)
|
if (pfx->pltimeexpire != 0)
|
||||||
fprintf(fp, "(decr,expire %lld), ", (long long)
|
fprintf(fp, "(decr,expire %lld), ", (long long)
|
||||||
(pfx->pltimeexpire > now.tv_sec ?
|
(pfx->pltimeexpire > now.tv_sec ?
|
||||||
|
Loading…
Reference in New Issue
Block a user