diff -Nurp racoon-20040818a/libipsec/Makefile racoon-20040818a-mosx-10.3/libipsec/Makefile
--- racoon-20040818a/libipsec/Makefile	Sun Jun 11 16:54:31 2000
+++ racoon-20040818a-mosx-10.3/libipsec/Makefile	Tue Oct 19 01:29:01 2004
@@ -25,6 +25,8 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 
+OPSYS!= uname -s
+
 .if exists(${.CURDIR}/../Makefile.opsys)
 .include "${.CURDIR}/../Makefile.opsys"
 .endif
@@ -73,7 +75,7 @@ afterinstall:
 	ln $(MANDIR)3/ipsec_set_policy.3 $(MANDIR)3/ipsec_dump_policy.3
 .endif
 
-.if (${OPSYS} == "FreeBSD")
+.if (${OPSYS} == "Darwin")
 SRCS+= y.tab.h
 y.tab.h:	policy_parse.y
 .endif
@@ -87,7 +89,7 @@ LFLAGS+=-olex.yy.c
 
 # test program
 test-policy: test-policy.c
-.if (${OPSYS} != "FreeBSD")
+.if (${OPSYS} != "Darwin")
 	$(CC) $(CFLAGS) -o test-policy test-policy.c \
 		-L${.OBJDIR} -lipsec -L/usr/local/v6/lib -linet6
 .else
