[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Weird stuff in 'netstat -rs'
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Weird stuff in 'netstat -rs'
- From: Liam Gudbens <xanax_(_at_)_enteract_(_dot_)_com>
- Date: Wed, 3 Feb 1999 18:20:54 -0600 (CST)
On Wed, 3 Feb 1999, Kjell Wooding wrote:
> >routing:
> > 0 bad routing redirects
> > 0 dynamically created routes
> > 0 new gateways due to redirects
> > 4294960290 destinations found unreachable
> > 0 uses of a wildcard route
>
> just a guess:
>
> from /usr/src/net/route.h:
>
> /*
> * Routing statistics.
> */
> struct rtstat {
> short rts_badredirect; /* bogus redirect calls */
> short rts_dynamic; /* routes created by redirects */
> short rts_newgateway; /* routes modified by redirects */
> short rts_unreach; /* lookups which failed */
> short rts_wildcard; /* lookups satisfied by a wildcard */
> };
>
> short = 16 bit signed, if I'm not mistaken...
>
> the printf call in /usr/src/usr.bin/netstat/route.c does a:
>
> printf("\t%u destination%s found unreachable\n",
> rtstat.rts_unreach, plural(rtstat.rts_unreach));
>
> which is an unsigned value.
>
> -kj
(root)netstat>diff -u route.c.orig route.c
--- route.c.orig Wed Feb 3 18:33:18 1999
+++ route.c Wed Feb 3 18:33:40 1999
@@ -655,15 +655,15 @@
}
kread(off, (char *)&rtstat, sizeof (rtstat));
printf("routing:\n");
- printf("\t%u bad routing redirect%s\n",
+ printf("\t%i bad routing redirect%s\n",
rtstat.rts_badredirect, plural(rtstat.rts_badredirect));
- printf("\t%u dynamically created route%s\n",
+ printf("\t%i dynamically created route%s\n",
rtstat.rts_dynamic, plural(rtstat.rts_dynamic));
- printf("\t%u new gateway%s due to redirects\n",
+ printf("\t%i new gateway%s due to redirects\n",
rtstat.rts_newgateway, plural(rtstat.rts_newgateway));
- printf("\t%u destination%s found unreachable\n",
+ printf("\t%i destination%s found unreachable\n",
rtstat.rts_unreach, plural(rtstat.rts_unreach));
- printf("\t%u use%s of a wildcard route\n",
+ printf("\t%i use%s of a wildcard route\n",
rtstat.rts_wildcard, plural(rtstat.rts_wildcard));
(root)netstat>./netstat -rs
routing:
0 bad routing redirects
0 dynamically created routes
0 new gateways due to redirects
-19740 destinations found unreachable
0 uses of a wildcard route
something is still wrong...
Visit your host, monkey.org