projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
not every value return in an nlist structure was being
[unix-history]
/
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
a509740
..
6bf5de8
100644
(file)
--- a/
usr/src/usr.bin/netstat/route.c
+++ b/
usr/src/usr.bin/netstat/route.c
@@
-6,7
+6,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)route.c 5.2
3
(Berkeley) %G%";
+static char sccsid[] = "@(#)route.c 5.2
5
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-30,10
+30,10
@@
static char sccsid[] = "@(#)route.c 5.23 (Berkeley) %G%";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "netstat.h"
#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.
/*
* Definitions for showing gateway flags.
@@
-45,13
+45,17
@@
struct bits {
{ RTF_UP, 'U' },
{ RTF_GATEWAY, 'G' },
{ RTF_HOST, 'H' },
{ RTF_UP, 'U' },
{ RTF_GATEWAY, 'G' },
{ RTF_HOST, 'H' },
+ { RTF_REJECT, 'R' },
{ RTF_DYNAMIC, 'D' },
{ RTF_MODIFIED, 'M' },
{ 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_CLONING, 'C' },
{ RTF_XRESOLVE, 'X' },
{ RTF_LLINFO, 'L' },
- { RTF_REJECT, 'R' },
{ RTF_STATIC, 'S' },
{ RTF_STATIC, 'S' },
+ { RTF_PROTO1, '1' },
+ { RTF_PROTO2, '2' },
{ 0 }
};
{ 0 }
};
@@
-81,7
+85,7
@@
static void p_rtentry __P((struct rtentry *));
*/
void
routepr(rtree)
*/
void
routepr(rtree)
-
off_t
rtree;
+
u_long
rtree;
{
struct radix_node_head *rnh, head;
int i;
{
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))
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);
}
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);
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,
lastif = rt->rt_ifp;
}
printf(" %.15s%d%s", name, ifnet.if_unit,
@@
-525,7
+529,7
@@
netname(in, mask)
*/
void
rt_stats(off)
*/
void
rt_stats(off)
-
off_t
off;
+
u_long
off;
{
struct rtstat rtstat;
{
struct rtstat rtstat;