How to set up IPv6 softwares in Mac OS X 10.1.4

General

In most case, you have to add the following lines to the source code.
	const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
	const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
Also, you need to install libbind.a and libinet6.a and link them to you application.
Please refer to Itojun-san's page in KAME project.

route6d

Building is very easy in KAME tree. However you have to modify something.
1) Makefile
	CFLAGS+=        -I/usr/pkg/include/bind -DINET6
	LDADD+= -L/usr/pkg/lib -lbind -L/usr/local/v6/lib -linet6
2) route6d.h
	const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
	const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
You have to down faith0 before starting route6d.

telnet - from FreeBSD4.5R

Quick patch is here.

ftp

In bootstrap-pkgsrc directory (refer to Itojun-san's page)
1) make distclean
2) apply my patch
3) autoconf
4) ./configure --enable-ipv6 --prefix=/usr/pkg
5) bmake

traceroute6

Using Apple's code in their cvs server, network_cmds.

1) undefined -DIPSEC in Makefile.preamble
2) undefiled "LIBS = -lipsec" in Makefile
3) add to Makefile the below two lines

	LIBS = -L/usr/pkg/lib -lbind -L/usr/local/v6/lib -linet6
	HEADER_PATHS = -I/usr/pkg/include/bind

netstat

Using itojun-san's patch at here.
In my case, I modified routename6() in route.c, not use local variable.

cvs

Using cvs-1.11.1p1 and KAME patch.

1) comment out "exit 1" at line 524 and "AC_REPLACE_FUNCS(getaddrinfo getnameinfo)" at line 527 in configure.in file.
2) edit src/Makefile.in

	DEFAULT_INCLUDES =  -I/usr/pkg/include/bind -I. -I$(srcdir) -I$(top_builddir) -I.
	LIBS =  -L/usr/pkg/lib -lbind @LIBS@
3) comment out line 67 in src/client.c
	/* #include "addrinfo.h" */
4) ./configure --without-gssapi --prefix=/usr/local

socks-trans (NEC)

First you need to get socks source code and trans patch from NEC America's site.

0) if trans-patch failed, you have to patch manually. 1) replacing lsGetHostByName() in lib/addr.h by my wrapper
2) add the following line to lib/wrap_tcp.c, lib/wrap_udp.c, server/socket.c

	extern const struct in6_addr in6addr_any;
3) add the following line to server/daemon.c.
	const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
4) if you need, change priority IPv6 than v4 for resolving in server/info.c
5) Link libbind.a and libinet6

You will be able to look the dancing kame by IE for Mac OS X.

ssh

Please refer to Itojun-san's page in KAME project.
And you may edit Makefile, getpwuid() uses NetInfo.
	LIBS=-lz  -linfo -lbind -lcrypto


this page is link free. and we welcome your feedback
Isao SEKI <iseki_at_gongon.com>