diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-03-30 08:23:48 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-03-30 08:23:48 +0000 |
commit | e821da7bc4373cb3e0f90a115ca88a618d555eab (patch) | |
tree | 4a4971b9da5824153f819a01a4ebfbb99a41294a /usr.bin/netstat/route.c | |
parent | 6c14ffca4e8e0ddbde9975cdcbfe9b54731763aa (diff) |
kill -S; ok henning
Diffstat (limited to 'usr.bin/netstat/route.c')
-rw-r--r-- | usr.bin/netstat/route.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 76160ecfc13..1e8a77d43ec 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.67 2005/03/25 17:01:04 jaredy Exp $ */ +/* $OpenBSD: route.c,v 1.68 2005/03/30 08:23:47 jaredy Exp $ */ /* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else -static char *rcsid = "$OpenBSD: route.c,v 1.67 2005/03/25 17:01:04 jaredy Exp $"; +static char *rcsid = "$OpenBSD: route.c,v 1.68 2005/03/30 08:23:47 jaredy Exp $"; #endif #endif /* not lint */ @@ -110,7 +110,6 @@ struct bits { { RTF_PROTO2, '2' }, { RTF_PROTO3, '3' }, { RTF_CLONED, 'c' }, - { RTF_SOURCE, 's' }, { 0 } }; @@ -137,7 +136,6 @@ static void p_sockaddr(struct sockaddr *, struct sockaddr *, int, int); static void p_flags(int, char *); static void p_rtentry(struct rtentry *); static void encap_print(struct rtentry *); -static void sa_src2dst(struct sockaddr *); /* * Print routing tables. @@ -249,12 +247,8 @@ pr_rthdr(int af) if (Aflag) printf("%-*.*s ", PLEN, PLEN, "Address"); - if (Sflag) - printf("%-*.*s ", - WID_DST(af), WID_DST(af), "Source"); - printf("%-*.*s ", - WID_DST(af), WID_DST(af), "Destination"); - printf("%-*.*s %-6.6s %6.6s %6.6s %6.6s %s\n", + printf("%-*.*s %-*.*s %-6.6s %6.6s %6.6s %6.6s %s\n", + WID_DST(af), WID_DST(af), "Destination", WID_GW(af), WID_GW(af), "Gateway", "Flags", "Refs", "Use", "Mtu", "Interface"); } @@ -631,13 +625,6 @@ p_rtentry(struct rtentry *rt) } else mask = 0; - if (Sflag && sa->sa_family == AF_INET) { - sa_src2dst(sa); - sa_src2dst(mask); - p_sockaddr(sa, mask, rt->rt_flags, WID_DST(sa->sa_family)); - sa_src2dst(sa); - sa_src2dst(mask); - } p_sockaddr(sa, mask, rt->rt_flags, WID_DST(sa->sa_family)); p_sockaddr(kgetsa(rt->rt_gateway), 0, RTF_HOST, WID_GW(sa->sa_family)); p_flags(rt->rt_flags, "%-6.6s "); @@ -1153,16 +1140,3 @@ upHex(char *p0) break; } } - -void -sa_src2dst(struct sockaddr *sa) -{ - struct sockaddr_rtin *rtin = satortin(sa); - struct in_addr tmp; - - if (sa != NULL) { - tmp = rtin->rtin_dst; - rtin->rtin_dst = rtin->rtin_src; - rtin->rtin_src = tmp; - } -} |