From b95181fc9b5c8e1c0a8f1b66404fb4ff5ad473db Mon Sep 17 00:00:00 2001 From: itojun Date: Tue, 16 Nov 2004 05:59:32 +0000 Subject: [PATCH] NI_WITHSCOPEID was not picked up by IETF standardization process. --- sbin/ifconfig/ifconfig.c | 12 ++---------- sbin/route/route.c | 12 ++---------- usr.bin/fstat/fstat.c | 8 ++------ usr.bin/netstat/if.c | 8 ++------ usr.bin/netstat/inet6.c | 8 ++------ usr.bin/netstat/route.c | 8 ++------ usr.bin/telnet/commands.c | 8 ++------ usr.sbin/ifmcstat/ifmcstat.c | 6 +----- usr.sbin/mountd/mountd.c | 8 ++------ 9 files changed, 17 insertions(+), 61 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index aad756f0c948..e57a76817078 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $NetBSD: ifconfig.c,v 1.147 2004/11/11 20:37:18 dsl Exp $ */ +/* $NetBSD: ifconfig.c,v 1.148 2004/11/16 05:59:32 itojun Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #else -__RCSID("$NetBSD: ifconfig.c,v 1.147 2004/11/11 20:37:18 dsl Exp $"); +__RCSID("$NetBSD: ifconfig.c,v 1.148 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -2035,11 +2035,7 @@ tunnel_status(void) char psrcaddr[NI_MAXHOST]; char pdstaddr[NI_MAXHOST]; const char *ver = ""; -#ifdef NI_WITHSCOPEID - const int niflag = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflag = NI_NUMERICHOST; -#endif struct if_laddrreq req; psrcaddr[0] = pdstaddr[0] = '\0'; @@ -2201,11 +2197,7 @@ in6_alias(struct in6_ifreq *creq) struct sockaddr_in6 *sin6; char hbuf[NI_MAXHOST]; u_int32_t scopeid; -#ifdef NI_WITHSCOPEID - const int niflag = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflag = NI_NUMERICHOST; -#endif /* Get the non-alias address for this interface. */ getsock(AF_INET6); diff --git a/sbin/route/route.c b/sbin/route/route.c index 10583e8c1daa..8501df0a0a2f 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.73 2004/05/15 14:13:36 itojun Exp $ */ +/* $NetBSD: route.c,v 1.74 2004/11/16 05:59:32 itojun Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1991, 1993\n\ #if 0 static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: route.c,v 1.73 2004/05/15 14:13:36 itojun Exp $"); +__RCSID("$NetBSD: route.c,v 1.74 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -541,11 +541,7 @@ routename(sa, nm, flags) struct sockaddr_in6 sin6; int niflags; -#ifdef NI_WITHSCOPEID - niflags = NI_WITHSCOPEID; -#else niflags = 0; -#endif if (nflag) niflags |= NI_NUMERICHOST; memset(&sin6, 0, sizeof(sin6)); @@ -699,11 +695,7 @@ netname(sa, nm) struct sockaddr_in6 sin6; int niflags; -#ifdef NI_WITHSCOPEID - niflags = NI_WITHSCOPEID; -#else niflags = 0; -#endif if (nflag) niflags |= NI_NUMERICHOST; memset(&sin6, 0, sizeof(sin6)); diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 74383812a31e..1bc364ec4f55 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.68 2004/10/30 17:29:47 dsl Exp $ */ +/* $NetBSD: fstat.c,v 1.69 2004/11/16 05:59:32 itojun Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\ #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.68 2004/10/30 17:29:47 dsl Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.69 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -727,11 +727,7 @@ inet6_addrstr(p) { struct sockaddr_in6 sin6; static char hbuf[NI_MAXHOST]; -#ifdef NI_WITHSCOPEID - const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflags = NI_NUMERICHOST; -#endif memset(&sin6, 0, sizeof(sin6)); sin6.sin6_family = AF_INET6; diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 01cbad963712..58fa0e4d5d5f 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.57 2003/11/15 11:54:34 ragge Exp $ */ +/* $NetBSD: if.c,v 1.58 2004/11/16 05:59:32 itojun Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -__RCSID("$NetBSD: if.c,v 1.57 2003/11/15 11:54:34 ragge Exp $"); +__RCSID("$NetBSD: if.c,v 1.58 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -96,11 +96,7 @@ intpr(interval, ifnetaddr, pfunc) char name[IFNAMSIZ + 1]; /* + 1 for `*' */ char hbuf[NI_MAXHOST]; /* for getnameinfo() */ #ifdef INET6 -#ifdef NI_WITHSCOPEID - const int niflag = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflag = NI_NUMERICHOST; -#endif #endif if (ifnetaddr == 0) { diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 772003b52139..92153ee548fb 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.31 2003/11/06 06:11:48 itojun Exp $ */ +/* $NetBSD: inet6.c,v 1.32 2004/11/16 05:59:32 itojun Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet6.c,v 1.31 2003/11/06 06:11:48 itojun Exp $"); +__RCSID("$NetBSD: inet6.c,v 1.32 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -1195,11 +1195,7 @@ inet6name(in6p) static int first = 1; char hbuf[NI_MAXHOST]; struct sockaddr_in6 sin6; -#ifdef NI_WITHSCOPEID - const int niflag = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflag = NI_NUMERICHOST; -#endif if (first && !numeric_addr) { first = 0; diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 8afbb3ab31ad..1f28456504ff 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.63 2003/08/07 11:15:21 agc Exp $ */ +/* $NetBSD: route.c,v 1.64 2004/11/16 05:59:32 itojun Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else -__RCSID("$NetBSD: route.c,v 1.63 2003/08/07 11:15:21 agc Exp $"); +__RCSID("$NetBSD: route.c,v 1.64 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -798,11 +798,7 @@ netname6(sa6, mask) u_char *p, *q; u_char *lim; int masklen, final = 0, illegal = 0; -#ifdef NI_WITHSCOPEID - int flag = NI_WITHSCOPEID; -#else int flag = 0; -#endif int error; struct sockaddr_in6 sin6; diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index e0d1d4188c66..d996013eaf33 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -1,4 +1,4 @@ -/* $NetBSD: commands.c,v 1.59 2004/03/20 23:26:05 heas Exp $ */ +/* $NetBSD: commands.c,v 1.60 2004/11/16 05:59:32 itojun Exp $ */ /* * Copyright (C) 1997 and 1998 WIDE Project. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: commands.c,v 1.59 2004/03/20 23:26:05 heas Exp $"); +__RCSID("$NetBSD: commands.c,v 1.60 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -2150,11 +2150,7 @@ static const char * sockaddr_ntop(struct sockaddr *sa) { static char addrbuf[NI_MAXHOST]; -#ifdef NI_WITHSCOPEID - const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflags = NI_NUMERICHOST; -#endif if (getnameinfo(sa, sa->sa_len, addrbuf, sizeof(addrbuf), NULL, 0, niflags) == 0) diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c index 3af6e081ee1e..1aa343389704 100644 --- a/usr.sbin/ifmcstat/ifmcstat.c +++ b/usr.sbin/ifmcstat/ifmcstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: ifmcstat.c,v 1.8 2000/02/26 08:13:25 itojun Exp $ */ +/* $NetBSD: ifmcstat.c,v 1.9 2004/11/16 05:59:32 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -111,11 +111,7 @@ const char *inet6_n2a(p) static char buf[NI_MAXHOST]; struct sockaddr_in6 sin6; u_int32_t scopeid; -#ifdef NI_WITHSCOPEID - const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflags = NI_NUMERICHOST; -#endif memset(&sin6, 0, sizeof(sin6)); sin6.sin6_family = AF_INET6; diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 56edca290cda..589a21c55b9a 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.88 2004/10/30 08:49:45 dsl Exp $ */ +/* $NetBSD: mountd.c,v 1.89 2004/11/16 05:59:32 itojun Exp $ */ /* * Copyright (c) 1989, 1993 @@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.88 2004/10/30 08:49:45 dsl Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.89 2004/11/16 05:59:32 itojun Exp $"); #endif #endif /* not lint */ @@ -250,11 +250,7 @@ static struct uucred def_anon = { static int opt_flags; static int have_v6 = 1; -#ifdef NI_WITHSCOPEID -static const int ninumeric = NI_NUMERICHOST | NI_WITHSCOPEID; -#else static const int ninumeric = NI_NUMERICHOST; -#endif /* Bits for above */ #define OP_MAPROOT 0x001