summaryrefslogtreecommitdiff
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-14 23:37:06 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-14 23:37:06 +0000
commit8cd7d3cb231bdc064427e002c329ef68fe61f5a5 (patch)
tree5102404b350904ddbd69b623d701d4fa8c087d82 /usr.bin/netstat
parentaffc92e2d4ec8eec31b765e6db362cd263180fa7 (diff)
use __KAME__ to determine kame-based kernel.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/Makefile4
-rw-r--r--usr.bin/netstat/if.c8
-rw-r--r--usr.bin/netstat/inet6.c6
-rw-r--r--usr.bin/netstat/route.c8
4 files changed, 12 insertions, 14 deletions
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index de1a06b1939..aa5f0ba014d 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2001/07/30 11:42:09 hugh Exp $
+# $OpenBSD: Makefile,v 1.11 2003/05/14 23:37:05 itojun Exp $
PROG= netstat
SRCS= if.c inet.c inet6.c ipx.c iso.c main.c mbuf.c mroute.c ns.c route.c \
@@ -14,6 +14,4 @@ INET6?= yes
CPPFLAGS+= -DINET6
.endif
-CPPFLAGS+= -DKAME_SCOPEID
-
.include <bsd.prog.mk>
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index c64e087eb6c..d6dc173a2ca 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.33 2003/02/01 01:51:31 deraadt Exp $ */
+/* $OpenBSD: if.c,v 1.34 2003/05/14 23:37:05 itojun Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else
-static char *rcsid = "$OpenBSD: if.c,v 1.33 2003/02/01 01:51:31 deraadt Exp $";
+static char *rcsid = "$OpenBSD: if.c,v 1.34 2003/05/14 23:37:05 itojun Exp $";
#endif
#endif /* not lint */
@@ -227,7 +227,7 @@ intpr(int interval, u_long ifnetaddr)
#ifdef INET6
case AF_INET6:
sin6 = (struct sockaddr_in6 *)sa;
-#ifdef KAME_SCOPEID
+#ifdef __KAME__
if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
sin6->sin6_scope_id =
ntohs(*(u_int16_t *)
@@ -262,7 +262,7 @@ intpr(int interval, u_long ifnetaddr)
m6.sin6_len = sizeof(struct sockaddr_in6);
m6.sin6_family = AF_INET6;
m6.sin6_addr = inm.in6m_addr;
-#ifdef KAME_SCOPEID
+#ifdef __KAME__
if (IN6_IS_ADDR_MC_LINKLOCAL(&m6.sin6_addr)) {
m6.sin6_scope_id =
ntohs(*(u_int16_t *)
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index d64fd827bed..d9e7a7070be 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet6.c,v 1.27 2003/03/16 19:10:46 sturm Exp $ */
+/* $OpenBSD: inet6.c,v 1.28 2003/05/14 23:37:05 itojun Exp $ */
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
/*
* Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94";
#else
-/*__RCSID("$OpenBSD: inet6.c,v 1.27 2003/03/16 19:10:46 sturm Exp $");*/
+/*__RCSID("$OpenBSD: inet6.c,v 1.28 2003/05/14 23:37:05 itojun Exp $");*/
/*__RCSID("KAME Id: inet6.c,v 1.10 2000/02/09 10:49:31 itojun Exp");*/
#endif
#endif /* not lint */
@@ -1117,7 +1117,7 @@ inet6name(struct in6_addr *in6p)
sin6.sin6_len = sizeof(sin6);
sin6.sin6_family = AF_INET6;
sin6.sin6_addr = *in6p;
-#ifdef KAME_SCOPEID
+#ifdef __KAME__
if (IN6_IS_ADDR_LINKLOCAL(in6p)) {
sin6.sin6_scope_id =
ntohs(*(u_int16_t *)&in6p->s6_addr[2]);
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 7d1058e8478..332a51de3f1 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.51 2003/02/12 14:41:08 jason Exp $ */
+/* $OpenBSD: route.c,v 1.52 2003/05/14 23:37:05 itojun Exp $ */
/* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94";
#else
-static char *rcsid = "$OpenBSD: route.c,v 1.51 2003/02/12 14:41:08 jason Exp $";
+static char *rcsid = "$OpenBSD: route.c,v 1.52 2003/05/14 23:37:05 itojun Exp $";
#endif
#endif /* not lint */
@@ -233,7 +233,7 @@ pr_family(int af)
#define WID_GW(af) 18 /* width of gateway column */
#else
/* width of destination/gateway column */
-#ifdef KAME_SCOPEID
+#if 1
/* strlen("fe80::aaaa:bbbb:cccc:dddd@gif0") == 30, strlen("/128") == 4 */
#define WID_DST(af) ((af) == AF_INET6 ? (nflag ? 34 : 18) : 18)
#define WID_GW(af) ((af) == AF_INET6 ? (nflag ? 30 : 18) : 18)
@@ -479,7 +479,7 @@ p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width)
case AF_INET6:
{
struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)sa;
-#ifdef KAME_SCOPEID
+#ifdef __KAME__
struct in6_addr *in6 = &sa6->sin6_addr;
/*