X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/6e549c8f1db4e716345f21df3be77b13698d6d90..d1cfb8207d6ffbde8eb0a0cfa5d4f00b2c0ba59f:/usr/src/usr.bin/netstat/route.c diff --git a/usr/src/usr.bin/netstat/route.c b/usr/src/usr.bin/netstat/route.c index a509740810..6bf5de884d 100644 --- a/usr/src/usr.bin/netstat/route.c +++ b/usr/src/usr.bin/netstat/route.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)route.c 5.23 (Berkeley) %G%"; +static char sccsid[] = "@(#)route.c 5.25 (Berkeley) %G%"; #endif /* not lint */ #include @@ -30,10 +30,10 @@ static char sccsid[] = "@(#)route.c 5.23 (Berkeley) %G%"; #include #include #include +#include #include "netstat.h" -#define kget(p, d) \ - (kread((off_t)(p), (char *)&(d), sizeof (d))) +#define kget(p, d) (kread((u_long)(p), (char *)&(d), sizeof (d))) /* * Definitions for showing gateway flags. @@ -45,13 +45,17 @@ struct bits { { RTF_UP, 'U' }, { RTF_GATEWAY, 'G' }, { RTF_HOST, 'H' }, + { RTF_REJECT, 'R' }, { RTF_DYNAMIC, 'D' }, { RTF_MODIFIED, 'M' }, + { RTF_DONE, 'd' }, /* Completed -- for routing messages only */ + { RTF_MASK, 'm' }, /* Mask Present -- for routing messages only */ { RTF_CLONING, 'C' }, { RTF_XRESOLVE, 'X' }, { RTF_LLINFO, 'L' }, - { RTF_REJECT, 'R' }, { RTF_STATIC, 'S' }, + { RTF_PROTO1, '1' }, + { RTF_PROTO2, '2' }, { 0 } }; @@ -81,7 +85,7 @@ static void p_rtentry __P((struct rtentry *)); */ void routepr(rtree) - off_t rtree; + u_long rtree; { struct radix_node_head *rnh, head; int i; @@ -174,7 +178,7 @@ kgetsa(dst) kget(dst, pt_u.u_sa); if (pt_u.u_sa.sa_len > sizeof (pt_u.u_sa)) - kread((off_t)dst, (char *)pt_u.u_data, pt_u.u_sa.sa_len); + kread((u_long)dst, (char *)pt_u.u_data, pt_u.u_sa.sa_len); return (&pt_u.u_sa); } @@ -413,7 +417,7 @@ p_rtentry(rt) if (rt->rt_ifp) { if (rt->rt_ifp != lastif) { kget(rt->rt_ifp, ifnet); - kread((off_t)ifnet.if_name, name, 16); + kread((u_long)ifnet.if_name, name, 16); lastif = rt->rt_ifp; } printf(" %.15s%d%s", name, ifnet.if_unit, @@ -525,7 +529,7 @@ netname(in, mask) */ void rt_stats(off) - off_t off; + u_long off; { struct rtstat rtstat;