Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils enable IPv6 support in sysinst. integration o...
details: https://anonhg.NetBSD.org/src/rev/c6377886333f
branches: trunk
changeset: 480115:c6377886333f
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Jan 04 08:33:51 2000 +0000
description:
enable IPv6 support in sysinst. integration of work by ichiro%ichiro.org@localhost.
- IPv6 autoconfiguration
- IPv6 nameserver
TODO: french messages, dhcp
add -DINET6 into x_ifconfig.
diffstat:
distrib/utils/Makefile | 5 +-
distrib/utils/sysinst/arch/i386/.cvsignore | 7 +
distrib/utils/sysinst/arch/i386/Makefile | 4 +-
distrib/utils/sysinst/defs.h | 6 +-
distrib/utils/sysinst/menus.mi.en | 32 +++-
distrib/utils/sysinst/menus.mi.fr | 34 +++-
distrib/utils/sysinst/msg.mi.en | 29 +-
distrib/utils/sysinst/msg.mi.fr | 18 +-
distrib/utils/sysinst/net.c | 272 +++++++++++++++++++++++-----
distrib/utils/x_ifconfig/Makefile | 4 +-
10 files changed, 337 insertions(+), 74 deletions(-)
diffs (truncated from 640 to 300 lines):
diff -r b98ba679c257 -r c6377886333f distrib/utils/Makefile
--- a/distrib/utils/Makefile Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/Makefile Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 1999/10/18 20:20:03 pk Exp $
+# $NetBSD: Makefile,v 1.8 2000/01/04 08:33:51 itojun Exp $
SUBDIR= libhack init_s more ssh tls \
x_dd x_ftp x_gzip x_ifconfig x_netstat x_ping x_route x_sh zcat
@@ -6,4 +6,7 @@
SUBDIR+=sysinst
.endif
+# IPv6
+SUBDIR+=x_ping6
+
.include <bsd.subdir.mk>
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/arch/i386/.cvsignore
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/i386/.cvsignore Tue Jan 04 08:33:51 2000 +0000
@@ -0,0 +1,7 @@
+menus.def
+msg.def
+msg_defs.h
+msg_defs.c
+menu_defs.h
+menu_defs.c
+sysinst
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/arch/i386/Makefile
--- a/distrib/utils/sysinst/arch/i386/Makefile Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/arch/i386/Makefile Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 1999/03/31 00:44:49 fvdl Exp $
+# $NetBSD: Makefile,v 1.8 2000/01/04 08:33:52 itojun Exp $
#
# Makefile for i386
#
@@ -11,4 +11,6 @@
fdisk.o md.o: menu_defs.h msg_defs.h
+CPPFLAGS+=-DINET6
+
.include "../../Makefile.inc"
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/defs.h
--- a/distrib/utils/sysinst/defs.h Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/defs.h Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.48 1999/08/16 08:29:04 abs Exp $ */
+/* $NetBSD: defs.h,v 1.49 2000/01/04 08:33:51 itojun Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -212,6 +212,10 @@
EXTERN char net_namesvr[STRSIZE] INIT("");
EXTERN char net_defroute[STRSIZE] INIT("");
EXTERN char net_media[STRSIZE] INIT("");
+#ifdef INET6
+EXTERN char net_ip6[STRSIZE] INIT("");
+EXTERN char net_namesvr6[STRSIZE] INIT("");
+#endif
/* Variables for upgrade. */
#if 0
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/menus.mi.en
--- a/distrib/utils/sysinst/menus.mi.en Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/menus.mi.en Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: menus.mi.en,v 1.36 1999/07/04 10:29:29 cgd Exp $ */
+/* $NetBSD: menus.mi.en,v 1.37 2000/01/04 08:33:52 itojun Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -323,4 +323,34 @@
option "Ignore, continue anyway", exit, action
{ yesno = 1; ignorerror = 1; };
+menu namesrv6, title " Select IPv6 DNS server";
+ option "paradise.v6.kame.net", exit, action
+ { strncpy(net_namesvr6, "3ffe:501:4819::42",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "kiwi.itojun.org", exit, action
+ { strncpy(net_namesvr6, "3ffe:501:410:100:5254:ff:feda:48bf",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "sh1.iijlab.net", exit, action
+ { strncpy(net_namesvr6, "3ffe:507:0:1:260:97ff:fe07:69ea",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "ns1.v6.intec.co.jp", exit, action
+ { strncpy(net_namesvr6, "3ffe:508:0:1::53",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "nttv6.net", exit, action
+ { strncpy(net_namesvr6, "3ffe:1800:1000::1",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "light.imasy.or.jp", exit, action
+ { strncpy(net_namesvr6, "3ffe:505:0:1:2a0:c9ff:fe61:6521",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "other ", exit, action
+ { yesno = 0; };
+menu ip6autoconf, title "Perform IPv6 autoconfiguration?";
+ option "Yes", exit, action {yesno = 1;};
+ option "No", exit, action {yesno = 0;};
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/menus.mi.fr
--- a/distrib/utils/sysinst/menus.mi.fr Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/menus.mi.fr Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: menus.mi.fr,v 1.23 1999/07/04 10:29:30 cgd Exp $ */
+/* $NetBSD: menus.mi.fr,v 1.24 2000/01/04 08:33:52 itojun Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -322,3 +322,35 @@
{ yesno = 0; ignorerror = 0; };
option "Ignorer les erreurs, continuer quand même", exit, action
{ yesno = 1; ignorerror = 1; };
+
+menu namesrv6, title " Select IPv6 DNS server";
+ option "paradise.v6.kame.net", exit, action
+ { strncpy(net_namesvr6, "3ffe:501:4819::42",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "kiwi.itojun.org", exit, action
+ { strncpy(net_namesvr6, "3ffe:501:410:100:5254:ff:feda:48bf",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "sh1.iijlab.net", exit, action
+ { strncpy(net_namesvr6, "3ffe:507:0:1:260:97ff:fe07:69ea",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "ns1.v6.intec.co.jp", exit, action
+ { strncpy(net_namesvr6, "3ffe:508:0:1::53",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "nttv6.net", exit, action
+ { strncpy(net_namesvr6, "3ffe:1800:1000::1",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "light.imasy.or.jp", exit, action
+ { strncpy(net_namesvr6, "3ffe:505:0:1:2a0:c9ff:fe61:6521",
+ sizeof(net_namesvr6));
+ yesno = 1; };
+ option "other ", exit, action
+ { yesno = 0; };
+
+menu ip6autoconf, title "Perform IPv6 autoconfiguration?";
+ option "Yes", exit, action {yesno = 1;};
+ option "No", exit, action {yesno = 0;};
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/msg.mi.en
--- a/distrib/utils/sysinst/msg.mi.en Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/msg.mi.en Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.en,v 1.56 1999/08/16 08:29:05 abs Exp $ */
+/* $NetBSD: msg.mi.en,v 1.57 2000/01/04 08:33:52 itojun Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -473,16 +473,19 @@
{Your host name}
message net_ip
-{Your IP number}
+{Your IPv4 number}
message net_mask
-{Netmask}
+{IPv4 Netmask}
+
+message net_namesrv6
+{IPv6 name server}
message net_namesrv
-{IP of your name server}
+{IPv4 name server}
message net_defroute
-{IP of your gateway}
+{IPv4 gateway}
message net_media
{Network media type}
@@ -490,13 +493,15 @@
message netok
{The following are the values you entered. Are they OK?
-DNS Domain: %s
-Host Name: %s
-Host IP: %s
-Netmask: %s
-Nameserver IP: %s
-Gateway IP: %s
-Media type: %s
+DNS Domain: %s
+Host Name: %s
+Host IP: %s
+Netmask: %s
+IPv4 Nameserver: %s
+IPv4 Gateway: %s
+Media type: %s
+IPv6 autoconf: %s
+IPv6 Nameserver: %s
}
message netagain
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/msg.mi.fr
--- a/distrib/utils/sysinst/msg.mi.fr Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/msg.mi.fr Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.fr,v 1.30 1999/07/06 06:10:04 cgd Exp $ */
+/* $NetBSD: msg.mi.fr,v 1.31 2000/01/04 08:33:52 itojun Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -484,17 +484,23 @@
message net_host
{Votre nom de machine}
+message net_ip6autoconf
+{IPv6 autoconfig}
+
message net_ip
-{Votre numéro IP}
+{Votre numéro IPv4}
message net_mask
-{Votre masque de réseau (netmask)}
+{Votre masque de réseau (IPv4 netmask)}
+
+message net_namesrv6
+{L'adresse IPv6 de votre serveur de nom}
message net_namesrv
-{L'adresse IP de votre serveur de nom}
+{L'adresse IPv4 de votre serveur de nom}
message net_defroute
-{L'adresee IP de votre passerelle ("gateway")}
+{L'adresee IPv4 de votre passerelle ("gateway")}
message net_media
{Type de réseau (media)}
@@ -509,6 +515,8 @@
Adresse du serveur de noms: %s
Adresse de la paserelle: %s
Type de réseau (media): %s
+IPv6 autoconf: %s
+IPv6 nameserver: %s
}
message netagain
diff -r b98ba679c257 -r c6377886333f distrib/utils/sysinst/net.c
--- a/distrib/utils/sysinst/net.c Tue Jan 04 08:30:24 2000 +0000
+++ b/distrib/utils/sysinst/net.c Tue Jan 04 08:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net.c,v 1.55 1999/10/29 19:45:20 he Exp $ */
+/* $NetBSD: net.c,v 1.56 2000/01/04 08:33:52 itojun Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -45,6 +45,11 @@
#include <time.h>
#include <unistd.h>
#include <sys/param.h>
+#ifdef INET6
+#include <sys/sysctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
@@ -66,6 +71,9 @@
static void write_etc_hosts(FILE *f);
+static int is_v6kernel __P((void));
+static void init_v6kernel __P((int));
+static int get_v6wait __P((void));
/*
* URL encode unsafe characters. See RFC 1738.
@@ -237,8 +245,8 @@
char hostname[MAXHOSTNAMELEN + 1];
/* First look to see if the selected interface is already configured. */
- textsize = collect(T_OUTPUT, &textbuf, "/sbin/ifconfig %s 2>/dev/null",
- net_dev);
+ textsize = collect(T_OUTPUT, &textbuf,
+ "/sbin/ifconfig %s inet 2>/dev/null", net_dev);
if (textsize >= 0) {
(void)strtok(textbuf, " \t\n"); /* ignore interface name */
while ((t = strtok(NULL, " \t\n")) != NULL) {
@@ -261,6 +269,31 @@
}
}
Home |
Main Index |
Thread Index |
Old Index