diff -Nurp racoon-20040818a/racoon/Makefile racoon-20040818a-mosx-10.3/racoon/Makefile
--- racoon-20040818a/racoon/Makefile	Thu Jan  1 01:00:00 1970
+++ racoon-20040818a-mosx-10.3/racoon/Makefile	Tue Oct 19 01:43:13 2004
@@ -0,0 +1,109 @@
+# Generated automatically from Makefile.in by configure.
+#	$KAME: Makefile.in,v 1.43 2004/06/17 02:42:53 itojun Exp $
+
+
+srcdir=	.
+CC=	gcc
+LDFLAGS=
+CPPFLAGS=	-DINET6  -I./missing
+OPTFLAG=-DHAVE_PFKEYV2 -Wall -Wmissing-prototypes -Wmissing-declarations -O -DYIPS_DEBUG
+CFLAGS=	-g -O2 $(CPPFLAGS)  -DHAVE_FUNC_MACRO=1 -DENABLE_IPV6=1 -DADVAPI=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBL=1 -DHAVE_LIBY=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_OPENSSL_RSA_H=1 -DHAVE_OPENSSL_PEM_H=1 -DHAVE_OPENSSL_EVP_H=1 -DHAVE_OPENSSL_X509_H=1 -DHAVE_SIGNING_C=1 -DHAVE_OPENSSL_OPENSSLV_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRERROR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 -DHAVE_GETIFADDRS=1 -DHAVE_ARC4RANDOM=1  $(CPPFLAGS) $(OPTFLAG) -DIPSEC -I. -I$(srcdir) -DSYSCONFDIR=\"${sysconfdir}\"
+CFLAGS+=-DYY_NO_UNPUT
+CFLAGS+=-I${srcdir}/../libipsec
+LIBS=	-lipsec -ly -ll -lssl -lcrypto -lresolv
+YFLAGS+=-d
+
+prefix=	/usr/local
+bindir=	${exec_prefix}/bin
+sbindir=${exec_prefix}/sbin
+mandir=	${prefix}/man
+exec_prefix=	${prefix}
+sysconfdir=	${prefix}/etc
+INSTALL=/usr/bin/install -c
+
+#PROG=	racoon racoonctl eaytest
+PROG=	racoon eaytest
+#PROG+=	pfkey
+OBJS=	main.o session.o isakmp.o handler.o \
+	isakmp_ident.o isakmp_agg.o isakmp_base.o \
+	isakmp_quick.o isakmp_inf.o isakmp_newg.o \
+	gssapi.o dnssec.o getcertsbyname.o \
+	pfkey.o admin.o ipsec_doi.o oakley.o grabmyaddr.o vendorid.o \
+	policy.o localconf.o remoteconf.o crypto_openssl.o algorithm.o \
+	proposal.o sainfo.o cfparse.o cftoken.o strnames.o \
+	vmbuf.o plog.o logger.o schedule.o str2val.o misc.o sockmisc.o \
+	safefile.o backupsa.o   rijndael-api-fst.o rijndael-alg-fst.o ../libipsec/pfkey.o
+
+EAYTESTOBJS= eaytest.o crypto_openssl_test.o misc.o vmbuf.o str2val.o \
+	 rijndael-api-fst.o rijndael-alg-fst.o 
+
+# under samples
+CONF=	psk.txt racoon.conf
+
+all: $(PROG)
+
+racoon: $(OBJS)
+	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+racoonctl: kmpstat.o misc.o vmbuf.o str2val.o
+	$(CC) $(LDFLAGS) -o $@ kmpstat.o misc.o vmbuf.o str2val.o \
+		$(LIBS) 
+
+pfkey: dummy.o
+	$(CC) $(LDFLAGS) -o $@ dummy.o
+
+eaytest: $(EAYTESTOBJS)
+	$(CC) $(LDFLAGS) -o $@ $(EAYTESTOBJS) $(LIBS)
+
+# special object rules
+crypto_openssl_test.o: crypto_openssl.c
+	$(CC) $(CFLAGS) -DEAYDEBUG -o crypto_openssl_test.o -c crypto_openssl.c
+
+# missing/*.c
+strdup.o:	$(srcdir)/missing/strdup.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/$*.c
+getaddrinfo.o:	$(srcdir)/missing/getaddrinfo.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/$*.c
+getnameinfo.o:	$(srcdir)/missing/getnameinfo.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/$*.c
+rijndael-api-fst.o: $(srcdir)/missing/crypto/rijndael/rijndael-api-fst.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/crypto/rijndael/rijndael-api-fst.c
+rijndael-alg-fst.o: $(srcdir)/missing/crypto/rijndael/rijndael-alg-fst.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/crypto/rijndael/rijndael-alg-fst.c
+sha2.o: $(srcdir)/missing/crypto/sha2/$*.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/crypto/sha2/$*.c
+arc4random.o: $(srcdir)/missing/$*.c
+	$(CC) $(CFLAGS) -c $(srcdir)/missing/$*.c
+
+.c.o:
+	$(CC) $(CFLAGS) -c $<
+
+tag:
+	ctags -dtw $(srcdir)/*.[chly]
+
+install:
+	$(INSTALL) -s -o bin -g bin -m 555 racoon $(sbindir)
+	$(INSTALL) -o bin -g bin -m 444 racoon.8 $(mandir)/man8
+	$(INSTALL) -o bin -g bin -m 444 racoon.conf.5 $(mandir)/man5
+	-mkdir -p ${sysconfdir}/racoon
+	for i in $(CONF); do \
+		if test ! -f ${sysconfdir}/racoon/$$i; then \
+			$(INSTALL) -o bin -g bin -m 444 samples/$$i \
+				${sysconfdir}/racoon; \
+		fi; \
+		$(INSTALL) -o bin -g bin -m 444 samples/$$i \
+			${sysconfdir}/racoon/$$i.dist; \
+	done
+
+clean:
+	-rm -f $(PROG) *.o *.core y.tab.h cftoken.c cfparse.c cftoken.h cfparse.h
+
+distclean: clean
+	-rm -f Makefile config.cache config.status config.log
+	-for i in $(CONF); do \
+		rm -f samples/$$i; \
+	done
+
+
+depend:
+	mkdep ${CFLAGS:M-[ID]*} $(srcdir)/*.c
diff -Nurp racoon-20040818a/racoon/config.cache racoon-20040818a-mosx-10.3/racoon/config.cache
--- racoon-20040818a/racoon/config.cache	Thu Jan  1 01:00:00 1970
+++ racoon-20040818a-mosx-10.3/racoon/config.cache	Tue Oct 19 01:31:26 2004
@@ -0,0 +1,66 @@
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+ac_cv_c_const=${ac_cv_c_const=yes}
+ac_cv_func_arc4random=${ac_cv_func_arc4random=yes}
+ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
+ac_cv_func_getifaddrs=${ac_cv_func_getifaddrs=yes}
+ac_cv_func_getnameinfo=${ac_cv_func_getnameinfo=yes}
+ac_cv_func_getrrsetbyname=${ac_cv_func_getrrsetbyname=no}
+ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes}
+ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes}
+ac_cv_func_select=${ac_cv_func_select=yes}
+ac_cv_func_socket=${ac_cv_func_socket=yes}
+ac_cv_func_strdup=${ac_cv_func_strdup=yes}
+ac_cv_func_strerror=${ac_cv_func_strerror=yes}
+ac_cv_func_strtol=${ac_cv_func_strtol=yes}
+ac_cv_func_strtoul=${ac_cv_func_strtoul=yes}
+ac_cv_func_vprintf=${ac_cv_func_vprintf=yes}
+ac_cv_header_limits_h=${ac_cv_header_limits_h=yes}
+ac_cv_header_openssl_cversion_h=${ac_cv_header_openssl_cversion_h=no}
+ac_cv_header_openssl_evp_h=${ac_cv_header_openssl_evp_h=yes}
+ac_cv_header_openssl_opensslv_h=${ac_cv_header_openssl_opensslv_h=yes}
+ac_cv_header_openssl_pem_h=${ac_cv_header_openssl_pem_h=yes}
+ac_cv_header_openssl_rijndael_h=${ac_cv_header_openssl_rijndael_h=no}
+ac_cv_header_openssl_rsa_h=${ac_cv_header_openssl_rsa_h=yes}
+ac_cv_header_openssl_x509_h=${ac_cv_header_openssl_x509_h=yes}
+ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h=yes}
+ac_cv_header_stdc=${ac_cv_header_stdc=yes}
+ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes}
+ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes}
+ac_cv_header_time=${ac_cv_header_time=yes}
+ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
+ac_cv_header_varargs_h=${ac_cv_header_varargs_h=no}
+ac_cv_lib_crypto_des_cbc_encrypt=${ac_cv_lib_crypto_des_cbc_encrypt=no}
+ac_cv_lib_fl_yywrap=${ac_cv_lib_fl_yywrap=yes}
+ac_cv_lib_l_yywrap=${ac_cv_lib_l_yywrap=yes}
+ac_cv_lib_ssl_ssl_ok=${ac_cv_lib_ssl_ssl_ok=yes}
+ac_cv_lib_y_yyerror=${ac_cv_lib_y_yyerror=yes}
+ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
+ac_cv_pfkey=${ac_cv_pfkey=yes}
+ac_cv_prog_CC=${ac_cv_prog_CC=gcc}
+ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'}
+ac_cv_prog_LEX=${ac_cv_prog_LEX=flex}
+ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no}
+ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
+ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
+ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
+ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
+ac_cv_search_CAST_cfb64_encrypt=${ac_cv_search_CAST_cfb64_encrypt=-lcrypto}
+ac_cv_search_ipsec_strerror=${ac_cv_search_ipsec_strerror=-lipsec}
+ac_cv_struct_tm=${ac_cv_struct_tm=time.h}
+ac_cv_type_pid_t=${ac_cv_type_pid_t=yes}
+ac_cv_type_signal=${ac_cv_type_signal=void}
+ac_cv_type_size_t=${ac_cv_type_size_t=yes}
+racoon_cv_advapi=${racoon_cv_advapi=yes}
diff -Nurp racoon-20040818a/racoon/config.log racoon-20040818a-mosx-10.3/racoon/config.log
--- racoon-20040818a/racoon/config.log	Thu Jan  1 01:00:00 1970
+++ racoon-20040818a-mosx-10.3/racoon/config.log	Tue Oct 19 01:31:52 2004
@@ -0,0 +1,232 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+configure:568: checking for gcc
+configure:681: checking whether the C compiler (gcc  ) works
+configure:697: gcc -o conftest    conftest.c  1>&5
+configure:723: checking whether the C compiler (gcc  ) is a cross-compiler
+configure:728: checking whether we are using GNU C
+configure:737: gcc -E conftest.c
+configure:756: checking whether gcc accepts -g
+configure:788: checking how to run the C preprocessor
+configure:809: gcc -E  conftest.c >/dev/null 2>conftest.out
+configure:870: checking for flex
+configure:904: checking for yywrap in -lfl
+configure:923: gcc -o conftest -g -O2   conftest.c -lfl   1>&5
+configure:976: checking for a BSD compatible install
+configure:1029: checking whether make sets ${MAKE}
+configure:1063: checking host system type
+configure:1091: checking if --enable-debug option is specified
+configure:1104: checking if --enable-debugrm option is specified
+configure:1119: checking if --enable-yydebug option is specified
+configure:1136: checking if --enable-pedant option is specified
+configure:1148: checking if --enable-adminport option is specified
+configure:1166: checking if --enable-rc5 option is specified
+configure:1178: checking if --enable-idea option is specified
+configure:1190: checking if --enable-gssapi option is specified
+configure:1208: checking if --enable-stats option is specified
+configure:1226: checking if --enable-samode-unspec option is specified
+configure:1245: checking if --with-efence option is specified
+configure:1433: checking if --with-gc option is specified
+configure:1625: checking if --with-dmalloc option is specified
+configure:1817: checking if --with-tcpdump option is specified
+configure:1837: checking if __func__ is available
+configure:1847: gcc -c -g -O2  conftest.c 1>&5
+configure: In function `main':
+configure:1843: warning: initialization discards qualifiers from pointer target type
+configure:1863: checking whether to enable ipv6
+configure:1902: gcc -o conftest -g -O2   conftest.c  1>&5
+configure:1929: checking ipv6 stack type
+configure:2074: checking for advanced API support
+configure:2090: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure:2112: checking getaddrinfo bug
+configure:2208: gcc -o conftest -g -O2 -DINET6   conftest.c  1>&5
+configure:2235: checking for getaddrinfo
+configure:2263: gcc -o conftest -g -O2 -DINET6   conftest.c  1>&5
+configure:2235: checking for getnameinfo
+configure:2263: gcc -o conftest -g -O2 -DINET6   conftest.c  1>&5
+configure:2291: checking if --with-ssleay option is specified
+configure:2337: checking for crypto containing CAST_cfb64_encrypt
+configure:2355: gcc -o conftest -g -O2 -DINET6   conftest.c  1>&5
+ld: Undefined symbols:
+_CAST_cfb64_encrypt
+configure: failed program was:
+#line 2344 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char CAST_cfb64_encrypt();
+
+int main() {
+CAST_cfb64_encrypt()
+; return 0; }
+configure:2375: gcc -o conftest -g -O2 -DINET6   conftest.c -lcrypto  1>&5
+configure:2434: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure:2461: checking openssl version
+configure:2485: checking for ssl_ok in -lssl
+configure:2504: gcc -o conftest -g -O2 -DINET6   conftest.c -lssl -lcrypto -lcrypto  1>&5
+configure:2533: checking for des_cbc_encrypt in -lcrypto
+configure:2552: gcc -o conftest -g -O2 -DINET6   conftest.c -lcrypto  -lssl -lcrypto  1>&5
+ld: Undefined symbols:
+_des_cbc_encrypt
+configure: failed program was:
+#line 2541 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char des_cbc_encrypt();
+
+int main() {
+des_cbc_encrypt()
+; return 0; }
+configure:2580: checking for yywrap in -ll
+configure:2599: gcc -o conftest -g -O2 -DINET6   conftest.c -ll  -lssl -lcrypto  1>&5
+configure:2627: checking for yyerror in -ly
+configure:2646: gcc -o conftest -g -O2 -DINET6   conftest.c -ly  -ll -lssl -lcrypto  1>&5
+configure:2675: checking for PF_KEYv2 support
+configure:2690: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure:2709: checking for old KAME PF_KEYv2 header file
+configure:2721: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure: In function `main':
+configure:2717: error: structure has no member named `sadb_msg_reserved2'
+configure: failed program was:
+#line 2711 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/pfkeyv2.h>
+int main() {
+struct sadb_msg m; m.sadb_msg_reserved2 = 0;
+; return 0; }
+configure:2742: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure:2764: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure:2782: checking ipsec library path
+configure:2837: checking for ipsec containing ipsec_strerror
+configure:2855: gcc -o conftest -g -O2 -DINET6   conftest.c -ly -ll -lssl -lcrypto  1>&5
+ld: Undefined symbols:
+_ipsec_strerror
+configure: failed program was:
+#line 2844 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char ipsec_strerror();
+
+int main() {
+ipsec_strerror()
+; return 0; }
+configure:2875: gcc -o conftest -g -O2 -DINET6   conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:3010: checking if --with-libpfkey option is specified
+configure:3197: checking if --with-liblwres option is specified
+configure:3446: checking for getrrsetbyname
+configure:3474: gcc -o conftest -g -O2 -DINET6   conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+ld: Undefined symbols:
+_getrrsetbyname
+configure: failed program was:
+#line 3451 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getrrsetbyname(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char getrrsetbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getrrsetbyname) || defined (__stub___getrrsetbyname)
+choke me
+#else
+getrrsetbyname();
+#endif
+
+; return 0; }
+configure:3500: checking for ANSI C header files
+configure:3513: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3580: gcc -o conftest -g -O2 -DINET6   conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:3604: checking for sys/wait.h that is POSIX.1 compatible
+configure:3625: gcc -c -g -O2 -DINET6  conftest.c 1>&5
+configure:3649: checking for limits.h
+configure:3659: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3649: checking for sys/time.h
+configure:3659: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3649: checking for unistd.h
+configure:3659: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3649: checking for stdarg.h
+configure:3659: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3649: checking for varargs.h
+configure:3659: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+In file included from configure:3655:
+/usr/include/gcc/darwin/3.3/varargs.h:10:2: #error "GCC no longer implements <varargs.h>."
+/usr/include/gcc/darwin/3.3/varargs.h:11:2: #error "Revise your code to use <stdarg.h>."
+configure: failed program was:
+#line 3654 "configure"
+#include "confdefs.h"
+#include <varargs.h>
+configure:3700: checking for openssl/rsa.h
+configure:3710: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3700: checking for openssl/pem.h
+configure:3710: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3700: checking for openssl/evp.h
+configure:3710: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3700: checking for openssl/x509.h
+configure:3710: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3749: checking for openssl/cversion.h
+configure:3759: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3755:30: openssl/cversion.h: No such file or directory
+configure: failed program was:
+#line 3754 "configure"
+#include "confdefs.h"
+#include <openssl/cversion.h>
+configure:3749: checking for openssl/opensslv.h
+configure:3759: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3790: checking for openssl/rijndael.h
+configure:3800: gcc -E -DINET6  conftest.c >/dev/null 2>conftest.out
+configure:3796:30: openssl/rijndael.h: No such file or directory
+configure: failed program was:
+#line 3795 "configure"
+#include "confdefs.h"
+#include <openssl/rijndael.h>
+configure:3827: checking sha2 support
+configure:3891: checking for working const
+configure:3945: gcc -c -g -O2 -DINET6  -I./missing conftest.c 1>&5
+configure:3966: checking for pid_t
+configure:3999: checking for size_t
+configure:4032: checking whether time.h and sys/time.h may both be included
+configure:4046: gcc -c -g -O2 -DINET6  -I./missing conftest.c 1>&5
+configure:4067: checking whether struct tm is in sys/time.h or time.h
+configure:4080: gcc -c -g -O2 -DINET6  -I./missing conftest.c 1>&5
+configure:4102: checking for 8-bit clean memcmp
+configure:4120: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4138: checking return type of signal handlers
+configure:4160: gcc -c -g -O2 -DINET6  -I./missing conftest.c 1>&5
+configure:4179: checking for vprintf
+configure:4207: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4191: warning: conflicting types for built-in function `vprintf'
+configure:4286: checking for gettimeofday
+configure:4314: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4286: checking for select
+configure:4314: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4286: checking for socket
+configure:4314: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4286: checking for strerror
+configure:4314: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4286: checking for strtol
+configure:4314: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4286: checking for strtoul
+configure:4314: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4341: checking for strdup
+configure:4369: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4407: checking for getifaddrs
+configure:4435: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4463: checking for arc4random
+configure:4491: gcc -o conftest -g -O2 -DINET6  -I./missing  conftest.c -lipsec -ly -ll -lssl -lcrypto  1>&5
+configure:4519: checking if --with-pkgversion option is specified
diff -Nurp racoon-20040818a/racoon/config.status racoon-20040818a-mosx-10.3/racoon/config.status
--- racoon-20040818a/racoon/config.status	Thu Jan  1 01:00:00 1970
+++ racoon-20040818a-mosx-10.3/racoon/config.status	Tue Oct 19 01:31:26 2004
@@ -0,0 +1,173 @@
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host huba.local:
+#
+# ./configure  --host=FreeBSD
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running ${CONFIG_SHELL-/bin/sh} ./configure  --host=FreeBSD --no-create --no-recursion"
+    exec ${CONFIG_SHELL-/bin/sh} ./configure  --host=FreeBSD --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "./config.status generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "$ac_cs_usage"; exit 0 ;;
+  *) echo "$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=.
+ac_given_INSTALL="/usr/bin/install -c"
+
+trap 'rm -fr Makefile samples/psk.txt samples/racoon.conf conftest*; exit 1' 1 2 15
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+/^[ 	]*VPATH[ 	]*=[^:]*$/d
+
+s%@SHELL@%/bin/sh%g
+s%@CFLAGS@%-g -O2%g
+s%@CPPFLAGS@%-DINET6  -I./missing%g
+s%@CXXFLAGS@%%g
+s%@FFLAGS@%%g
+s%@DEFS@% -DHAVE_FUNC_MACRO=1 -DENABLE_IPV6=1 -DADVAPI=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_LIBSSL=1 -DHAVE_LIBL=1 -DHAVE_LIBY=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_OPENSSL_RSA_H=1 -DHAVE_OPENSSL_PEM_H=1 -DHAVE_OPENSSL_EVP_H=1 -DHAVE_OPENSSL_X509_H=1 -DHAVE_SIGNING_C=1 -DHAVE_OPENSSL_OPENSSLV_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRERROR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 -DHAVE_GETIFADDRS=1 -DHAVE_ARC4RANDOM=1 %g
+s%@LDFLAGS@%%g
+s%@LIBS@%-lipsec -ly -ll -lssl -lcrypto %g
+s%@exec_prefix@%${prefix}%g
+s%@prefix@%/usr/local%g
+s%@program_transform_name@%s,x,x,%g
+s%@bindir@%${exec_prefix}/bin%g
+s%@sbindir@%${exec_prefix}/sbin%g
+s%@libexecdir@%${exec_prefix}/libexec%g
+s%@datadir@%${prefix}/share%g
+s%@sysconfdir@%${prefix}/etc%g
+s%@sharedstatedir@%${prefix}/com%g
+s%@localstatedir@%${prefix}/var%g
+s%@libdir@%${exec_prefix}/lib%g
+s%@includedir@%${prefix}/include%g
+s%@oldincludedir@%/usr/include%g
+s%@infodir@%${prefix}/info%g
+s%@mandir@%${prefix}/man%g
+s%@CC@%gcc%g
+s%@CPP@%gcc -E%g
+s%@LEX@%flex%g
+s%@LEXLIB@%-lfl%g
+s%@INSTALL_PROGRAM@%${INSTALL}%g
+s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g
+s%@INSTALL_DATA@%${INSTALL} -m 644%g
+s%@SET_MAKE@%%g
+s%@host@%%g
+s%@host_alias@%FreeBSD%g
+s%@host_cpu@%%g
+s%@host_vendor@%%g
+s%@host_os@%%g
+s%@OPTFLAG@%-DHAVE_PFKEYV2 -Wall -Wmissing-prototypes -Wmissing-declarations -O -DYIPS_DEBUG%g
+s%@DEBUGRMOBJS@%%g
+s%@LIBOBJS@%%g
+s%@CRYPTOBJS@% rijndael-api-fst.o rijndael-alg-fst.o%g
+s%@sysconfdir_x@%/usr/local/etc%g
+
+CEOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+
+CONFIG_FILES=${CONFIG_FILES-"Makefile samples/psk.txt samples/racoon.conf"}
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+
+
+exit 0
diff -Nurp racoon-20040818a/racoon/getcertsbyname.c racoon-20040818a-mosx-10.3/racoon/getcertsbyname.c
--- racoon-20040818a/racoon/getcertsbyname.c	Fri Nov 16 05:12:59 2001
+++ racoon-20040818a-mosx-10.3/racoon/getcertsbyname.c	Tue Oct 19 01:37:16 2004
@@ -35,6 +35,7 @@
 
 #include <netinet/in.h>
 #include <arpa/nameser.h>
+#include <arpa/nameser_compat.h>
 #include <resolv.h>
 #ifdef HAVE_LWRES_GETRRSETBYNAME
 #include <lwres/netdb.h>
diff -Nurp racoon-20040818a/racoon/samples/psk.txt racoon-20040818a-mosx-10.3/racoon/samples/psk.txt
--- racoon-20040818a/racoon/samples/psk.txt	Thu Jan  1 01:00:00 1970
+++ racoon-20040818a-mosx-10.3/racoon/samples/psk.txt	Tue Oct 19 01:31:27 2004
@@ -0,0 +1,21 @@
+# IPv4/v6 addresses
+10.160.94.3	mekmitasdigoat
+172.16.1.133	mekmitasdigoat
+194.100.55.1	whatcertificatereally
+203.178.141.208	mekmitasdigoat
+206.175.160.18	mekmitasdigoat
+206.175.160.20	mekmitasdigoat
+206.175.160.21	mekmitasdigoat
+206.175.160.22	mekmitasdigoat
+206.175.160.23	mekmitasdigoat
+206.175.160.36	mekmitasdigoat
+206.175.161.125	mekmitasdigoat
+206.175.161.154	mekmitasdigoat
+206.175.161.156	mekmitasdigoat
+206.175.161.182	mekmitasdigoat
+3ffe:501:410:ffff:200:86ff:fe05:80fa	mekmitasdigoat
+3ffe:501:410:ffff:210:4bff:fea2:8baa	mekmitasdigoat
+# USER_FQDN
+sakane@kame.net	mekmitasdigoat
+# FQDN
+kame		hoge
diff -Nurp racoon-20040818a/racoon/samples/racoon.conf racoon-20040818a-mosx-10.3/racoon/samples/racoon.conf
--- racoon-20040818a/racoon/samples/racoon.conf	Thu Jan  1 01:00:00 1970
+++ racoon-20040818a-mosx-10.3/racoon/samples/racoon.conf	Tue Oct 19 01:31:27 2004
@@ -0,0 +1,125 @@
+# $KAME: racoon.conf.in,v 1.18 2001/08/16 06:33:40 itojun Exp $
+
+# "path" must be placed before it should be used.
+# You can overwrite which you defined, but it should not use due to confusing.
+path include "/usr/local/etc/racoon" ;
+#include "remote.conf" ;
+
+# search this file for pre_shared_key with various ID key.
+path pre_shared_key "/usr/local/etc/racoon/psk.txt" ;
+
+# racoon will look for certificate file in the directory,
+# if the certificate/certificate request payload is received.
+path certificate "/usr/local/etc/cert" ;
+
+# "log" specifies logging level.  It is followed by either "notify", "debug"
+# or "debug2".
+#log debug;
+
+# "padding" defines some parameter of padding.  You should not touch these.
+padding
+{
+	maximum_length 20;	# maximum padding length.
+	randomize off;		# enable randomize length.
+	strict_check off;	# enable strict check.
+	exclusive_tail off;	# extract last one octet.
+}
+
+# if no listen directive is specified, racoon will listen to all
+# available interface addresses.
+listen
+{
+	#isakmp ::1 [7000];
+	#isakmp 202.249.11.124 [500];
+	#admin [7002];		# administrative's port by kmpstat.
+	#strict_address; 	# required all addresses must be bound.
+}
+
+# Specification of default various timer.
+timer
+{
+	# These value can be changed per remote node.
+	counter 5;		# maximum trying count to send.
+	interval 20 sec;	# maximum interval to resend.
+	persend 1;		# the number of packets per a send.
+
+	# timer for waiting to complete each phase.
+	phase1 30 sec;
+	phase2 15 sec;
+}
+
+remote anonymous
+{
+	#exchange_mode main,aggressive;
+	exchange_mode aggressive,main;
+	doi ipsec_doi;
+	situation identity_only;
+
+	#my_identifier address;
+	my_identifier user_fqdn "sakane@kame.net";
+	peers_identifier user_fqdn "sakane@kame.net";
+	#certificate_type x509 "mycert" "mypriv";
+
+	nonce_size 16;
+	lifetime time 1 min;	# sec,min,hour
+	initial_contact on;
+	support_mip6 on;
+	proposal_check obey;	# obey, strict or claim
+
+	proposal {
+		encryption_algorithm 3des;
+		hash_algorithm sha1;
+		authentication_method pre_shared_key ;
+		dh_group 2 ;
+	}
+}
+
+remote ::1 [8000]
+{
+	#exchange_mode main,aggressive;
+	exchange_mode aggressive,main;
+	doi ipsec_doi;
+	situation identity_only;
+
+	my_identifier user_fqdn "sakane@kame.net";
+	peers_identifier user_fqdn "sakane@kame.net";
+	#certificate_type x509 "mycert" "mypriv";
+
+	nonce_size 16;
+	lifetime time 1 min;	# sec,min,hour
+
+	proposal {
+		encryption_algorithm 3des;
+		hash_algorithm sha1;
+		authentication_method pre_shared_key ;
+		dh_group 2 ;
+	}
+}
+
+sainfo anonymous
+{
+	pfs_group 1;
+	lifetime time 30 sec;
+	encryption_algorithm 3des ;
+	authentication_algorithm hmac_sha1;
+	compression_algorithm deflate ;
+}
+
+sainfo address 203.178.141.209 any address 203.178.141.218 any
+{
+	pfs_group 1;
+	lifetime time 30 sec;
+	encryption_algorithm des ;
+	authentication_algorithm hmac_md5;
+	compression_algorithm deflate ;
+}
+
+sainfo address ::1 icmp6 address ::1 icmp6
+{
+	pfs_group 1;
+	lifetime time 60 sec;
+	encryption_algorithm 3des, cast128, blowfish 448, des ;
+	authentication_algorithm hmac_sha1, hmac_md5 ;
+	compression_algorithm deflate ;
+}
+
diff -Nurp racoon-20040818a/racoon/vmbuf.c racoon-20040818a-mosx-10.3/racoon/vmbuf.c
--- racoon-20040818a/racoon/vmbuf.c	Mon Nov 26 17:54:29 2001
+++ racoon-20040818a-mosx-10.3/racoon/vmbuf.c	Tue Oct 19 01:35:55 2004
@@ -85,7 +85,7 @@ vrealloc(ptr, size)
 	return ptr;
 }
 
-void
+/* void
 vfree(var)
 	vchar_t *var;
 {
@@ -99,6 +99,7 @@ vfree(var)
 
 	return;
 }
+*/ 
 
 vchar_t *
 vdup(src)
