summaryrefslogtreecommitdiff
path: root/usr.bin/netstat/if.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-12-14 18:35:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-12-14 18:35:47 +0000
commitce45fd275665d6471b8c9fbeeb283d1b1aea4beb (patch)
tree1bea19ae8cc3a620014e7a91f0beaf04c677fee2 /usr.bin/netstat/if.c
parent3d4f2590efbb3139894368b615391ed13bc12ad1 (diff)
remove 21 nlist variables, and instead use sysctl to query the kernel
turn on INET6 the default (remove the #ifdef's) ok claudio reyk
Diffstat (limited to 'usr.bin/netstat/if.c')
-rw-r--r--usr.bin/netstat/if.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index bd5a77b21a3..9e08b602b92 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.53 2007/09/11 16:14:41 mk Exp $ */
+/* $OpenBSD: if.c,v 1.54 2007/12/14 18:35:46 deraadt Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else
-static char *rcsid = "$OpenBSD: if.c,v 1.53 2007/09/11 16:14:41 mk Exp $";
+static char *rcsid = "$OpenBSD: if.c,v 1.54 2007/12/14 18:35:46 deraadt Exp $";
#endif
#endif /* not lint */
@@ -77,9 +77,7 @@ intpr(int interval, u_long ifnetaddr)
union {
struct ifaddr ifa;
struct in_ifaddr in;
-#ifdef INET6
struct in6_ifaddr in6;
-#endif
} ifaddr;
u_int64_t total;
u_long ifaddraddr;
@@ -120,9 +118,7 @@ intpr(int interval, u_long ifnetaddr)
ifaddraddr = 0;
while (ifnetaddr || ifaddraddr) {
struct sockaddr_in *sin;
-#ifdef INET6
struct sockaddr_in6 *sin6;
-#endif
char *cp;
int n, m;
@@ -212,7 +208,6 @@ intpr(int interval, u_long ifnetaddr)
}
}
break;
-#ifdef INET6
case AF_INET6:
sin6 = (struct sockaddr_in6 *)sa;
#ifdef __KAME__
@@ -270,7 +265,6 @@ intpr(int interval, u_long ifnetaddr)
}
}
break;
-#endif
case AF_APPLETALK:
printf("atlk:%-12s",atalk_print(sa,0x10) );
printf("%-12s ",atalk_print(sa,0x0b) );