#!/bin/sh
#       IPv6 setup for ottawa{-v6.ipv6}.inria.fr (NetBSD 1.2.1)
#

#if [ "X${auto}" = X"YES" ]; then
        autoconf6 -v >/tmp/autoconf6 2>&1
	ndpd-host
	exit 0
#else
#	ifconfig le0 inet6 fe80::a00:20ff:fe0f:28ce/64
#	route -n add -iface -inet6 ff02::/16 fe80::a00:20ff:fe0f:28ce
#	route -n add -iface -inet6 ff12::/16 fe80::a00:20ff:fe0f:28ce
#
#	ifconfig sit0 inet6 ::128.93.1.21/96
#
#	ifconfig lo0 inet6 ::1/128
#	route -n add -inet6 ff01::/16 -iface ::1
#	route -n add -inet6 ff11::/16 -iface ::1
#fi
#
#ifconfig le0 inet6 3ffe:0306:1051:8300:a00:20ff:fe0f:28ce/64 alias
#ifconfig le0 inet6 first 3ffe:0306:1051:8300:a00:20ff:fe0f:28ce

if [ "X${forceloop}" = X"YES" ]; then
	ping6 -n -q -c 1 fe80::a00:20ff:fe0f:28ce
	ping6 -n -q -c 1 ::128.93.1.21
	ping6 -n -q -c 1 3ffe:0306:1051:8300:a00:20ff:fe0f:28ce
fi

# route to 6bone

#route -n delete -inet6 ::/0
#route -n add -inet6 ::/0 fe80::220:feff:fe00:8781 -ifa 3ffe:0306:1051:8300:a00:20ff:fe0f:28ce

# fast timers

if [ "X${fasttimers}" = X"YES" ]; then
	sysctl -w net.inet6.ipv6.prune=1
	sysctl -w net.inet6.ipv6.keep=120
	sysctl -w net.inet6.ipv6.reachable=30
	sysctl -w net.inet6.ipv6.retrans=1
	sysctl -w net.inet6.ipv6.probe=5
	sysctl -w net.inet6.ipv6.hold_down=3
fi

# for testing purpose

#route -v -n get -inet6 ff02::1
#route -v -n get -inet6 fe80::a00:20ff:fe0f:28ce
#route -v -n get -inet6 fe80::220:feff:fe00:8781
#route -v -n get -inet6 ::128.93.9.50
#route -v -n get -inet6 ::192.87.110.60
#route -v -n get -host -inet6 ganesha-v6.ipv6.imag.fr
#route -v -n get -host -inet6 3ffe:604::c0:4fc6:9cc7
