Apply patch (requested by manu in ticket #981): netbsd-3
authortron <tron@NetBSD.org>
Mon, 21 Nov 2005 21:12:29 +0000
branchnetbsd-3
changeset 265282 8ad21034227b
parent 265281 38246d261562
child 265283 c026f1ac0f81
Apply patch (requested by manu in ticket #981): Update ipsec-tools to version 0.6.3.
crypto/dist/ipsec-tools/ChangeLog
crypto/dist/ipsec-tools/NEWS
crypto/dist/ipsec-tools/configure.ac
crypto/dist/ipsec-tools/netbsd-import.sh
crypto/dist/ipsec-tools/rpm/suse/ipsec-tools.spec
crypto/dist/ipsec-tools/src/include-glibc/glibc-bugs.h
crypto/dist/ipsec-tools/src/include-glibc/net/pfkeyv2.h
crypto/dist/ipsec-tools/src/include-glibc/netinet/ipsec.h
crypto/dist/ipsec-tools/src/include-glibc/sys/queue.h
crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c
crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c
crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3
crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.3
crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.c
crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.h
crypto/dist/ipsec-tools/src/libipsec/key_debug.c
crypto/dist/ipsec-tools/src/libipsec/libpfkey.h
crypto/dist/ipsec-tools/src/libipsec/pfkey.c
crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c
crypto/dist/ipsec-tools/src/libipsec/policy_parse.c
crypto/dist/ipsec-tools/src/libipsec/policy_parse.h
crypto/dist/ipsec-tools/src/libipsec/policy_parse.y
crypto/dist/ipsec-tools/src/libipsec/policy_token.c
crypto/dist/ipsec-tools/src/libipsec/policy_token.l
crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c
crypto/dist/ipsec-tools/src/libipsec/test-policy.c
crypto/dist/ipsec-tools/src/racoon/admin.c
crypto/dist/ipsec-tools/src/racoon/admin.h
crypto/dist/ipsec-tools/src/racoon/admin_var.h
crypto/dist/ipsec-tools/src/racoon/algorithm.c
crypto/dist/ipsec-tools/src/racoon/algorithm.h
crypto/dist/ipsec-tools/src/racoon/backupsa.c
crypto/dist/ipsec-tools/src/racoon/backupsa.h
crypto/dist/ipsec-tools/src/racoon/cfparse.c
crypto/dist/ipsec-tools/src/racoon/cfparse.y
crypto/dist/ipsec-tools/src/racoon/cfparse_proto.h
crypto/dist/ipsec-tools/src/racoon/cftoken.c
crypto/dist/ipsec-tools/src/racoon/cftoken.l
crypto/dist/ipsec-tools/src/racoon/cftoken_proto.h
crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c
crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h
crypto/dist/ipsec-tools/src/racoon/debug.h
crypto/dist/ipsec-tools/src/racoon/debugrm.c
crypto/dist/ipsec-tools/src/racoon/debugrm.h
crypto/dist/ipsec-tools/src/racoon/dhgroup.h
crypto/dist/ipsec-tools/src/racoon/dnssec.c
crypto/dist/ipsec-tools/src/racoon/dnssec.h
crypto/dist/ipsec-tools/src/racoon/dump.c
crypto/dist/ipsec-tools/src/racoon/dump.h
crypto/dist/ipsec-tools/src/racoon/eaytest.c
crypto/dist/ipsec-tools/src/racoon/evt.c
crypto/dist/ipsec-tools/src/racoon/evt.h
crypto/dist/ipsec-tools/src/racoon/gcmalloc.h
crypto/dist/ipsec-tools/src/racoon/genlist.c
crypto/dist/ipsec-tools/src/racoon/genlist.h
crypto/dist/ipsec-tools/src/racoon/getcertsbyname.c
crypto/dist/ipsec-tools/src/racoon/gnuc.h
crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c
crypto/dist/ipsec-tools/src/racoon/grabmyaddr.h
crypto/dist/ipsec-tools/src/racoon/gssapi.c
crypto/dist/ipsec-tools/src/racoon/gssapi.h
crypto/dist/ipsec-tools/src/racoon/handler.c
crypto/dist/ipsec-tools/src/racoon/handler.h
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.h
crypto/dist/ipsec-tools/src/racoon/isakmp.c
crypto/dist/ipsec-tools/src/racoon/isakmp.h
crypto/dist/ipsec-tools/src/racoon/isakmp_agg.c
crypto/dist/ipsec-tools/src/racoon/isakmp_agg.h
crypto/dist/ipsec-tools/src/racoon/isakmp_base.c
crypto/dist/ipsec-tools/src/racoon/isakmp_base.h
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.h
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.h
crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c
crypto/dist/ipsec-tools/src/racoon/isakmp_ident.h
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.h
crypto/dist/ipsec-tools/src/racoon/isakmp_newg.c
crypto/dist/ipsec-tools/src/racoon/isakmp_newg.h
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.h
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.h
crypto/dist/ipsec-tools/src/racoon/isakmp_var.h
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.h
crypto/dist/ipsec-tools/src/racoon/kmpstat.c
crypto/dist/ipsec-tools/src/racoon/localconf.c
crypto/dist/ipsec-tools/src/racoon/localconf.h
crypto/dist/ipsec-tools/src/racoon/logger.c
crypto/dist/ipsec-tools/src/racoon/logger.h
crypto/dist/ipsec-tools/src/racoon/main.c
crypto/dist/ipsec-tools/src/racoon/misc.c
crypto/dist/ipsec-tools/src/racoon/misc.h
crypto/dist/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.c
crypto/dist/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.h
crypto/dist/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.c
crypto/dist/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.h
crypto/dist/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael.h
crypto/dist/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael_local.h
crypto/dist/ipsec-tools/src/racoon/missing/crypto/sha2/sha2.c
crypto/dist/ipsec-tools/src/racoon/missing/crypto/sha2/sha2.h
crypto/dist/ipsec-tools/src/racoon/missing/strdup.c
crypto/dist/ipsec-tools/src/racoon/nattraversal.c
crypto/dist/ipsec-tools/src/racoon/nattraversal.h
crypto/dist/ipsec-tools/src/racoon/netdb_dnssec.h
crypto/dist/ipsec-tools/src/racoon/oakley.c
crypto/dist/ipsec-tools/src/racoon/oakley.h
crypto/dist/ipsec-tools/src/racoon/pfkey.c
crypto/dist/ipsec-tools/src/racoon/pfkey.h
crypto/dist/ipsec-tools/src/racoon/plainrsa-gen.8
crypto/dist/ipsec-tools/src/racoon/plainrsa-gen.c
crypto/dist/ipsec-tools/src/racoon/plog.c
crypto/dist/ipsec-tools/src/racoon/plog.h
crypto/dist/ipsec-tools/src/racoon/policy.c
crypto/dist/ipsec-tools/src/racoon/policy.h
crypto/dist/ipsec-tools/src/racoon/privsep.c
crypto/dist/ipsec-tools/src/racoon/privsep.h
crypto/dist/ipsec-tools/src/racoon/proposal.c
crypto/dist/ipsec-tools/src/racoon/proposal.h
crypto/dist/ipsec-tools/src/racoon/prsa_par.c
crypto/dist/ipsec-tools/src/racoon/prsa_par.y
crypto/dist/ipsec-tools/src/racoon/prsa_tok.c
crypto/dist/ipsec-tools/src/racoon/prsa_tok.l
crypto/dist/ipsec-tools/src/racoon/racoon.8
crypto/dist/ipsec-tools/src/racoon/racoon.conf.5
crypto/dist/ipsec-tools/src/racoon/racoonctl.8
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
crypto/dist/ipsec-tools/src/racoon/racoonctl.h
crypto/dist/ipsec-tools/src/racoon/remoteconf.c
crypto/dist/ipsec-tools/src/racoon/remoteconf.h
crypto/dist/ipsec-tools/src/racoon/rsalist.c
crypto/dist/ipsec-tools/src/racoon/rsalist.h
crypto/dist/ipsec-tools/src/racoon/safefile.c
crypto/dist/ipsec-tools/src/racoon/safefile.h
crypto/dist/ipsec-tools/src/racoon/sainfo.c
crypto/dist/ipsec-tools/src/racoon/sainfo.h
crypto/dist/ipsec-tools/src/racoon/schedule.c
crypto/dist/ipsec-tools/src/racoon/schedule.h
crypto/dist/ipsec-tools/src/racoon/session.c
crypto/dist/ipsec-tools/src/racoon/session.h
crypto/dist/ipsec-tools/src/racoon/sockmisc.c
crypto/dist/ipsec-tools/src/racoon/sockmisc.h
crypto/dist/ipsec-tools/src/racoon/str2val.c
crypto/dist/ipsec-tools/src/racoon/str2val.h
crypto/dist/ipsec-tools/src/racoon/strnames.c
crypto/dist/ipsec-tools/src/racoon/strnames.h
crypto/dist/ipsec-tools/src/racoon/throttle.c
crypto/dist/ipsec-tools/src/racoon/throttle.h
crypto/dist/ipsec-tools/src/racoon/var.h
crypto/dist/ipsec-tools/src/racoon/vendorid.c
crypto/dist/ipsec-tools/src/racoon/vendorid.h
crypto/dist/ipsec-tools/src/racoon/vmbuf.c
crypto/dist/ipsec-tools/src/racoon/vmbuf.h
crypto/dist/ipsec-tools/src/setkey/extern.h
crypto/dist/ipsec-tools/src/setkey/parse.c
crypto/dist/ipsec-tools/src/setkey/parse.h
crypto/dist/ipsec-tools/src/setkey/parse.y
crypto/dist/ipsec-tools/src/setkey/setkey.8
crypto/dist/ipsec-tools/src/setkey/setkey.c
crypto/dist/ipsec-tools/src/setkey/test-pfkey.c
crypto/dist/ipsec-tools/src/setkey/token.c
crypto/dist/ipsec-tools/src/setkey/token.l
crypto/dist/ipsec-tools/src/setkey/vchar.h
lib/libipsec/Makefile
lib/libipsec/config.h
lib/libipsec/package_version.h
--- a/crypto/dist/ipsec-tools/ChangeLog	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/ChangeLog	Mon Nov 21 21:12:29 2005 +0000
@@ -1,3 +1,46 @@
+---------------------------------------------
+
+	0.6.3 released
+
+2005-11-21  Yvan Vanhullebus  <vanhu@netasq.com>
+
+	* src/racoon/isakmp_[ident|agg].c: Check if natt is available when
+	  receiving a NAT_D payload from initiator. It saves a crash,
+	  reported by Dave Huang to NetBSD.
+
+2005-11-20  Yvan Vanhullebus  <vanhu@netasq.com>
+
+	* src/racoon/isakmp_agg.c: Check that we got some needed payloads
+	  from peer (could cause a DoS). Crash reported by Adrian Portelli
+	  using IKE test suite from 
+	  http://www.ee.oulu.fi/research/ouspg/protos/testing/c09/isakmp/
+
+2005-11-06  Aidas Kasparas  <a.kasparas@gmc.lt>
+
+	* src/racoon/main.c, src/racoon/session.c: moved .pid file writing
+	  just before main loop. Thanks Stephen Thorne
+	* src/racoon/localconf.h, src/racoon/cftoken.l: introduced 
+	  path pidfile directive
+	* src/racoon/racoon.conf.5: documented above
+	* configure.ac: OpenSSL 0.9.8 compilation fix. Thank Ganesan 
+	  Rajagopal
+	* configure.ac: added check for strlcat function
+	* src/racoon/misc.h: define strlcat function for systems without one
+	* src/racoon/remoteconf.c: strncat -> strlcat
+
+2005-10-17  Aidas Kasparas  <a.kasparas@gmc.lt>
+
+	Introduced subnet sainfo type.
+	* src/racoon/cftoken.l: new token "subnet"
+	* src/racoon/cfparse.y: added address/subnet diferentiation logic
+	* src/racoon/ipsec-doi.h: new constant
+	* src/racoon/ipsec-doi.c: adopted to above
+	* src/racoon/racoon.conf.5: documented above
+	
+2005-10-14  Emmanuel Dreyfus  <manu@netbsd.org>
+
+	* src/libipsec/pfkey.c: One forgotten cast caddr_t -> void *
+
 ---------------------------------------------
 
 	0.6.2 released
--- a/crypto/dist/ipsec-tools/NEWS	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/NEWS	Mon Nov 21 21:12:29 2005 +0000
@@ -1,5 +1,8 @@
 Version history:
 ----------------
+0.6.3	- 21 November 2005
+	o Various bug fixes
+
 0.6.2	- 14 October 2005
 	o ISAKMP mode config works without Xauth
 
--- a/crypto/dist/ipsec-tools/configure.ac	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/configure.ac	Mon Nov 21 21:12:29 2005 +0000
@@ -1,8 +1,8 @@
 dnl -*- mode: m4 -*-
-dnl Id: configure.ac,v 1.47.2.29 2005/10/14 09:24:43 manubsd Exp
+dnl Id: configure.ac,v 1.47.2.31 2005/11/21 11:11:41 manubsd Exp
 
 AC_PREREQ(2.52)
-AC_INIT(ipsec-tools, 0.6.2)
+AC_INIT(ipsec-tools, 0.6.3)
 AC_CONFIG_SRCDIR([configure.ac])
 AM_CONFIG_HEADER(config.h)
 
@@ -108,7 +108,7 @@
 AC_FUNC_MEMCMP
 AC_TYPE_SIGNAL
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(gettimeofday select socket strerror strtol strtoul strlcpy)
+AC_CHECK_FUNCS(gettimeofday select socket strerror strtol strtoul strlcpy strlcat)
 AC_REPLACE_FUNCS(strdup)
 RACOON_CHECK_VA_COPY
 
@@ -210,13 +210,13 @@
 	AC_TRY_COMPILE([
 		#include <openssl/sha.h>
 	], [
-		typedef int SHA256_CTX;
+		SHA256_CTX ctx;
+	], [
+	    AC_MSG_RESULT(yes)
+	    AC_DEFINE([HAVE_SHA2_IN_SHA_H], [], [sha2 is defined in sha.h])
 	], [AC_MSG_RESULT(no)
 	    AC_LIBOBJ([sha2])
 	    CRYPTOBJS="$CRYPTOBJS sha2.o"
-	], [
-	    AC_MSG_RESULT(yes)
-	    AC_DEFINE([HAVE_SHA2_IN_SHA_H], [], [sha2 is defined in sha.h])
 	])
 
 	CPPFLAGS_ADD="$CPPFLAGS_ADD -I./\${top_srcdir}/src/racoon/missing"
--- a/crypto/dist/ipsec-tools/netbsd-import.sh	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/netbsd-import.sh	Mon Nov 21 21:12:29 2005 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: netbsd-import.sh,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $
+#	$NetBSD: netbsd-import.sh,v 1.1.1.2.2.2 2005/11/21 21:12:29 tron Exp $
 #
 # Copyright (c) 2000-2005 The NetBSD Foundation, Inc.
 # All rights reserved.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/ipsec-tools/rpm/suse/ipsec-tools.spec	Mon Nov 21 21:12:29 2005 +0000
@@ -0,0 +1,110 @@
+#
+# spec file for package ipsec-tools
+#
+# Copyright (c) 2005 SUSE LINUX AG, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+# norootforbuild
+# neededforbuild  kernel-source openssl openssl-devel readline-devel
+
+BuildRequires: aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv less libacl libattr libgcc libselinux libstdc++ libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt procinfo procps psmisc pwdutils rcs readline sed strace syslogd sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel autoconf automake binutils gcc gdbm gettext kernel-source libtool openssl-devel perl readline-devel rpm
+
+Name:         ipsec-tools
+Version:      0.6.3
+Release:      0
+License:      Other License(s), see package, BSD
+Group:        Productivity/Networking/Security
+Provides:     racoon
+PreReq:       %insserv_prereq %fillup_prereq
+Autoreqprov:  on
+Summary:      IPsec Utilities
+Source:       http://prdownloads.sourceforge.net/ipsec-tools/ipsec-tools-%{version}.tar.bz2
+Source1:      racoon.init
+Source2:      sysconfig.racoon
+URL:          http://ipsec-tools.sourceforge.net/
+Prefix:       /usr
+BuildRoot:    %{_tmppath}/%{name}-%{version}-build
+
+%description
+This is the IPsec-Tools package.  This package is needed to really make
+use of the IPsec functionality in the version 2.5 and 2.6 Linux
+kernels.  This package builds:
+
+- libipsec, a PFKeyV2 library
+
+- setkey, a program to directly manipulate policies and SAs
+
+- racoon, an IKEv1 keying daemon
+
+These sources can be found at the IPsec-Tools home page at:
+http://ipsec-tools.sourceforge.net/
+
+
+
+Authors:
+--------
+    Derek Atkins  <derek@ihtfp.com>
+    Michal Ludvig <mludvig@suse.cz>
+
+%prep
+%setup
+
+%build
+%{suse_update_config -f . src/racoon}
+CFLAGS="$RPM_OPT_FLAGS" \
+./configure --prefix=/usr --disable-shared \
+	--mandir=%{_mandir} --infodir=%{_infodir} --libdir=%{_libdir} \
+	--libexecdir=%{_libdir} --sysconfdir=/etc/racoon \
+	--sharedstatedir=/var/run --localstatedir=/var \
+	--enable-dpd --enable-hybrid --enable-frag
+make 
+make check
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+install -m 0755 $RPM_SOURCE_DIR/racoon.init $RPM_BUILD_ROOT/etc/init.d/racoon
+ln -sf /etc/init.d/racoon $RPM_BUILD_ROOT/usr/sbin/rcracoon
+mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
+install -m 644 $RPM_SOURCE_DIR/sysconfig.racoon $RPM_BUILD_ROOT/var/adm/fillup-templates/
+mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}/
+cp -rv src/racoon/samples $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}/
+cp -v src/setkey/sample* $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}/
+
+%post
+%{fillup_and_insserv racoon}
+
+%postun
+%{insserv_cleanup}
+
+%clean
+if test ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/"; then
+  rm -rf $RPM_BUILD_ROOT
+fi
+
+%files
+%defattr(-,root,root)
+%dir /etc/racoon
+%config(noreplace) /etc/racoon/psk.txt
+%config(noreplace) /etc/racoon/racoon.conf
+%config(noreplace) /etc/racoon/setkey.conf
+%config /etc/init.d/racoon
+/usr/sbin/rcracoon
+%dir /usr/include/libipsec/
+%doc /usr/share/doc/packages/%{name}/
+/var/adm/fillup-templates/sysconfig.racoon
+/usr/include/libipsec/libpfkey.h
+/usr/%{_lib}/libipsec.a
+/usr/%{_lib}/libipsec.la
+/usr/sbin/racoon
+/usr/sbin/racoonctl
+/usr/sbin/setkey
+/usr/sbin/plainrsa-gen
+%{_mandir}/man*/*
+
+%changelog -n ipsec-tools
--- a/crypto/dist/ipsec-tools/src/include-glibc/glibc-bugs.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/include-glibc/glibc-bugs.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: glibc-bugs.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: glibc-bugs.h,v 1.1.1.2.2.2 2005/11/21 21:12:29 tron Exp $	*/
 
 #ifndef __GLIBC_BUGS_H__
 #define __GLIBC_BUGS_H__ 1
--- a/crypto/dist/ipsec-tools/src/include-glibc/net/pfkeyv2.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/include-glibc/net/pfkeyv2.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfkeyv2.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: pfkeyv2.h,v 1.1.1.2.2.2 2005/11/21 21:12:29 tron Exp $	*/
 
 #ifndef __NET_PFKEYV2_H_
 #define __NET_PFKEYV2_H_ 1
--- a/crypto/dist/ipsec-tools/src/include-glibc/netinet/ipsec.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/include-glibc/netinet/ipsec.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: ipsec.h,v 1.1.1.2.2.2 2005/11/21 21:12:29 tron Exp $	*/
 
 #include <net/pfkeyv2.h>
 #include <linux/ipsec.h>
--- a/crypto/dist/ipsec-tools/src/include-glibc/sys/queue.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/include-glibc/sys/queue.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: queue.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: queue.h,v 1.1.1.2.2.2 2005/11/21 21:12:29 tron Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_dump_policy.c,v 1.1.1.2.2.2 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: ipsec_dump_policy.c,v 1.1.1.2.2.3 2005/11/21 21:12:29 tron Exp $	*/
 
 /* Id: ipsec_dump_policy.c,v 1.7.4.2 2005/06/29 13:01:27 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_get_policylen.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: ipsec_get_policylen.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: ipsec_get_policylen.c,v 1.5 2000/05/07 05:25:03 itojun Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipsec_set_policy.3,v 1.1.1.2.2.2 2005/09/03 07:03:49 snj Exp $
+.\"	$NetBSD: ipsec_set_policy.3,v 1.1.1.2.2.3 2005/11/21 21:12:30 tron Exp $
 .\"
 .\"	$KAME: ipsec_set_policy.3,v 1.16 2003/01/06 21:59:03 sumikawa Exp $
 .\"
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.3	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.3	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipsec_strerror.3,v 1.1.1.2.2.2 2005/09/03 07:03:49 snj Exp $
+.\"	$NetBSD: ipsec_strerror.3,v 1.1.1.2.2.3 2005/11/21 21:12:30 tron Exp $
 .\"
 .\"	$KAME: ipsec_strerror.3,v 1.9 2001/08/17 07:21:36 itojun Exp $
 .\"
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_strerror.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: ipsec_strerror.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: ipsec_strerror.c,v 1.7 2000/07/30 00:45:12 itojun Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_strerror.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_strerror.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: ipsec_strerror.h,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: ipsec_strerror.h,v 1.4 2004/06/07 09:18:46 ludvigm Exp */
 
--- a/crypto/dist/ipsec-tools/src/libipsec/key_debug.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/key_debug.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: key_debug.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: key_debug.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: key_debug.c,v 1.29 2001/08/16 14:25:41 itojun Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: libpfkey.h,v 1.3.2.2 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: libpfkey.h,v 1.3.2.3 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: libpfkey.h,v 1.8.2.3 2005/06/29 13:01:28 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/libipsec/pfkey.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/pfkey.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfkey.c,v 1.1.1.2.2.3 2005/10/21 17:08:17 riz Exp $	*/
+/*	$NetBSD: pfkey.c,v 1.1.1.2.2.4 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: pfkey.c,v 1.47 2003/10/02 19:52:12 itojun Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfkey_dump.c,v 1.1.1.2.2.5 2005/10/21 17:08:17 riz Exp $	*/
+/*	$NetBSD: pfkey_dump.c,v 1.1.1.2.2.6 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: pfkey_dump.c,v 1.45 2003/09/08 10:14:56 itojun Exp $	*/
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/policy_parse.c	Mon Nov 21 21:12:29 2005 +0000
@@ -0,0 +1,1545 @@
+/*	$NetBSD: policy_parse.c,v 1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
+
+
+/*  A Bison parser, made from policy_parse.y
+    by GNU Bison version 1.28  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define yyparse __libipsecparse
+#define yylex __libipseclex
+#define yyerror __libipsecerror
+#define yylval __libipseclval
+#define yychar __libipsecchar
+#define yydebug __libipsecdebug
+#define yynerrs __libipsecnerrs
+#define	DIR	257
+#define	PRIORITY	258
+#define	PLUS	259
+#define	PRIO_BASE	260
+#define	PRIO_OFFSET	261
+#define	ACTION	262
+#define	PROTOCOL	263
+#define	MODE	264
+#define	LEVEL	265
+#define	LEVEL_SPECIFY	266
+#define	IPADDRESS	267
+#define	PORT	268
+#define	ME	269
+#define	ANY	270
+#define	SLASH	271
+#define	HYPHEN	272
+
+#line 63 "policy_parse.y"
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#ifdef HAVE_NETINET6_IPSEC
+#  include <netinet6/ipsec.h>
+#else
+#  include <netinet/ipsec.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <netdb.h>
+
+#include <errno.h>
+
+#include "config.h"
+
+#include "ipsec_strerror.h"
+#include "libpfkey.h"
+
+#ifndef INT32_MAX
+#define INT32_MAX	(0xffffffff)
+#endif
+
+#ifndef INT32_MIN
+#define INT32_MIN	(-INT32_MAX-1)
+#endif
+
+#define ATOX(c) \
+  (isdigit(c) ? (c - '0') : (isupper(c) ? (c - 'A' + 10) : (c - 'a' + 10) ))
+
+static u_int8_t *pbuf = NULL;		/* sadb_x_policy buffer */
+static int tlen = 0;			/* total length of pbuf */
+static int offset = 0;			/* offset of pbuf */
+static int p_dir, p_type, p_protocol, p_mode, p_level, p_reqid;
+static u_int32_t p_priority = 0;
+static long p_priority_offset = 0;
+static struct sockaddr *p_src = NULL;
+static struct sockaddr *p_dst = NULL;
+
+struct _val;
+extern void yyerror __P((char *msg));
+static struct sockaddr *parse_sockaddr __P((struct _val *addrbuf,
+    struct _val *portbuf));
+static int rule_check __P((void));
+static int init_x_policy __P((void));
+static int set_x_request __P((struct sockaddr *, struct sockaddr *));
+static int set_sockaddr __P((struct sockaddr *));
+static void policy_parse_request_init __P((void));
+static void *policy_parse __P((const char *, int));
+
+extern void __policy__strbuffer__init__ __P((const char *));
+extern void __policy__strbuffer__free__ __P((void));
+extern int yyparse __P((void));
+extern int yylex __P((void));
+
+extern char *__libipsectext;	/*XXX*/
+
+
+#line 131 "policy_parse.y"
+typedef union {
+	u_int num;
+	u_int32_t num32;
+	struct _val {
+		int len;
+		char *buf;
+	} val;
+} YYSTYPE;
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define	YYFINAL		60
+#define	YYFLAG		-32768
+#define	YYNTBASE	19
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 272 ? yytranslate[x] : 34)
+
+static const char yytranslate[] = {     0,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
+     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+    17,    18
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = {     0,
+     0,     1,     6,     7,    14,    15,    23,    24,    31,    32,
+    41,    42,    51,    53,    54,    57,    65,    72,    78,    83,
+    90,    94,    97,    99,   101,   103,   105,   107,   108,   113,
+   114,   121,   125
+};
+
+static const short yyrhs[] = {    -1,
+     3,     8,    20,    26,     0,     0,     3,     4,     7,     8,
+    21,    26,     0,     0,     3,     4,    18,     7,     8,    22,
+    26,     0,     0,     3,     4,     6,     8,    23,    26,     0,
+     0,     3,     4,     6,     5,     7,     8,    24,    26,     0,
+     0,     3,     4,     6,    18,     7,     8,    25,    26,     0,
+     3,     0,     0,    26,    27,     0,    28,    17,    29,    17,
+    31,    17,    30,     0,    28,    17,    29,    17,    31,    17,
+     0,    28,    17,    29,    17,    31,     0,    28,    17,    29,
+    17,     0,    28,    17,    29,    17,    17,    30,     0,    28,
+    17,    29,     0,    28,    17,     0,    28,     0,     9,     0,
+    10,     0,    11,     0,    12,     0,     0,    13,    32,    18,
+    13,     0,     0,    13,    14,    33,    18,    13,    14,     0,
+    15,    18,    16,     0,    16,    18,    15,     0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+   152,   167,   167,   203,   203,   225,   225,   236,   236,   258,
+   258,   280,   280,   293,   294,   306,   307,   308,   309,   310,
+   311,   312,   316,   323,   327,   331,   335,   342,   348,   353,
+   359,   364,   370
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = {   "$","error","$undefined.","DIR","PRIORITY",
+"PLUS","PRIO_BASE","PRIO_OFFSET","ACTION","PROTOCOL","MODE","LEVEL","LEVEL_SPECIFY",
+"IPADDRESS","PORT","ME","ANY","SLASH","HYPHEN","policy_spec","@1","@2","@3",
+"@4","@5","@6","rules","rule","protocol","mode","level","addresses","@7","@8", NULL
+};
+#endif
+
+static const short yyr1[] = {     0,
+    20,    19,    21,    19,    22,    19,    23,    19,    24,    19,
+    25,    19,    19,    26,    26,    27,    27,    27,    27,    27,
+    27,    27,    27,    28,    29,    30,    30,    32,    31,    33,
+    31,    31,    31
+};
+
+static const short yyr2[] = {     0,
+     0,     4,     0,     6,     0,     7,     0,     6,     0,     8,
+     0,     8,     1,     0,     2,     7,     6,     5,     4,     6,
+     3,     2,     1,     1,     1,     1,     1,     0,     4,     0,
+     6,     3,     3
+};
+
+static const short yydefact[] = {     0,
+    13,     0,     1,     0,     0,     0,    14,     0,     7,     0,
+     3,     0,     2,     0,    14,     0,    14,     5,    24,    15,
+    23,     9,     8,    11,     4,    14,    22,    14,    14,     6,
+    25,    21,    10,    12,    19,    28,     0,     0,     0,    18,
+    30,     0,     0,     0,    26,    27,    20,    17,     0,     0,
+    32,    33,    16,     0,    29,     0,    31,     0,     0,     0
+};
+
+static const short yydefgoto[] = {    58,
+     7,    17,    26,    15,    28,    29,    13,    20,    21,    32,
+    47,    40,    42,    49
+};
+
+static const short yypact[] = {     6,
+    -3,     1,-32768,    -2,    -4,     3,-32768,     8,-32768,    10,
+-32768,     4,    16,    18,-32768,    19,-32768,-32768,-32768,-32768,
+    11,-32768,    16,-32768,    16,-32768,    20,-32768,-32768,    16,
+-32768,    14,    16,    16,     5,    15,    17,    21,    12,    23,
+-32768,    24,    22,    26,-32768,-32768,-32768,    12,    25,    31,
+-32768,-32768,-32768,    32,-32768,    33,-32768,    34,    36,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,   -15,-32768,-32768,-32768,
+   -16,-32768,-32768,-32768
+};
+
+
+#define	YYLAST		47
+
+
+static const short yytable[] = {    23,
+     2,    25,     8,    11,     3,     9,     4,     5,     1,    12,
+    30,    18,    33,    34,    14,    10,    16,    36,     6,    37,
+    38,    39,    45,    46,    19,    22,    24,    27,    41,    31,
+    35,    53,     0,    59,    43,    60,     0,    51,    44,    48,
+    52,    50,    54,    55,    56,     0,    57
+};
+
+static const short yycheck[] = {    15,
+     4,    17,     5,     8,     8,     8,     6,     7,     3,     7,
+    26,     8,    28,    29,     7,    18,     7,    13,    18,    15,
+    16,    17,    11,    12,     9,     8,     8,    17,    14,    10,
+    17,    48,    -1,     0,    18,     0,    -1,    16,    18,    17,
+    15,    18,    18,    13,    13,    -1,    14
+};
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/lib/bison.simple"
+/* This file comes from bison-1.28.  */
+
+/* Skeleton output parser for bison,
+   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser
+  when the %semantic_parser declaration is not specified in the grammar.
+  It was written by Richard Stallman by simplifying the hairy parser
+  used when %semantic_parser is specified.  */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C.  */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C.  */
+/* This used to test MSDOS, but that is a bad idea
+   since that symbol is in the user namespace.  */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+	 instead, just don't use alloca.  */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+   So I turned it off.   rms, 2 May 1997.  */
+/* #include <malloc.h>  */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+		 and on HPUX 10.  Eventually we can turn this on.  */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+   It is replaced by the list of actions, each action
+   as one case of the switch.  */
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+   This remains here temporarily to ease the
+   transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    { yychar = (token), yylval = (value);			\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+#ifndef YYPURE
+#define YYLEX		yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int	yychar;			/*  the lookahead symbol		*/
+YYSTYPE	yylval;			/*  the semantic value of the		*/
+				/*  lookahead symbol			*/
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc;			/*  location data for the lookahead	*/
+				/*  symbol				*/
+#endif
+
+int yynerrs;			/*  number of parse errors so far       */
+#endif  /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug;			/*  nonzero means print parse trace	*/
+/* Since this is uninitialized, it does not stop multiple parsers
+   from coexisting.  */
+#endif
+
+/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
+
+#ifndef	YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/*  YYMAXDEPTH is the maximum size the stacks can grow to
+    (effective only if the built-in stack extension method is used).  */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy.  Note that the size argument
+   should be passed with type unsigned int, because that is what the non-GCC
+   definitions require.  With GCC, __builtin_memcpy takes an arg
+   of type size_t, but it can handle unsigned int.  */
+
+#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
+#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
+#else				/* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (to, from, count)
+     char *to;
+     char *from;
+     unsigned int count;
+{
+  register char *f = from;
+  register char *t = to;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+  register char *t = to;
+  register char *f = from;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/lib/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  register int yystate;
+  register int yyn;
+  register short *yyssp;
+  register YYSTYPE *yyvsp;
+  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
+  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
+
+  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
+  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
+
+  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
+  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+
+#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  int yystacksize = YYINITDEPTH;
+  int yyfree_stacks = 0;
+
+#ifdef YYPURE
+  int yychar;
+  YYSTYPE yylval;
+  int yynerrs;
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylloc;
+#endif
+#endif
+
+  YYSTYPE yyval;		/*  the variable used to return		*/
+				/*  semantic values from the action	*/
+				/*  routines				*/
+
+  int yylen;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Starting parse\n");
+#endif
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss - 1;
+  yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in  yystate  .  */
+/* In all cases, when you get here, the value and location stacks
+   have just been pushed. so pushing a state here evens the stacks.  */
+yynewstate:
+
+  *++yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Give user a chance to reallocate the stack */
+      /* Use copies of these so that the &'s don't force the real ones into memory. */
+      YYSTYPE *yyvs1 = yyvs;
+      short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+      YYLTYPE *yyls1 = yyls;
+#endif
+
+      /* Get the current used size of the three stacks, in elements.  */
+      int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      /* Each stack pointer address is followed by the size of
+	 the data in use in that stack, in bytes.  */
+#ifdef YYLSP_NEEDED
+      /* This used to be a conditional around just the two extra args,
+	 but that might be undefined if yyoverflow is a macro.  */
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yyls1, size * sizeof (*yylsp),
+		 &yystacksize);
+#else
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yystacksize);
+#endif
+
+      yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+      yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	{
+	  yyerror("parser stack overflow");
+	  if (yyfree_stacks)
+	    {
+	      free (yyss);
+	      free (yyvs);
+#ifdef YYLSP_NEEDED
+	      free (yyls);
+#endif
+	    }
+	  return 2;
+	}
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+      yyfree_stacks = 1;
+#endif
+      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+      __yy_memcpy ((char *)yyss, (char *)yyss1,
+		   size * (unsigned int) sizeof (*yyssp));
+      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+		   size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+      __yy_memcpy ((char *)yyls, (char *)yyls1,
+		   size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + size - 1;
+      yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+      yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+  goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Reading a token: ");
+#endif
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Now at end of input.\n");
+#endif
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+      if (yydebug)
+	{
+	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise meaning
+	     of a token, for further debugging info.  */
+#ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+#endif
+	  fprintf (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* count tokens shifted since error; after three, turn off error status.  */
+  if (yyerrstatus) yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+/* Do the default action for the current state.  */
+yydefault:
+
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+
+/* Do a reduction.  yyn is the number of a rule to reduce with.  */
+yyreduce:
+  yylen = yyr2[yyn];
+  if (yylen > 0)
+    yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      int i;
+
+      fprintf (stderr, "Reducing via rule %d (line %d), ",
+	       yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+
+  switch (yyn) {
+
+case 1:
+#line 153 "policy_parse.y"
+{
+			p_dir = yyvsp[-1].num;
+			p_type = yyvsp[0].num;
+
+#ifdef HAVE_PFKEY_POLICY_PRIORITY
+			p_priority = PRIORITY_DEFAULT;
+#else
+			p_priority = 0;
+#endif
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 3:
+#line 168 "policy_parse.y"
+{
+			char *offset_buf;
+
+			p_dir = yyvsp[-3].num;
+			p_type = yyvsp[0].num;
+
+			/* buffer big enough to hold a prepended negative sign */
+			offset_buf = malloc(yyvsp[-1].val.len + 2);
+			if (offset_buf == NULL) 
+			{
+				__ipsec_errcode = EIPSEC_NO_BUFS;
+				return -1;
+			}
+
+			/* positive input value means higher priority, therefore lower
+			   actual value so that is closer to the beginning of the list */
+			sprintf (offset_buf, "-%s", yyvsp[-1].val.buf);
+
+			errno = 0;
+			p_priority_offset = atol(offset_buf);
+
+			free(offset_buf);
+
+			if (errno != 0 || p_priority_offset < INT32_MIN)
+			{
+				__ipsec_errcode = EIPSEC_INVAL_PRIORITY_OFFSET;
+				return -1;
+			}
+
+			p_priority = PRIORITY_DEFAULT + (u_int32_t) p_priority_offset;
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 5:
+#line 204 "policy_parse.y"
+{
+			p_dir = yyvsp[-4].num;
+			p_type = yyvsp[0].num;
+
+			errno = 0;
+			p_priority_offset = atol(yyvsp[-1].val.buf);
+
+			if (errno != 0 || p_priority_offset > INT32_MAX)
+			{
+				__ipsec_errcode = EIPSEC_INVAL_PRIORITY_OFFSET;
+				return -1;
+			}
+
+			/* negative input value means lower priority, therefore higher
+			   actual value so that is closer to the end of the list */
+			p_priority = PRIORITY_DEFAULT + (u_int32_t) p_priority_offset;
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 7:
+#line 226 "policy_parse.y"
+{
+			p_dir = yyvsp[-3].num;
+			p_type = yyvsp[0].num;
+
+			p_priority = yyvsp[-1].num32;
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 9:
+#line 237 "policy_parse.y"
+{
+			p_dir = yyvsp[-5].num;
+			p_type = yyvsp[0].num;
+
+			errno = 0;
+			p_priority_offset = atol(yyvsp[-1].val.buf);
+
+			if (errno != 0 || p_priority_offset > PRIORITY_OFFSET_NEGATIVE_MAX)
+			{
+				__ipsec_errcode = EIPSEC_INVAL_PRIORITY_BASE_OFFSET;
+				return -1;
+			}
+
+			/* adding value means higher priority, therefore lower
+			   actual value so that is closer to the beginning of the list */
+			p_priority = yyvsp[-3].num32 - (u_int32_t) p_priority_offset;
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 11:
+#line 259 "policy_parse.y"
+{
+			p_dir = yyvsp[-5].num;
+			p_type = yyvsp[0].num;
+
+			errno = 0;
+			p_priority_offset = atol(yyvsp[-1].val.buf);
+
+			if (errno != 0 || p_priority_offset > PRIORITY_OFFSET_POSITIVE_MAX)
+			{
+				__ipsec_errcode = EIPSEC_INVAL_PRIORITY_BASE_OFFSET;
+				return -1;
+			}
+
+			/* subtracting value means lower priority, therefore higher
+			   actual value so that is closer to the end of the list */
+			p_priority = yyvsp[-3].num32 + (u_int32_t) p_priority_offset;
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 13:
+#line 281 "policy_parse.y"
+{
+			p_dir = yyvsp[0].num;
+			p_type = 0;	/* ignored it by kernel */
+
+			p_priority = 0;
+
+			if (init_x_policy())
+				return -1;
+		;
+    break;}
+case 15:
+#line 294 "policy_parse.y"
+{
+			if (rule_check() < 0)
+				return -1;
+
+			if (set_x_request(p_src, p_dst) < 0)
+				return -1;
+
+			policy_parse_request_init();
+		;
+    break;}
+case 22:
+#line 312 "policy_parse.y"
+{
+			__ipsec_errcode = EIPSEC_FEW_ARGUMENTS;
+			return -1;
+		;
+    break;}
+case 23:
+#line 316 "policy_parse.y"
+{
+			__ipsec_errcode = EIPSEC_FEW_ARGUMENTS;
+			return -1;
+		;
+    break;}
+case 24:
+#line 323 "policy_parse.y"
+{ p_protocol = yyvsp[0].num; ;
+    break;}
+case 25:
+#line 327 "policy_parse.y"
+{ p_mode = yyvsp[0].num; ;
+    break;}
+case 26:
+#line 331 "policy_parse.y"
+{
+			p_level = yyvsp[0].num;
+			p_reqid = 0;
+		;
+    break;}
+case 27:
+#line 335 "policy_parse.y"
+{
+			p_level = IPSEC_LEVEL_UNIQUE;
+			p_reqid = atol(yyvsp[0].val.buf);	/* atol() is good. */
+		;
+    break;}
+case 28:
+#line 342 "policy_parse.y"
+{
+			p_src = parse_sockaddr(&yyvsp[0].val, NULL);
+			if (p_src == NULL)
+				return -1;
+		;
+    break;}
+case 29:
+#line 348 "policy_parse.y"
+{
+			p_dst = parse_sockaddr(&yyvsp[0].val, NULL);
+			if (p_dst == NULL)
+				return -1;
+		;
+    break;}
+case 30:
+#line 353 "policy_parse.y"
+{
+			p_src = parse_sockaddr(&yyvsp[-1].val, &yyvsp[0].val);
+			if (p_src == NULL)
+				return -1;
+		;
+    break;}
+case 31:
+#line 359 "policy_parse.y"
+{
+			p_dst = parse_sockaddr(&yyvsp[-1].val, &yyvsp[0].val);
+			if (p_dst == NULL)
+				return -1;
+		;
+    break;}
+case 32:
+#line 364 "policy_parse.y"
+{
+			if (p_dir != IPSEC_DIR_OUTBOUND) {
+				__ipsec_errcode = EIPSEC_INVAL_DIR;
+				return -1;
+			}
+		;
+    break;}
+case 33:
+#line 370 "policy_parse.y"
+{
+			if (p_dir != IPSEC_DIR_INBOUND) {
+				__ipsec_errcode = EIPSEC_INVAL_DIR;
+				return -1;
+			}
+		;
+    break;}
+}
+   /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/lib/bison.simple"
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+  yylsp++;
+  if (yylen == 0)
+    {
+      yylsp->first_line = yylloc.first_line;
+      yylsp->first_column = yylloc.first_column;
+      yylsp->last_line = (yylsp-1)->last_line;
+      yylsp->last_column = (yylsp-1)->last_column;
+      yylsp->text = 0;
+    }
+  else
+    {
+      yylsp->last_line = (yylsp+yylen-1)->last_line;
+      yylsp->last_column = (yylsp+yylen-1)->last_column;
+    }
+#endif
+
+  /* Now "shift" the result of the reduction.
+     Determine what state that goes to,
+     based on the state we popped back to
+     and the rule number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+yyerrlab:   /* here on detecting error */
+
+  if (! yyerrstatus)
+    /* If not already recovering from an error, report this error.  */
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  int size = 0;
+	  char *msg;
+	  int x, count;
+
+	  count = 0;
+	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
+	  for (x = (yyn < 0 ? -yyn : 0);
+	       x < (sizeof(yytname) / sizeof(char *)); x++)
+	    if (yycheck[x + yyn] == x)
+	      size += strlen(yytname[x]) + 15, count++;
+	  msg = (char *) malloc(size + 15);
+	  if (msg != 0)
+	    {
+	      strcpy(msg, "parse error");
+
+	      if (count < 5)
+		{
+		  count = 0;
+		  for (x = (yyn < 0 ? -yyn : 0);
+		       x < (sizeof(yytname) / sizeof(char *)); x++)
+		    if (yycheck[x + yyn] == x)
+		      {
+			strcat(msg, count == 0 ? ", expecting `" : " or `");
+			strcat(msg, yytname[x]);
+			strcat(msg, "'");
+			count++;
+		      }
+		}
+	      yyerror(msg);
+	      free(msg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exceeded");
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror("parse error");
+    }
+
+  goto yyerrlab1;
+yyerrlab1:   /* here on error raised explicitly by an action */
+
+  if (yyerrstatus == 3)
+    {
+      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token
+     after shifting the error token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+yyerrdefault:  /* current state does not do anything special for the error token. */
+
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
+  if (yyn) goto yydefault;
+#endif
+
+yyerrpop:   /* pop the current state because it cannot handle the error token */
+
+  if (yyssp == yyss) YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "Error: state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+yyerrhandle:
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting error token, ");
+#endif
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+ yyacceptlab:
+  /* YYACCEPT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 0;
+
+ yyabortlab:
+  /* YYABORT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 1;
+}
+#line 381 "policy_parse.y"
+
+
+void
+yyerror(msg)
+	char *msg;
+{
+	fprintf(stderr, "libipsec: %s while parsing \"%s\"\n",
+		msg, __libipsectext);
+
+	return;
+}
+
+static struct sockaddr *
+parse_sockaddr(addrbuf, portbuf)
+	struct _val *addrbuf;
+	struct _val *portbuf;
+{
+	struct addrinfo hints, *res;
+	char *addr;
+	char *serv = NULL;
+	int error;
+	struct sockaddr *newaddr = NULL;
+
+	if ((addr = malloc(addrbuf->len + 1)) == NULL) {
+		yyerror("malloc failed");
+		__ipsec_set_strerror(strerror(errno));
+		return NULL;
+	}
+
+	if (portbuf && ((serv = malloc(portbuf->len + 1)) == NULL)) {
+		free(addr);
+		yyerror("malloc failed");
+		__ipsec_set_strerror(strerror(errno));
+		return NULL;
+	}
+
+	strncpy(addr, addrbuf->buf, addrbuf->len);
+	addr[addrbuf->len] = '\0';
+
+	if (portbuf) {
+		strncpy(serv, portbuf->buf, portbuf->len);
+		serv[portbuf->len] = '\0';
+	}
+
+	memset(&hints, 0, sizeof(hints));
+	hints.ai_family = PF_UNSPEC;
+	hints.ai_flags = AI_NUMERICHOST;
+	hints.ai_socktype = SOCK_DGRAM;
+	error = getaddrinfo(addr, serv, &hints, &res);
+	free(addr);
+	if (serv != NULL)
+		free(serv);
+	if (error != 0) {
+		yyerror("invalid IP address");
+		__ipsec_set_strerror(gai_strerror(error));
+		return NULL;
+	}
+
+	if (res->ai_addr == NULL) {
+		yyerror("invalid IP address");
+		__ipsec_set_strerror(gai_strerror(error));
+		return NULL;
+	}
+
+	newaddr = malloc(res->ai_addrlen);
+	if (newaddr == NULL) {
+		__ipsec_errcode = EIPSEC_NO_BUFS;
+		freeaddrinfo(res);
+		return NULL;
+	}
+	memcpy(newaddr, res->ai_addr, res->ai_addrlen);
+
+	freeaddrinfo(res);
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+	return newaddr;
+}
+
+static int
+rule_check()
+{
+	if (p_type == IPSEC_POLICY_IPSEC) {
+		if (p_protocol == IPPROTO_IP) {
+			__ipsec_errcode = EIPSEC_NO_PROTO;
+			return -1;
+		}
+
+		if (p_mode != IPSEC_MODE_TRANSPORT
+		 && p_mode != IPSEC_MODE_TUNNEL) {
+			__ipsec_errcode = EIPSEC_INVAL_MODE;
+			return -1;
+		}
+
+		if (p_src == NULL && p_dst == NULL) {
+			 if (p_mode != IPSEC_MODE_TRANSPORT) {
+				__ipsec_errcode = EIPSEC_INVAL_ADDRESS;
+				return -1;
+			}
+		}
+		else if (p_src->sa_family != p_dst->sa_family) {
+			__ipsec_errcode = EIPSEC_FAMILY_MISMATCH;
+			return -1;
+		}
+	}
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+	return 0;
+}
+
+static int
+init_x_policy()
+{
+	struct sadb_x_policy *p;
+
+	if (pbuf) {
+		free(pbuf);
+		tlen = 0;
+	}
+	pbuf = malloc(sizeof(struct sadb_x_policy));
+	if (pbuf == NULL) {
+		__ipsec_errcode = EIPSEC_NO_BUFS;
+		return -1;
+	}
+	tlen = sizeof(struct sadb_x_policy);
+
+	memset(pbuf, 0, tlen);
+	p = (struct sadb_x_policy *)pbuf;
+	p->sadb_x_policy_len = 0;	/* must update later */
+	p->sadb_x_policy_exttype = SADB_X_EXT_POLICY;
+	p->sadb_x_policy_type = p_type;
+	p->sadb_x_policy_dir = p_dir;
+	p->sadb_x_policy_id = 0;
+#ifdef HAVE_PFKEY_POLICY_PRIORITY
+	p->sadb_x_policy_priority = p_priority;
+#else
+    /* fail if given a priority and libipsec was not compiled with 
+	   priority support */
+	if (p_priority != 0)
+	{
+		__ipsec_errcode = EIPSEC_PRIORITY_NOT_COMPILED;
+		return -1;
+	}
+#endif
+
+	offset = tlen;
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+	return 0;
+}
+
+static int
+set_x_request(src, dst)
+	struct sockaddr *src, *dst;
+{
+	struct sadb_x_ipsecrequest *p;
+	int reqlen;
+	u_int8_t *n;
+
+	reqlen = sizeof(*p)
+		+ (src ? sysdep_sa_len(src) : 0)
+		+ (dst ? sysdep_sa_len(dst) : 0);
+	tlen += reqlen;		/* increment to total length */
+
+	n = realloc(pbuf, tlen);
+	if (n == NULL) {
+		__ipsec_errcode = EIPSEC_NO_BUFS;
+		return -1;
+	}
+	pbuf = n;
+
+	p = (struct sadb_x_ipsecrequest *)&pbuf[offset];
+	p->sadb_x_ipsecrequest_len = reqlen;
+	p->sadb_x_ipsecrequest_proto = p_protocol;
+	p->sadb_x_ipsecrequest_mode = p_mode;
+	p->sadb_x_ipsecrequest_level = p_level;
+	p->sadb_x_ipsecrequest_reqid = p_reqid;
+	offset += sizeof(*p);
+
+	if (set_sockaddr(src) || set_sockaddr(dst))
+		return -1;
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+	return 0;
+}
+
+static int
+set_sockaddr(addr)
+	struct sockaddr *addr;
+{
+	if (addr == NULL) {
+		__ipsec_errcode = EIPSEC_NO_ERROR;
+		return 0;
+	}
+
+	/* tlen has already incremented */
+
+	memcpy(&pbuf[offset], addr, sysdep_sa_len(addr));
+
+	offset += sysdep_sa_len(addr);
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+	return 0;
+}
+
+static void
+policy_parse_request_init()
+{
+	p_protocol = IPPROTO_IP;
+	p_mode = IPSEC_MODE_ANY;
+	p_level = IPSEC_LEVEL_DEFAULT;
+	p_reqid = 0;
+	if (p_src != NULL) {
+		free(p_src);
+		p_src = NULL;
+	}
+	if (p_dst != NULL) {
+		free(p_dst);
+		p_dst = NULL;
+	}
+
+	return;
+}
+
+static void *
+policy_parse(msg, msglen)
+	const char *msg;
+	int msglen;
+{
+	int error;
+
+	pbuf = NULL;
+	tlen = 0;
+
+	/* initialize */
+	p_dir = IPSEC_DIR_INVALID;
+	p_type = IPSEC_POLICY_DISCARD;
+	policy_parse_request_init();
+	__policy__strbuffer__init__(msg);
+
+	error = yyparse();	/* it must be set errcode. */
+	__policy__strbuffer__free__();
+
+	if (error) {
+		if (pbuf != NULL)
+			free(pbuf);
+		return NULL;
+	}
+
+	/* update total length */
+	((struct sadb_x_policy *)pbuf)->sadb_x_policy_len = PFKEY_UNIT64(tlen);
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+
+	return pbuf;
+}
+
+ipsec_policy_t
+ipsec_set_policy(msg, msglen)
+	__ipsec_const char *msg;
+	int msglen;
+{
+	caddr_t policy;
+
+	policy = policy_parse(msg, msglen);
+	if (policy == NULL) {
+		if (__ipsec_errcode == EIPSEC_NO_ERROR)
+			__ipsec_errcode = EIPSEC_INVAL_ARGUMENT;
+		return NULL;
+	}
+
+	__ipsec_errcode = EIPSEC_NO_ERROR;
+	return policy;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/policy_parse.h	Mon Nov 21 21:12:29 2005 +0000
@@ -0,0 +1,29 @@
+/*	$NetBSD: policy_parse.h,v 1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
+
+typedef union {
+	u_int num;
+	u_int32_t num32;
+	struct _val {
+		int len;
+		char *buf;
+	} val;
+} YYSTYPE;
+#define	DIR	257
+#define	PRIORITY	258
+#define	PLUS	259
+#define	PRIO_BASE	260
+#define	PRIO_OFFSET	261
+#define	ACTION	262
+#define	PROTOCOL	263
+#define	MODE	264
+#define	LEVEL	265
+#define	LEVEL_SPECIFY	266
+#define	IPADDRESS	267
+#define	PORT	268
+#define	ME	269
+#define	ANY	270
+#define	SLASH	271
+#define	HYPHEN	272
+
+
+extern YYSTYPE __libipseclval;
--- a/crypto/dist/ipsec-tools/src/libipsec/policy_parse.y	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/policy_parse.y	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: policy_parse.y,v 1.1.1.2.2.4 2005/10/21 17:08:17 riz Exp $	*/
+/*	$NetBSD: policy_parse.y,v 1.1.1.2.2.5 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: policy_parse.y,v 1.21 2003/12/12 08:01:26 itojun Exp $	*/
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/policy_token.c	Mon Nov 21 21:12:29 2005 +0000
@@ -0,0 +1,1888 @@
+/*	$NetBSD: policy_token.c,v 1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
+
+#define yy_create_buffer __libipsec_create_buffer
+#define yy_delete_buffer __libipsec_delete_buffer
+#define yy_scan_buffer __libipsec_scan_buffer
+#define yy_scan_string __libipsec_scan_string
+#define yy_scan_bytes __libipsec_scan_bytes
+#define yy_flex_debug __libipsec_flex_debug
+#define yy_init_buffer __libipsec_init_buffer
+#define yy_flush_buffer __libipsec_flush_buffer
+#define yy_load_buffer_state __libipsec_load_buffer_state
+#define yy_switch_to_buffer __libipsec_switch_to_buffer
+#define yyin __libipsecin
+#define yyleng __libipsecleng
+#define yylex __libipseclex
+#define yyout __libipsecout
+#define yyrestart __libipsecrestart
+#define yytext __libipsectext
+
+#line 19 "policy_token.c"
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 34
+#define YY_END_OF_BUFFER 35
+static yyconst short int yy_accept[121] =
+    {   0,
+        0,    0,   35,   34,   32,   33,    9,   30,   29,   28,
+       10,   34,   29,   29,   29,   29,   29,   29,   29,   29,
+       29,   29,   29,   29,   29,   29,   29,   32,    0,   29,
+       10,    0,   17,   29,   29,   29,   29,   29,   29,   29,
+       29,    1,   29,   29,   21,   29,   29,   29,   29,   29,
+       29,   29,   29,   29,   31,   22,   29,    7,   29,   29,
+       16,    3,   29,   29,   29,    6,   29,    2,   29,   29,
+       29,   29,   29,   24,   29,   29,   29,   29,    8,   29,
+       29,   12,    5,   29,   29,   29,   29,   29,   29,   29,
+       29,   29,   13,   29,   29,   29,   29,   29,   14,   29,
+
+       29,   29,   18,   29,   29,   29,   20,   27,   23,   11,
+       15,   29,   25,   29,   29,    4,   29,   26,   19,    0
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    1,    1,    1,    4,    1,    1,    1,
+        1,    1,    5,    1,    6,    7,    8,    9,    9,    9,
+        9,    9,    9,    9,    9,    9,    9,   10,    1,    1,
+        1,    1,    1,    1,   11,   11,   11,   11,   11,   11,
+       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
+       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
+       12,    1,   13,    1,    7,    1,   14,   15,   16,   17,
+
+       18,   19,   20,   21,   22,   11,   11,   23,   24,   25,
+       26,   27,   28,   29,   30,   31,   32,   11,   33,   11,
+       34,   11,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst int yy_meta[35] =
+    {   0,
+        1,    1,    1,    2,    1,    1,    2,    1,    3,    2,
+        3,    1,    1,    3,    3,    3,    3,    3,    3,    3,
+        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
+        3,    3,    3,    3
+    } ;
+
+static yyconst short int yy_base[123] =
+    {   0,
+        0,    0,  235,  236,  232,  236,  236,  236,  229,  236,
+       31,  223,   32,   33,   34,   35,   37,   39,   41,   38,
+       40,   43,   42,   44,   45,   46,   47,  229,    0,  226,
+       50,   67,  225,   51,   67,   77,   58,   75,   78,   80,
+       79,  224,   82,   83,  223,   85,   86,   87,   91,   88,
+       89,   96,   97,    0,  236,  222,   99,  107,  104,  100,
+      221,  220,  103,  118,  119,  219,  121,  218,  122,  123,
+      124,  126,  128,  217,  127,  129,  131,  130,  216,  134,
+      136,  215,  137,  132,  138,  142,  139,  143,  146,  149,
+      155,  159,  214,  160,  161,  166,  168,  163,  213,  170,
+
+      171,  172,  212,  173,  176,  179,  211,  185,  206,  204,
+      202,  175,  196,  183,  188,  195,  180,  198,  194,  236,
+      211,  193
+    } ;
+
+static yyconst short int yy_def[123] =
+    {   0,
+      120,    1,  120,  120,  120,  120,  120,  120,  121,  120,
+      121,  120,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  120,  122,  121,
+      121,  120,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  122,  120,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
+
+      121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
+      121,  121,  121,  121,  121,  121,  121,  121,  121,    0,
+      120,  120
+    } ;
+
+static yyconst short int yy_nxt[271] =
+    {   0,
+        4,    5,    6,    4,    7,    8,    9,   10,   11,    9,
+        9,   12,    4,   13,   14,    9,   15,   16,   17,    9,
+       18,   19,   20,   21,   22,   23,   24,    9,   25,    9,
+       26,   27,    9,    9,   29,   29,   29,   29,   29,   31,
+       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
+       29,   36,   33,   29,   29,   37,   34,   45,   31,   38,
+       41,   29,   49,   44,   39,   42,   35,   43,   46,   40,
+       29,   52,   48,   47,   50,   32,   53,   51,   29,   55,
+       29,   29,   29,   29,   56,   29,   29,   59,   29,   29,
+       29,   29,   29,   57,   29,   58,   62,   64,   63,   29,
+
+       29,   71,   29,   29,   61,   60,   29,   29,   69,   67,
+       29,   65,   75,   72,   74,   66,   68,   73,   70,   77,
+       76,   29,   29,   79,   29,   29,   29,   29,   78,   29,
+       29,   29,   29,   29,   29,   29,   81,   29,   82,   29,
+       29,   29,   29,   80,   90,   29,   29,   83,   85,   29,
+       86,   93,   29,   95,   84,   87,   88,   92,   29,   97,
+       89,   91,   29,   29,   29,   94,   29,   96,  100,   29,
+       98,   29,   99,   29,   29,   29,   29,  101,   29,   29,
+      108,  104,   29,   29,  102,  103,   29,  110,   29,  105,
+      107,   29,  106,  113,  115,   54,  118,   29,   29,   29,
+
+      109,   29,  111,  112,  114,   29,  118,   29,  116,   29,
+      119,  117,   30,   30,   29,   29,   29,   29,   29,   29,
+       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
+       28,   32,   29,   28,  120,    3,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120
+    } ;
+
+static yyconst short int yy_chk[271] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,   11,   13,   14,   15,   16,   11,
+       17,   20,   18,   21,   19,   23,   22,   24,   25,   26,
+       27,   15,   13,   31,   34,   15,   13,   21,   31,   16,
+       18,   37,   25,   20,   16,   19,   14,   19,   22,   17,
+       35,   27,   24,   23,   26,   32,   27,   26,   38,   32,
+       36,   39,   41,   40,   34,   43,   44,   37,   46,   47,
+       48,   50,   51,   35,   49,   36,   40,   43,   41,   52,
+
+       53,   50,   57,   60,   39,   38,   63,   59,   48,   46,
+       58,   43,   57,   51,   53,   44,   47,   52,   49,   59,
+       58,   64,   65,   63,   67,   69,   70,   71,   60,   72,
+       75,   73,   76,   78,   77,   84,   65,   80,   67,   81,
+       83,   85,   87,   64,   77,   86,   88,   69,   71,   89,
+       72,   81,   90,   84,   70,   73,   75,   80,   91,   86,
+       76,   78,   92,   94,   95,   83,   98,   85,   89,   96,
+       87,   97,   88,  100,  101,  102,  104,   90,  112,  105,
+       98,   94,  106,  117,   91,   92,  114,  101,  108,   95,
+       97,  115,   96,  105,  108,  122,  115,  119,  116,  113,
+
+      100,  118,  102,  104,  106,  111,  118,  110,  112,  109,
+      117,  114,  121,  121,  107,  103,   99,   93,   82,   79,
+       74,   68,   66,   62,   61,   56,   45,   42,   33,   30,
+       28,   12,    9,    5,    3,  120,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "policy_token.l"
+#define INITIAL 0
+/* Id: policy_token.l,v 1.10.4.1 2005/05/07 14:30:38 manubsd Exp */
+/*
+ * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#line 33 "policy_token.l"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <net/pfkeyv2.h>
+#include <netinet/in.h>
+#ifdef HAVE_NETINET6_IPSEC
+#  include <netinet6/ipsec.h>
+#else
+#  include <netinet/ipsec.h>
+#endif
+
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "libpfkey.h"
+
+#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__linux__)
+#include "y.tab.h"
+#else
+#include "policy_parse.h"
+#endif
+#define yylval __libipseclval	/* XXX */
+
+int yylex __P((void));
+#define YY_NO_UNPUT 1
+/* common section */
+#line 544 "policy_token.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( yy_current_buffer->yy_is_interactive ) \
+		{ \
+		int c = '*', n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp = NULL, *yy_bp = NULL;
+	register int yy_act;
+
+#line 98 "policy_token.l"
+
+
+#line 698 "policy_token.c"
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				yy_last_accepting_state = yy_current_state;
+				yy_last_accepting_cpos = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 121 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 236 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = yy_hold_char;
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 100 "policy_token.l"
+{ yylval.num = IPSEC_DIR_INBOUND; return(DIR); }
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 101 "policy_token.l"
+{ yylval.num = IPSEC_DIR_OUTBOUND; return(DIR); }
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 102 "policy_token.l"
+{ 
+#ifdef HAVE_POLICY_FWD
+		  yylval.num = IPSEC_DIR_FWD; return(DIR); 
+#else
+		  yylval.num = IPSEC_DIR_INBOUND; return(DIR); 
+#endif
+		}
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 110 "policy_token.l"
+{ return(PRIORITY); }
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 111 "policy_token.l"
+{ return(PRIORITY); }
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 112 "policy_token.l"
+{ yylval.num32 = PRIORITY_LOW; return(PRIO_BASE); }
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 113 "policy_token.l"
+{ yylval.num32 = PRIORITY_DEFAULT; return(PRIO_BASE); }
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 114 "policy_token.l"
+{ yylval.num32 = PRIORITY_HIGH; return(PRIO_BASE); }
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 115 "policy_token.l"
+{ return(PLUS); }
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 116 "policy_token.l"
+{
+			yylval.val.len = strlen(yytext);
+			yylval.val.buf = yytext;
+			return(PRIO_OFFSET);
+}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 122 "policy_token.l"
+{ yylval.num = IPSEC_POLICY_DISCARD; return(ACTION); }
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 123 "policy_token.l"
+{ yylval.num = IPSEC_POLICY_NONE; return(ACTION); }
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 124 "policy_token.l"
+{ yylval.num = IPSEC_POLICY_IPSEC; return(ACTION); }
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 125 "policy_token.l"
+{ yylval.num = IPSEC_POLICY_BYPASS; return(ACTION); }
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 126 "policy_token.l"
+{ yylval.num = IPSEC_POLICY_ENTRUST; return(ACTION); }
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 128 "policy_token.l"
+{ yylval.num = IPPROTO_ESP; return(PROTOCOL); }
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 129 "policy_token.l"
+{ yylval.num = IPPROTO_AH; return(PROTOCOL); }
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 130 "policy_token.l"
+{ yylval.num = IPPROTO_IPCOMP; return(PROTOCOL); }
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 132 "policy_token.l"
+{ yylval.num = IPSEC_MODE_TRANSPORT; return(MODE); }
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 133 "policy_token.l"
+{ yylval.num = IPSEC_MODE_TUNNEL; return(MODE); }
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 135 "policy_token.l"
+{ return(ME); }
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 136 "policy_token.l"
+{ return(ANY); }
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 138 "policy_token.l"
+{ yylval.num = IPSEC_LEVEL_DEFAULT; return(LEVEL); }
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 139 "policy_token.l"
+{ yylval.num = IPSEC_LEVEL_USE; return(LEVEL); }
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 140 "policy_token.l"
+{ yylval.num = IPSEC_LEVEL_REQUIRE; return(LEVEL); }
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 141 "policy_token.l"
+{
+			yylval.val.len = strlen(yytext + 7);
+			yylval.val.buf = yytext + 7;
+			return(LEVEL_SPECIFY);
+		}
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 146 "policy_token.l"
+{ yylval.num = IPSEC_LEVEL_UNIQUE; return(LEVEL); }
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 147 "policy_token.l"
+{ return(SLASH); }
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 149 "policy_token.l"
+{
+			yylval.val.len = strlen(yytext);
+			yylval.val.buf = yytext;
+			return(IPADDRESS);
+		}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 155 "policy_token.l"
+{ return(HYPHEN); }
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 157 "policy_token.l"
+{
+			/* Remove leading '[' and trailing ']' */
+			yylval.val.buf = yytext + 1;
+			yylval.val.len = strlen(yytext) - 2;
+
+			return(PORT);
+		}
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 165 "policy_token.l"
+{ ; }
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 166 "policy_token.l"
+{ ; }
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 168 "policy_token.l"
+ECHO;
+	YY_BREAK
+#line 975 "policy_token.c"
+case YY_STATE_EOF(INITIAL):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			yy_last_accepting_state = yy_current_state;
+			yy_last_accepting_cpos = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 121 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
+	register int yy_is_jam;
+	register char *yy_cp = yy_c_buf_p;
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		yy_last_accepting_state = yy_current_state;
+		yy_last_accepting_cpos = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 121 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 120);
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						return EOF;
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+
+	return c;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer( b );
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
+
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 168 "policy_token.l"
+
+
+void __policy__strbuffer__init__ __P((char *));
+void __policy__strbuffer__free__ __P((void));
+
+static YY_BUFFER_STATE strbuffer;
+
+void
+__policy__strbuffer__init__(msg)
+	char *msg;
+{
+	if (YY_CURRENT_BUFFER)
+		yy_delete_buffer(YY_CURRENT_BUFFER);
+	strbuffer = (YY_BUFFER_STATE)yy_scan_string(msg);
+	yy_switch_to_buffer(strbuffer);
+
+	return;
+}
+
+void
+__policy__strbuffer__free__()
+{
+	yy_delete_buffer(strbuffer);
+
+	return;
+}
--- a/crypto/dist/ipsec-tools/src/libipsec/policy_token.l	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/policy_token.l	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: policy_token.l,v 1.1.1.2.2.2 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: policy_token.l,v 1.1.1.2.2.3 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: policy_token.l,v 1.10.4.1 2005/05/07 14:30:38 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: test-policy-priority.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: test-policy-priority.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: test-policy.c,v 1.16 2003/08/26 03:24:08 itojun Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/libipsec/test-policy.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/test-policy.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: test-policy.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: test-policy.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: test-policy.c,v 1.16 2003/08/26 03:24:08 itojun Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/racoon/admin.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/admin.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: admin.c,v 1.1.1.2.2.3 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: admin.c,v 1.1.1.2.2.4 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: admin.c,v 1.17.2.4 2005/07/12 11:49:44 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/racoon/admin.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/admin.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: admin.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: admin.h,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: admin.h,v 1.10 2004/12/30 13:45:49 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/racoon/admin_var.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/admin_var.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: admin_var.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: admin_var.h,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: admin_var.h,v 1.7 2004/12/30 00:08:30 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/racoon/algorithm.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/algorithm.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: algorithm.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: algorithm.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: algorithm.c,v 1.11.4.1 2005/06/28 22:38:02 manubsd Exp */
 
--- a/crypto/dist/ipsec-tools/src/racoon/algorithm.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/algorithm.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: algorithm.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: algorithm.h,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: algorithm.h,v 1.8 2004/11/18 15:14:44 ludvigm Exp */
 
--- a/crypto/dist/ipsec-tools/src/racoon/backupsa.c	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/backupsa.c	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: backupsa.c,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: backupsa.c,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /*	$KAME: backupsa.c,v 1.16 2001/12/31 20:13:40 thorpej Exp $	*/
 
--- a/crypto/dist/ipsec-tools/src/racoon/backupsa.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/backupsa.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: backupsa.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: backupsa.h,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: backupsa.h,v 1.3 2004/06/11 16:00:15 ludvigm Exp */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cfparse.c	Mon Nov 21 21:12:29 2005 +0000
@@ -0,0 +1,3525 @@
+/*	$NetBSD: cfparse.c,v 1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
+
+
+/*  A Bison parser, made from ./cfparse.y
+    by GNU Bison version 1.28  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define	PRIVSEP	257
+#define	USER	258
+#define	GROUP	259
+#define	CHROOT	260
+#define	PATH	261
+#define	PATHTYPE	262
+#define	INCLUDE	263
+#define	IDENTIFIER	264
+#define	VENDORID	265
+#define	LOGGING	266
+#define	LOGLEV	267
+#define	PADDING	268
+#define	PAD_RANDOMIZE	269
+#define	PAD_RANDOMIZELEN	270
+#define	PAD_MAXLEN	271
+#define	PAD_STRICT	272
+#define	PAD_EXCLTAIL	273
+#define	LISTEN	274
+#define	X_ISAKMP	275
+#define	X_ISAKMP_NATT	276
+#define	X_ADMIN	277
+#define	STRICT_ADDRESS	278
+#define	ADMINSOCK	279
+#define	DISABLED	280
+#define	MODECFG	281
+#define	CFG_NET4	282
+#define	CFG_MASK4	283
+#define	CFG_DNS4	284
+#define	CFG_NBNS4	285
+#define	CFG_AUTH_SOURCE	286
+#define	CFG_SYSTEM	287
+#define	CFG_RADIUS	288
+#define	CFG_PAM	289
+#define	CFG_LOCAL	290
+#define	CFG_NONE	291
+#define	CFG_ACCOUNTING	292
+#define	CFG_CONF_SOURCE	293
+#define	CFG_MOTD	294
+#define	CFG_POOL_SIZE	295
+#define	CFG_AUTH_THROTTLE	296
+#define	CFG_PFS_GROUP	297
+#define	CFG_SAVE_PASSWD	298
+#define	RETRY	299
+#define	RETRY_COUNTER	300
+#define	RETRY_INTERVAL	301
+#define	RETRY_PERSEND	302
+#define	RETRY_PHASE1	303
+#define	RETRY_PHASE2	304
+#define	NATT_KA	305
+#define	ALGORITHM_CLASS	306
+#define	ALGORITHMTYPE	307
+#define	STRENGTHTYPE	308
+#define	SAINFO	309
+#define	FROM	310
+#define	REMOTE	311
+#define	ANONYMOUS	312
+#define	INHERIT	313
+#define	EXCHANGE_MODE	314
+#define	EXCHANGETYPE	315
+#define	DOI	316
+#define	DOITYPE	317
+#define	SITUATION	318
+#define	SITUATIONTYPE	319
+#define	CERTIFICATE_TYPE	320
+#define	CERTTYPE	321
+#define	PEERS_CERTFILE	322
+#define	CA_TYPE	323
+#define	VERIFY_CERT	324
+#define	SEND_CERT	325
+#define	SEND_CR	326
+#define	IDENTIFIERTYPE	327
+#define	MY_IDENTIFIER	328
+#define	PEERS_IDENTIFIER	329
+#define	VERIFY_IDENTIFIER	330
+#define	DNSSEC	331
+#define	CERT_X509	332
+#define	CERT_PLAINRSA	333
+#define	NONCE_SIZE	334
+#define	DH_GROUP	335
+#define	KEEPALIVE	336
+#define	PASSIVE	337
+#define	INITIAL_CONTACT	338
+#define	NAT_TRAVERSAL	339
+#define	NAT_TRAVERSAL_LEVEL	340
+#define	PROPOSAL_CHECK	341
+#define	PROPOSAL_CHECK_LEVEL	342
+#define	GENERATE_POLICY	343
+#define	SUPPORT_PROXY	344
+#define	PROPOSAL	345
+#define	EXEC_PATH	346
+#define	EXEC_COMMAND	347
+#define	EXEC_SUCCESS	348
+#define	EXEC_FAILURE	349
+#define	GSS_ID	350
+#define	GSS_ID_ENC	351
+#define	GSS_ID_ENCTYPE	352
+#define	COMPLEX_BUNDLE	353
+#define	DPD	354
+#define	DPD_DELAY	355
+#define	DPD_RETRY	356
+#define	DPD_MAXFAIL	357
+#define	XAUTH_LOGIN	358
+#define	PREFIX	359
+#define	PORT	360
+#define	PORTANY	361
+#define	UL_PROTO	362
+#define	ANY	363
+#define	IKE_FRAG	364
+#define	ESP_FRAG	365
+#define	MODE_CFG	366
+#define	PFS_GROUP	367
+#define	LIFETIME	368
+#define	LIFETYPE_TIME	369
+#define	LIFETYPE_BYTE	370
+#define	STRENGTH	371
+#define	SCRIPT	372
+#define	PHASE1_UP	373
+#define	PHASE1_DOWN	374
+#define	NUMBER	375
+#define	SWITCH	376
+#define	BOOLEAN	377
+#define	HEXSTRING	378
+#define	QUOTEDSTRING	379
+#define	ADDRSTRING	380
+#define	UNITTYPE_BYTE	381
+#define	UNITTYPE_KBYTES	382
+#define	UNITTYPE_MBYTES	383
+#define	UNITTYPE_TBYTES	384
+#define	UNITTYPE_SEC	385
+#define	UNITTYPE_MIN	386
+#define	UNITTYPE_HOUR	387
+#define	EOS	388
+#define	BOC	389
+#define	EOC	390
+#define	COMMA	391
+
+#line 3 "./cfparse.y"
+
+/*
+ * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 and 2003 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/queue.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#ifdef HAVE_NETINET6_IPSEC
+#  include <netinet6/ipsec.h>
+#else
+#  include <netinet/ipsec.h>
+#endif
+
+#ifdef ENABLE_HYBRID
+#include <arpa/inet.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <netdb.h>
+#include <pwd.h>
+#include <grp.h>
+
+#include "var.h"
+#include "misc.h"
+#include "vmbuf.h"
+#include "plog.h"
+#include "sockmisc.h"
+#include "str2val.h"
+#include "genlist.h"
+#include "debug.h"
+
+#include "admin.h"
+#include "privsep.h"
+#include "cfparse_proto.h"
+#include "cftoken_proto.h"
+#include "algorithm.h"
+#include "localconf.h"
+#include "policy.h"
+#include "sainfo.h"
+#include "oakley.h"
+#include "pfkey.h"
+#include "remoteconf.h"
+#include "grabmyaddr.h"
+#include "isakmp_var.h"
+#include "handler.h"
+#include "isakmp.h"
+#ifdef ENABLE_HYBRID
+#include "isakmp_xauth.h"
+#include "isakmp_cfg.h"
+#endif
+#include "ipsec_doi.h"
+#include "strnames.h"
+#include "gcmalloc.h"
+#ifdef HAVE_GSSAPI
+#include "gssapi.h"
+#endif
+#include "vendorid.h"
+#include "rsalist.h"
+
+struct proposalspec {
+	time_t lifetime;		/* for isakmp/ipsec */
+	int lifebyte;			/* for isakmp/ipsec */
+	struct secprotospec *spspec;	/* the head is always current spec. */
+	struct proposalspec *next;	/* the tail is the most prefered. */
+	struct proposalspec *prev;
+};
+
+struct secprotospec {
+	int prop_no;
+	int trns_no;
+	int strength;		/* for isakmp/ipsec */
+	int encklen;		/* for isakmp/ipsec */
+	time_t lifetime;	/* for isakmp */
+	int lifebyte;		/* for isakmp */
+	int proto_id;		/* for ipsec (isakmp?) */
+	int ipsec_level;	/* for ipsec */
+	int encmode;		/* for ipsec */
+	int vendorid;		/* for isakmp */
+	char *gssid;
+	struct sockaddr *remote;
+	int algclass[MAXALGCLASS];
+
+	struct secprotospec *next;	/* the tail is the most prefiered. */
+	struct secprotospec *prev;
+	struct proposalspec *back;
+};
+
+static int num2dhgroup[] = {
+	0,
+	OAKLEY_ATTR_GRP_DESC_MODP768,
+	OAKLEY_ATTR_GRP_DESC_MODP1024,
+	OAKLEY_ATTR_GRP_DESC_EC2N155,
+	OAKLEY_ATTR_GRP_DESC_EC2N185,
+	OAKLEY_ATTR_GRP_DESC_MODP1536,
+	0,
+	0,
+	0,
+	0,
+	0,
+	0,
+	0,
+	0,
+	OAKLEY_ATTR_GRP_DESC_MODP2048,
+	OAKLEY_ATTR_GRP_DESC_MODP3072,
+	OAKLEY_ATTR_GRP_DESC_MODP4096,
+	OAKLEY_ATTR_GRP_DESC_MODP6144,
+	OAKLEY_ATTR_GRP_DESC_MODP8192
+};
+
+static struct remoteconf *cur_rmconf;
+static int tmpalgtype[MAXALGCLASS];
+static struct sainfo *cur_sainfo;
+static int cur_algclass;
+
+static struct proposalspec *newprspec __P((void));
+static void insprspec __P((struct proposalspec *, struct proposalspec **));
+static struct secprotospec *newspspec __P((void));
+static void insspspec __P((struct secprotospec *, struct proposalspec **));
+static void adminsock_conf __P((vchar_t *, vchar_t *, vchar_t *, int));
+
+static int set_isakmp_proposal
+	__P((struct remoteconf *, struct proposalspec *));
+static void clean_tmpalgtype __P((void));
+static int expand_isakmpspec __P((int, int, int *,
+	int, int, time_t, int, int, int, char *, struct remoteconf *));
+static int listen_addr __P((struct sockaddr *addr, int udp_encap));
+
+void freeetypes (struct etypes **etypes);
+
+#if 0
+static int fix_lifebyte __P((u_long));
+#endif
+
+#line 171 "./cfparse.y"
+typedef union {
+	unsigned long num;
+	vchar_t *val;
+	struct remoteconf *rmconf;
+	struct sockaddr *saddr;
+	struct sainfoalg *alg;
+} YYSTYPE;
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define	YYFINAL		509
+#define	YYFLAG		-32768
+#define	YYNTBASE	138
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 391 ? yytranslate[x] : 289)
+
+static const short yytranslate[] = {     0,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
+     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+    37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+    47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+    57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+    67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+    77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
+    87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+    97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+   107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+   117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
+   137
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = {     0,
+     0,     1,     4,     6,     8,    10,    12,    14,    16,    18,
+    20,    22,    24,    26,    28,    30,    35,    36,    39,    40,
+    45,    46,    51,    52,    57,    58,    63,    64,    69,    70,
+    76,    77,    82,    86,    90,    93,    94,    99,   100,   105,
+   109,   111,   113,   118,   119,   122,   123,   128,   129,   134,
+   135,   140,   141,   146,   147,   152,   157,   158,   161,   162,
+   167,   168,   173,   174,   179,   180,   188,   189,   194,   195,
+   200,   201,   205,   208,   209,   211,   216,   217,   220,   221,
+   226,   227,   232,   233,   238,   239,   244,   245,   250,   251,
+   256,   257,   262,   263,   268,   269,   274,   275,   280,   281,
+   286,   287,   292,   293,   298,   299,   304,   305,   310,   311,
+   316,   317,   322,   327,   328,   331,   332,   337,   338,   344,
+   345,   350,   351,   357,   358,   364,   365,   371,   372,   373,
+   382,   384,   387,   393,   396,   397,   401,   402,   405,   406,
+   411,   412,   419,   420,   427,   428,   433,   434,   439,   440,
+   446,   448,   449,   454,   457,   458,   460,   461,   463,   465,
+   467,   469,   471,   472,   474,   475,   482,   483,   488,   492,
+   495,   497,   498,   501,   502,   507,   508,   513,   514,   519,
+   522,   523,   528,   529,   535,   536,   542,   543,   549,   550,
+   555,   556,   561,   562,   567,   568,   573,   574,   580,   581,
+   586,   587,   593,   594,   599,   600,   605,   606,   611,   612,
+   617,   618,   623,   624,   629,   630,   636,   637,   643,   644,
+   649,   650,   655,   656,   661,   662,   667,   668,   673,   674,
+   679,   680,   685,   686,   691,   692,   697,   698,   703,   704,
+   711,   712,   717,   718,   725,   726,   732,   733,   736,   737,
+   743,   744,   749,   751,   753,   754,   756,   758,   759,   762,
+   763,   768,   769,   776,   777,   784,   785,   790,   791,   796,
+   797,   803,   805,   807,   809,   811,   813,   815
+};
+
+static const short yyrhs[] = {    -1,
+   138,   139,     0,   140,     0,   148,     0,   152,     0,   153,
+     0,   154,     0,   158,     0,   160,     0,   168,     0,   180,
+     0,   200,     0,   209,     0,   230,     0,   150,     0,     3,
+   135,   141,   136,     0,     0,   141,   142,     0,     0,     4,
+   125,   143,   134,     0,     0,     4,   121,   144,   134,     0,
+     0,     5,   125,   145,   134,     0,     0,     5,   121,   146,
+   134,     0,     0,     6,   125,   147,   134,     0,     0,     7,
+     8,   125,   149,   134,     0,     0,    99,   122,   151,   134,
+     0,     9,   125,   134,     0,    97,    98,   134,     0,    10,
+   155,     0,     0,    11,   156,   125,   134,     0,     0,    73,
+   125,   157,   134,     0,    12,   159,   134,     0,   124,     0,
+    13,     0,    14,   135,   161,   136,     0,     0,   161,   162,
+     0,     0,    15,   122,   163,   134,     0,     0,    16,   122,
+   164,   134,     0,     0,    17,   121,   165,   134,     0,     0,
+    18,   122,   166,   134,     0,     0,    19,   122,   167,   134,
+     0,    20,   135,   169,   136,     0,     0,   169,   170,     0,
+     0,    21,   178,   171,   134,     0,     0,    22,   178,   172,
+   134,     0,     0,    23,   173,   106,   134,     0,     0,    25,
+   125,   125,   125,   121,   174,   134,     0,     0,    25,   125,
+   175,   134,     0,     0,    25,    26,   176,   134,     0,     0,
+    24,   177,   134,     0,   126,   179,     0,     0,   106,     0,
+    27,   135,   181,   136,     0,     0,   181,   182,     0,     0,
+    28,   126,   183,   134,     0,     0,    29,   126,   184,   134,
+     0,     0,    30,   126,   185,   134,     0,     0,    31,   126,
+   186,   134,     0,     0,    32,    33,   187,   134,     0,     0,
+    32,    34,   188,   134,     0,     0,    32,    35,   189,   134,
+     0,     0,    38,    37,   190,   134,     0,     0,    38,    34,
+   191,   134,     0,     0,    38,    35,   192,   134,     0,     0,
+    41,   121,   193,   134,     0,     0,    43,   121,   194,   134,
+     0,     0,    44,   122,   195,   134,     0,     0,    42,   121,
+   196,   134,     0,     0,    39,    36,   197,   134,     0,     0,
+    39,    34,   198,   134,     0,     0,    40,   125,   199,   134,
+     0,    45,   135,   201,   136,     0,     0,   201,   202,     0,
+     0,    46,   121,   203,   134,     0,     0,    47,   121,   287,
+   204,   134,     0,     0,    48,   121,   205,   134,     0,     0,
+    49,   121,   287,   206,   134,     0,     0,    50,   121,   287,
+   207,   134,     0,     0,    51,   121,   287,   208,   134,     0,
+     0,     0,    55,   210,   212,   214,   135,   215,   211,   136,
+     0,    58,     0,   213,   213,     0,    73,   126,   226,   227,
+   228,     0,    73,   125,     0,     0,    56,    73,   278,     0,
+     0,   215,   216,     0,     0,   113,   277,   217,   134,     0,
+     0,   114,   115,   121,   287,   218,   134,     0,     0,   114,
+   116,   121,   288,   219,   134,     0,     0,    52,   220,   223,
+   134,     0,     0,    10,    73,   221,   134,     0,     0,    74,
+    73,   125,   222,   134,     0,   225,     0,     0,   225,   224,
+   137,   223,     0,    53,   229,     0,     0,   105,     0,     0,
+   106,     0,   107,     0,   121,     0,   108,     0,   109,     0,
+     0,   121,     0,     0,    57,   234,    59,   234,   231,   233,
+     0,     0,    57,   234,   232,   233,     0,   135,   235,   136,
+     0,    58,   179,     0,   178,     0,     0,   235,   236,     0,
+     0,    60,   237,   273,   134,     0,     0,    62,    63,   238,
+   134,     0,     0,    64,    65,   239,   134,     0,    66,   274,
+     0,     0,    68,   125,   240,   134,     0,     0,    69,    78,
+   125,   241,   134,     0,     0,    68,    78,   125,   242,   134,
+     0,     0,    68,    79,   125,   243,   134,     0,     0,    68,
+    77,   244,   134,     0,     0,    70,   122,   245,   134,     0,
+     0,    71,   122,   246,   134,     0,     0,    72,   122,   247,
+   134,     0,     0,    74,    73,   278,   248,   134,     0,     0,
+   104,   278,   249,   134,     0,     0,    75,    73,   278,   250,
+   134,     0,     0,    76,   122,   251,   134,     0,     0,    80,
+   121,   252,   134,     0,     0,    81,   253,   277,   134,     0,
+     0,    83,   122,   254,   134,     0,     0,   110,   122,   255,
+   134,     0,     0,   111,   121,   256,   134,     0,     0,   118,
+   125,   119,   257,   134,     0,     0,   118,   125,   120,   258,
+   134,     0,     0,   112,   122,   259,   134,     0,     0,    89,
+   122,   260,   134,     0,     0,    90,   122,   261,   134,     0,
+     0,    84,   122,   262,   134,     0,     0,    85,   122,   263,
+   134,     0,     0,    85,    86,   264,   134,     0,     0,   100,
+   122,   265,   134,     0,     0,   101,   121,   266,   134,     0,
+     0,   102,   121,   267,   134,     0,     0,   103,   121,   268,
+   134,     0,     0,   114,   115,   121,   287,   269,   134,     0,
+     0,    87,    88,   270,   134,     0,     0,   114,   116,   121,
+   288,   271,   134,     0,     0,    91,   272,   135,   279,   136,
+     0,     0,   273,    61,     0,     0,    78,   125,   125,   275,
+   134,     0,     0,    79,   125,   276,   134,     0,    53,     0,
+   121,     0,     0,   126,     0,   125,     0,     0,   279,   280,
+     0,     0,   117,   281,    54,   134,     0,     0,   114,   115,
+   121,   287,   282,   134,     0,     0,   114,   116,   121,   288,
+   283,   134,     0,     0,    81,   277,   284,   134,     0,     0,
+    96,   125,   285,   134,     0,     0,    52,    53,   229,   286,
+   134,     0,   131,     0,   132,     0,   133,     0,   127,     0,
+   128,     0,   129,     0,   130,     0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+   251,   252,   255,   256,   257,   258,   259,   260,   261,   262,
+   263,   264,   265,   266,   267,   272,   275,   276,   279,   290,
+   290,   291,   291,   302,   302,   303,   303,   304,   308,   324,
+   328,   329,   333,   347,   359,   362,   366,   367,   379,   383,
+   386,   395,   408,   411,   412,   415,   416,   416,   417,   417,
+   418,   418,   419,   419,   420,   424,   427,   428,   431,   436,
+   436,   445,   445,   449,   450,   459,   459,   468,   468,   477,
+   477,   478,   480,   492,   493,   497,   500,   501,   504,   515,
+   515,   526,   526,   537,   537,   548,   548,   557,   557,   570,
+   570,   583,   583,   592,   592,   605,   605,   618,   618,   635,
+   635,   644,   644,   653,   653,   662,   662,   671,   671,   684,
+   684,   695,   699,   702,   703,   706,   711,   711,   716,   716,
+   721,   721,   726,   726,   731,   731,   740,   744,   752,   785,
+   787,   792,   799,   852,   880,   885,   912,   913,   916,   921,
+   921,   926,   926,   938,   938,   941,   942,   947,   947,   952,
+   955,   959,   963,   966,  1022,  1023,  1026,  1027,  1028,  1031,
+  1032,  1033,  1036,  1037,  1042,  1068,  1068,  1089,  1092,  1163,
+  1169,  1179,  1180,  1183,  1187,  1188,  1189,  1189,  1190,  1190,
+  1191,  1200,  1200,  1208,  1208,  1215,  1215,  1238,  1238,  1248,
+  1248,  1249,  1249,  1250,  1250,  1251,  1251,  1260,  1260,  1275,
+  1275,  1292,  1292,  1293,  1293,  1294,  1294,  1299,  1300,  1301,
+  1301,  1302,  1302,  1309,  1309,  1313,  1313,  1317,  1317,  1318,
+  1318,  1319,  1319,  1320,  1320,  1321,  1321,  1329,  1329,  1337,
+  1337,  1345,  1345,  1354,  1354,  1363,  1363,  1372,  1372,  1377,
+  1377,  1378,  1378,  1392,  1392,  1401,  1404,  1405,  1428,  1437,
+  1437,  1457,  1459,  1467,  1479,  1480,  1481,  1484,  1485,  1488,
+  1491,  1492,  1497,  1497,  1509,  1509,  1514,  1514,  1523,  1523,
+  1618,  1621,  1622,  1623,  1626,  1627,  1628,  1629
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = {   "$","error","$undefined.","PRIVSEP",
+"USER","GROUP","CHROOT","PATH","PATHTYPE","INCLUDE","IDENTIFIER","VENDORID",
+"LOGGING","LOGLEV","PADDING","PAD_RANDOMIZE","PAD_RANDOMIZELEN","PAD_MAXLEN",
+"PAD_STRICT","PAD_EXCLTAIL","LISTEN","X_ISAKMP","X_ISAKMP_NATT","X_ADMIN","STRICT_ADDRESS",
+"ADMINSOCK","DISABLED","MODECFG","CFG_NET4","CFG_MASK4","CFG_DNS4","CFG_NBNS4",
+"CFG_AUTH_SOURCE","CFG_SYSTEM","CFG_RADIUS","CFG_PAM","CFG_LOCAL","CFG_NONE",
+"CFG_ACCOUNTING","CFG_CONF_SOURCE","CFG_MOTD","CFG_POOL_SIZE","CFG_AUTH_THROTTLE",
+"CFG_PFS_GROUP","CFG_SAVE_PASSWD","RETRY","RETRY_COUNTER","RETRY_INTERVAL","RETRY_PERSEND",
+"RETRY_PHASE1","RETRY_PHASE2","NATT_KA","ALGORITHM_CLASS","ALGORITHMTYPE","STRENGTHTYPE",
+"SAINFO","FROM","REMOTE","ANONYMOUS","INHERIT","EXCHANGE_MODE","EXCHANGETYPE",
+"DOI","DOITYPE","SITUATION","SITUATIONTYPE","CERTIFICATE_TYPE","CERTTYPE","PEERS_CERTFILE",
+"CA_TYPE","VERIFY_CERT","SEND_CERT","SEND_CR","IDENTIFIERTYPE","MY_IDENTIFIER",
+"PEERS_IDENTIFIER","VERIFY_IDENTIFIER","DNSSEC","CERT_X509","CERT_PLAINRSA",
+"NONCE_SIZE","DH_GROUP","KEEPALIVE","PASSIVE","INITIAL_CONTACT","NAT_TRAVERSAL",
+"NAT_TRAVERSAL_LEVEL","PROPOSAL_CHECK","PROPOSAL_CHECK_LEVEL","GENERATE_POLICY",
+"SUPPORT_PROXY","PROPOSAL","EXEC_PATH","EXEC_COMMAND","EXEC_SUCCESS","EXEC_FAILURE",
+"GSS_ID","GSS_ID_ENC","GSS_ID_ENCTYPE","COMPLEX_BUNDLE","DPD","DPD_DELAY","DPD_RETRY",
+"DPD_MAXFAIL","XAUTH_LOGIN","PREFIX","PORT","PORTANY","UL_PROTO","ANY","IKE_FRAG",
+"ESP_FRAG","MODE_CFG","PFS_GROUP","LIFETIME","LIFETYPE_TIME","LIFETYPE_BYTE",
+"STRENGTH","SCRIPT","PHASE1_UP","PHASE1_DOWN","NUMBER","SWITCH","BOOLEAN","HEXSTRING",
+"QUOTEDSTRING","ADDRSTRING","UNITTYPE_BYTE","UNITTYPE_KBYTES","UNITTYPE_MBYTES",
+"UNITTYPE_TBYTES","UNITTYPE_SEC","UNITTYPE_MIN","UNITTYPE_HOUR","EOS","BOC",
+"EOC","COMMA","statements","statement","privsep_statement","privsep_stmts","privsep_stmt",
+"@1","@2","@3","@4","@5","path_statement","@6","special_statement","@7","include_statement",
+"gssenc_statement","identifier_statement","identifier_stmt","@8","@9","logging_statement",
+"log_level","padding_statement","padding_stmts","padding_stmt","@10","@11","@12",
+"@13","@14","listen_statement","listen_stmts","listen_stmt","@15","@16","@17",
+"@18","@19","@20","@21","ike_addrinfo_port","ike_port","modecfg_statement","modecfg_stmts",
+"modecfg_stmt","@22","@23","@24","@25","@26","@27","@28","@29","@30","@31","@32",
+"@33","@34","@35","@36","@37","@38","timer_statement","timer_stmts","timer_stmt",
+"@39","@40","@41","@42","@43","@44","sainfo_statement","@45","@46","sainfo_name",
+"sainfo_id","sainfo_peer","sainfo_specs","sainfo_spec","@47","@48","@49","@50",
+"@51","@52","algorithms","@53","algorithm","prefix","port","ul_proto","keylength",
+"remote_statement","@54","@55","remote_specs_block","remote_index","remote_specs",
+"remote_spec","@56","@57","@58","@59","@60","@61","@62","@63","@64","@65","@66",
+"@67","@68","@69","@70","@71","@72","@73","@74","@75","@76","@77","@78","@79",
+"@80","@81","@82","@83","@84","@85","@86","@87","@88","@89","@90","@91","exchange_types",
+"cert_spec","@92","@93","dh_group_num","identifierstring","isakmpproposal_specs",
+"isakmpproposal_spec","@94","@95","@96","@97","@98","@99","unittype_time","unittype_byte", NULL
+};
+#endif
+
+static const short yyr1[] = {     0,
+   138,   138,   139,   139,   139,   139,   139,   139,   139,   139,
+   139,   139,   139,   139,   139,   140,   141,   141,   143,   142,
+   144,   142,   145,   142,   146,   142,   147,   142,   149,   148,
+   151,   150,   152,   153,   154,   156,   155,   157,   155,   158,
+   159,   159,   160,   161,   161,   163,   162,   164,   162,   165,
+   162,   166,   162,   167,   162,   168,   169,   169,   171,   170,
+   172,   170,   173,   170,   174,   170,   175,   170,   176,   170,
+   177,   170,   178,   179,   179,   180,   181,   181,   183,   182,
+   184,   182,   185,   182,   186,   182,   187,   182,   188,   182,
+   189,   182,   190,   182,   191,   182,   192,   182,   193,   182,
+   194,   182,   195,   182,   196,   182,   197,   182,   198,   182,
+   199,   182,   200,   201,   201,   203,   202,   204,   202,   205,
+   202,   206,   202,   207,   202,   208,   202,   210,   211,   209,
+   212,   212,   213,   213,   214,   214,   215,   215,   217,   216,
+   218,   216,   219,   216,   220,   216,   221,   216,   222,   216,
+   223,   224,   223,   225,   226,   226,   227,   227,   227,   228,
+   228,   228,   229,   229,   231,   230,   232,   230,   233,   234,
+   234,   235,   235,   237,   236,   238,   236,   239,   236,   236,
+   240,   236,   241,   236,   242,   236,   243,   236,   244,   236,
+   245,   236,   246,   236,   247,   236,   248,   236,   249,   236,
+   250,   236,   251,   236,   252,   236,   253,   236,   254,   236,
+   255,   236,   256,   236,   257,   236,   258,   236,   259,   236,
+   260,   236,   261,   236,   262,   236,   263,   236,   264,   236,
+   265,   236,   266,   236,   267,   236,   268,   236,   269,   236,
+   270,   236,   271,   236,   272,   236,   273,   273,   275,   274,
+   276,   274,   277,   277,   278,   278,   278,   279,   279,   281,
+   280,   282,   280,   283,   280,   284,   280,   285,   280,   286,
+   280,   287,   287,   287,   288,   288,   288,   288
+};
+
+static const short yyr2[] = {     0,
+     0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
+     1,     1,     1,     1,     1,     4,     0,     2,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     4,     0,     5,
+     0,     4,     3,     3,     2,     0,     4,     0,     4,     3,
+     1,     1,     4,     0,     2,     0,     4,     0,     4,     0,
+     4,     0,     4,     0,     4,     4,     0,     2,     0,     4,
+     0,     4,     0,     4,     0,     7,     0,     4,     0,     4,
+     0,     3,     2,     0,     1,     4,     0,     2,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     4,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     4,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     4,     0,     4,
+     0,     4,     4,     0,     2,     0,     4,     0,     5,     0,
+     4,     0,     5,     0,     5,     0,     5,     0,     0,     8,
+     1,     2,     5,     2,     0,     3,     0,     2,     0,     4,
+     0,     6,     0,     6,     0,     4,     0,     4,     0,     5,
+     1,     0,     4,     2,     0,     1,     0,     1,     1,     1,
+     1,     1,     0,     1,     0,     6,     0,     4,     3,     2,
+     1,     0,     2,     0,     4,     0,     4,     0,     4,     2,
+     0,     4,     0,     5,     0,     5,     0,     5,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     5,     0,     4,
+     0,     5,     0,     4,     0,     4,     0,     4,     0,     4,
+     0,     4,     0,     4,     0,     5,     0,     5,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     4,     0,     4,
+     0,     4,     0,     4,     0,     4,     0,     4,     0,     6,
+     0,     4,     0,     6,     0,     5,     0,     2,     0,     5,
+     0,     4,     1,     1,     0,     1,     1,     0,     2,     0,
+     4,     0,     6,     0,     6,     0,     4,     0,     4,     0,
+     5,     1,     1,     1,     1,     1,     1,     1
+};
+
+static const short yydefact[] = {     1,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+   128,     0,     0,     0,     2,     3,     4,    15,     5,     6,
+     7,     8,     9,    10,    11,    12,    13,    14,    17,     0,
+     0,    36,     0,    35,    42,    41,     0,    44,    57,    77,
+   114,     0,    74,    74,   171,   167,     0,    31,     0,    29,
+    33,     0,    38,    40,     0,     0,     0,     0,   131,     0,
+   135,     0,    75,   170,    73,     0,     0,    34,     0,     0,
+     0,     0,    16,    18,     0,     0,     0,     0,     0,     0,
+     0,     0,    43,    45,     0,     0,    63,    71,     0,    56,
+    58,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,    76,    78,     0,     0,     0,     0,     0,
+     0,   113,   115,   134,   155,     0,     0,   132,   165,   172,
+   168,    32,    21,    19,    25,    23,    27,    30,    37,    39,
+    46,    48,    50,    52,    54,    59,    61,     0,     0,    69,
+    67,    79,    81,    83,    85,    87,    89,    91,    95,    97,
+    93,   109,   107,   111,    99,   105,   101,   103,   116,     0,
+   120,     0,     0,     0,   156,   157,   255,   137,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,    72,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   272,   273,   274,   118,     0,
+   122,   124,   126,   158,   159,     0,   257,   256,   136,   129,
+   166,   174,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,   207,     0,     0,     0,     0,     0,
+     0,   245,     0,     0,     0,     0,   255,     0,     0,     0,
+     0,     0,   169,   173,    22,    20,    26,    24,    28,    47,
+    49,    51,    53,    55,    60,    62,    64,    70,     0,    68,
+    80,    82,    84,    86,    88,    90,    92,    96,    98,    94,
+   110,   108,   112,   100,   106,   102,   104,   117,     0,   121,
+     0,     0,     0,   161,   162,   160,   133,     0,   145,     0,
+     0,     0,     0,   138,   247,   176,   178,     0,     0,   180,
+   189,     0,     0,   181,     0,   191,   193,   195,   255,   255,
+   203,   205,     0,   209,   225,   229,   227,   241,   221,   223,
+     0,   231,   233,   235,   237,   199,   211,   213,   219,     0,
+     0,     0,    65,   119,   123,   125,   127,   147,     0,     0,
+   253,   254,   139,     0,     0,   130,     0,     0,     0,     0,
+   251,     0,   185,   187,     0,   183,     0,     0,     0,   197,
+   201,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,   258,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,   215,   217,     0,     0,   163,     0,   151,   149,
+     0,     0,     0,   248,   175,   177,   179,   249,     0,   190,
+     0,     0,   182,     0,   192,   194,   196,     0,     0,   204,
+   206,   208,   210,   226,   230,   228,   242,   222,   224,     0,
+   232,   234,   236,   238,   200,   212,   214,   220,   239,   275,
+   276,   277,   278,   243,     0,     0,    66,   148,   164,   154,
+   146,     0,     0,   140,   141,   143,     0,   252,   186,   188,
+   184,   198,   202,     0,     0,     0,     0,   260,   246,   259,
+     0,     0,   216,   218,     0,   150,     0,     0,   250,   163,
+   266,   268,     0,     0,     0,   240,   244,   153,   142,   144,
+   270,     0,     0,     0,     0,     0,     0,   267,   269,   262,
+   264,   261,   271,     0,     0,   263,   265,     0,     0
+};
+
+static const short yydefgoto[] = {     1,
+    15,    16,    49,    74,   172,   171,   174,   173,   175,    17,
+    75,    18,    69,    19,    20,    21,    34,    52,    77,    22,
+    37,    23,    55,    84,   176,   177,   178,   179,   180,    24,
+    56,    91,   181,   182,   138,   395,   187,   185,   139,    45,
+    64,    25,    57,   105,   188,   189,   190,   191,   192,   193,
+   194,   197,   195,   196,   201,   203,   204,   202,   199,   198,
+   200,    26,    58,   113,   205,   289,   210,   291,   292,   293,
+    27,    42,   303,    61,    62,   117,   220,   304,   401,   477,
+   478,   349,   396,   453,   398,   452,   399,   166,   216,   297,
+   450,    28,   169,    67,   121,    46,   170,   254,   305,   358,
+   359,   365,   414,   411,   412,   362,   367,   368,   369,   418,
+   387,   419,   372,   373,   323,   375,   388,   389,   445,   446,
+   390,   380,   381,   376,   378,   377,   383,   384,   385,   386,
+   471,   379,   472,   331,   357,   310,   457,   409,   353,   219,
+   430,   470,   485,   504,   505,   492,   493,   497,   209,   444
+};
+
+static const short yypact[] = {-32768,
+    40,   -96,    60,   -72,    18,     5,   -62,   -48,   -39,   -35,
+-32768,   -28,     4,   -32,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    16,
+   -17,-32768,    32,-32768,-32768,-32768,   -15,-32768,-32768,-32768,
+-32768,   -16,    27,    27,-32768,    84,    26,-32768,     0,-32768,
+-32768,    39,-32768,-32768,    -8,    -9,    -6,    15,-32768,   -18,
+   110,    97,-32768,-32768,-32768,   -28,    36,-32768,    38,   -77,
+   -70,    48,-32768,-32768,    41,    42,    43,    61,    62,    53,
+    63,    64,-32768,-32768,    65,    65,-32768,-32768,    -7,-32768,
+-32768,    67,    68,    69,    71,    45,    35,    52,    73,    66,
+    79,    80,    77,-32768,-32768,    81,    82,    83,    85,    86,
+    87,-32768,-32768,-32768,   100,   136,    75,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,   105,    88,-32768,
+    90,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -49,
+-32768,   -49,   -49,   -49,-32768,     3,   -12,-32768,    36,    78,
+    89,    91,    92,    93,    94,    96,    98,    99,   101,   102,
+   103,   104,   107,-32768,   108,    95,   109,   111,   112,   113,
+   114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,-32768,-32768,-32768,-32768,   129,
+-32768,-32768,-32768,-32768,-32768,   -63,-32768,-32768,-32768,     7,
+-32768,-32768,   149,   148,    37,    -3,   138,   142,   143,   144,
+   145,   146,   147,   150,-32768,   151,   152,   -45,   133,   153,
+   154,-32768,   155,   157,   158,   159,   -12,   160,   162,   163,
+     8,   106,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   165,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   134,-32768,
+   156,   161,   164,-32768,-32768,-32768,-32768,   166,-32768,   171,
+   -22,    10,   131,-32768,-32768,-32768,-32768,   167,   168,-32768,
+-32768,   169,   172,-32768,   174,-32768,-32768,-32768,   -12,   -12,
+-32768,-32768,   -22,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+   135,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   170,
+   175,    12,-32768,-32768,-32768,-32768,-32768,-32768,   181,   176,
+-32768,-32768,-32768,   179,   182,-32768,   -33,   173,   177,   180,
+-32768,   178,-32768,-32768,   183,-32768,   184,   185,   186,-32768,
+-32768,   187,   188,   189,   190,   191,   192,   193,   194,   195,
+   196,-32768,   197,   199,   200,   201,   202,   203,   204,   205,
+   -49,   -24,-32768,-32768,   206,   207,   221,   209,   208,-32768,
+   210,   -49,   -24,-32768,-32768,-32768,-32768,-32768,   212,-32768,
+   213,   214,-32768,   215,-32768,-32768,-32768,   216,   217,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -25,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,   218,   219,-32768,-32768,-32768,-32768,
+-32768,   220,   222,-32768,-32768,-32768,   224,-32768,-32768,-32768,
+-32768,-32768,-32768,   228,   -22,   229,    19,-32768,-32768,-32768,
+   225,   226,-32768,-32768,   181,-32768,   227,   230,-32768,   221,
+-32768,-32768,   234,   241,   233,-32768,-32768,-32768,-32768,-32768,
+-32768,   231,   232,   -49,   -24,   235,   236,-32768,-32768,-32768,
+-32768,-32768,-32768,   237,   238,-32768,-32768,   272,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    70,
+   240,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,   242,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,  -258,-32768,-32768,-32768,-32768,-32768,
+  -256,-32768,-32768,-32768,   137,   223,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -320,  -226,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -162,  -383
+};
+
+
+#define	YYLAST		372
+
+
+static const short yytable[] = {   211,
+   212,   213,   374,    70,    71,    72,    78,    79,    80,    81,
+    82,    85,    86,    87,    88,    89,   298,    35,   140,   456,
+   336,    92,    93,    94,    95,    96,   464,   404,    32,    43,
+   351,    97,    98,    99,   100,   101,   102,   103,    29,   508,
+   326,    59,     2,   123,   294,   295,     3,   124,     4,     5,
+   125,     6,    31,     7,   126,   465,    60,   296,   299,     8,
+   106,   107,   108,   109,   110,   111,     9,    30,   149,   150,
+   466,   151,    38,   311,   312,   313,   327,   146,   147,   148,
+   300,   206,   207,   208,    10,   152,    39,   153,   467,    48,
+    33,   468,   370,   371,    11,    40,    12,    44,   352,    41,
+   405,    47,   440,   441,   442,   443,   114,   115,   214,   215,
+   469,   501,   217,   218,   308,   309,    51,   141,    54,   301,
+   302,   314,   340,   341,   354,   355,    90,    83,    36,   104,
+   393,   394,    63,   483,   484,    73,    13,   222,    14,   223,
+    50,   224,    66,   225,   481,   226,   227,   228,   229,   230,
+   112,   231,   232,   233,   136,   137,    53,   234,   235,    68,
+   236,   237,   238,    76,   239,   116,   240,   241,   242,    60,
+   120,   122,   127,   133,   128,   129,   130,   243,   244,   245,
+   246,   247,   131,   132,   134,   135,   155,   248,   249,   250,
+    44,   251,   142,   143,   144,   252,   145,   154,   158,   156,
+   157,   159,   160,   161,   165,   162,   163,   164,   167,   168,
+   183,   306,   307,   253,   186,   315,   488,   319,   320,   269,
+   328,   184,   255,   491,   256,   257,   258,   259,   439,   260,
+   342,   261,   262,   397,   263,   264,   265,   266,   348,   455,
+   267,   268,   270,   350,   271,   272,   273,   274,   275,   276,
+   277,   278,   279,   280,   281,   282,   283,   284,   285,   286,
+   287,   288,   290,   316,   317,   318,   356,   344,   321,   382,
+   322,   509,   324,   325,   329,   330,   332,   333,   334,   335,
+   480,   337,   338,    65,   339,   343,   496,     0,   119,   345,
+   391,   360,   361,   363,   346,   392,   364,   347,   366,   402,
+   400,     0,   403,   118,   408,   221,   406,     0,     0,     0,
+   407,   410,     0,     0,     0,     0,   413,   415,   416,   417,
+   420,   421,   422,   423,   424,   425,   426,   427,   428,   429,
+   431,   500,   432,   433,   434,   435,   436,   437,   438,   447,
+   448,   449,   451,   454,  -152,   458,   459,   460,   461,   462,
+   463,   473,   474,   482,   494,   476,   475,   479,   486,   487,
+   489,   495,     0,   490,   498,   499,     0,     0,   502,   503,
+   506,   507
+};
+
+static const short yycheck[] = {   162,
+   163,   164,   323,     4,     5,     6,    15,    16,    17,    18,
+    19,    21,    22,    23,    24,    25,    10,    13,    26,   403,
+   247,    28,    29,    30,    31,    32,    52,    61,    11,    58,
+    53,    38,    39,    40,    41,    42,    43,    44,   135,     0,
+    86,    58,     3,   121,   108,   109,     7,   125,     9,    10,
+   121,    12,   125,    14,   125,    81,    73,   121,    52,    20,
+    46,    47,    48,    49,    50,    51,    27,     8,    34,    35,
+    96,    37,   135,    77,    78,    79,   122,    33,    34,    35,
+    74,   131,   132,   133,    45,    34,   135,    36,   114,   122,
+    73,   117,   319,   320,    55,   135,    57,   126,   121,   135,
+   134,    98,   127,   128,   129,   130,   125,   126,   106,   107,
+   136,   495,   125,   126,    78,    79,   134,   125,   134,   113,
+   114,   125,   115,   116,   115,   116,   136,   136,   124,   136,
+   119,   120,   106,   115,   116,   136,    97,    60,    99,    62,
+   125,    64,    59,    66,   465,    68,    69,    70,    71,    72,
+   136,    74,    75,    76,    85,    86,   125,    80,    81,   134,
+    83,    84,    85,   125,    87,    56,    89,    90,    91,    73,
+   135,   134,   125,   121,   134,   134,   134,   100,   101,   102,
+   103,   104,   122,   122,   122,   122,   121,   110,   111,   112,
+   126,   114,   126,   126,   126,   118,   126,   125,   122,   121,
+   121,   121,   121,   121,   105,   121,   121,   121,    73,   135,
+   106,    63,    65,   136,   125,    78,   475,    73,    73,   125,
+    88,   134,   134,   480,   134,   134,   134,   134,   391,   134,
+   125,   134,   134,    53,   134,   134,   134,   134,    73,   402,
+   134,   134,   134,    73,   134,   134,   134,   134,   134,   134,
+   134,   134,   134,   134,   134,   134,   134,   134,   134,   134,
+   134,   134,   134,   122,   122,   122,   136,   134,   122,   135,
+   121,     0,   122,   122,   122,   122,   122,   121,   121,   121,
+    53,   122,   121,    44,   122,   121,    54,    -1,    66,   134,
+   121,   125,   125,   125,   134,   121,   125,   134,   125,   121,
+   125,    -1,   121,    62,   125,   169,   134,    -1,    -1,    -1,
+   134,   134,    -1,    -1,    -1,    -1,   134,   134,   134,   134,
+   134,   134,   134,   134,   134,   134,   134,   134,   134,   134,
+   134,   494,   134,   134,   134,   134,   134,   134,   134,   134,
+   134,   121,   134,   134,   137,   134,   134,   134,   134,   134,
+   134,   134,   134,   125,   121,   134,   137,   134,   134,   134,
+   134,   121,    -1,   134,   134,   134,    -1,    -1,   134,   134,
+   134,   134
+};
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/lib/bison.simple"
+/* This file comes from bison-1.28.  */
+
+/* Skeleton output parser for bison,
+   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser
+  when the %semantic_parser declaration is not specified in the grammar.
+  It was written by Richard Stallman by simplifying the hairy parser
+  used when %semantic_parser is specified.  */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C.  */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C.  */
+/* This used to test MSDOS, but that is a bad idea
+   since that symbol is in the user namespace.  */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+	 instead, just don't use alloca.  */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+   So I turned it off.   rms, 2 May 1997.  */
+/* #include <malloc.h>  */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+		 and on HPUX 10.  Eventually we can turn this on.  */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+   It is replaced by the list of actions, each action
+   as one case of the switch.  */
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+   This remains here temporarily to ease the
+   transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    { yychar = (token), yylval = (value);			\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+#ifndef YYPURE
+#define YYLEX		yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int	yychar;			/*  the lookahead symbol		*/
+YYSTYPE	yylval;			/*  the semantic value of the		*/
+				/*  lookahead symbol			*/
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc;			/*  location data for the lookahead	*/
+				/*  symbol				*/
+#endif
+
+int yynerrs;			/*  number of parse errors so far       */
+#endif  /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug;			/*  nonzero means print parse trace	*/
+/* Since this is uninitialized, it does not stop multiple parsers
+   from coexisting.  */
+#endif
+
+/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
+
+#ifndef	YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/*  YYMAXDEPTH is the maximum size the stacks can grow to
+    (effective only if the built-in stack extension method is used).  */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy.  Note that the size argument
+   should be passed with type unsigned int, because that is what the non-GCC
+   definitions require.  With GCC, __builtin_memcpy takes an arg
+   of type size_t, but it can handle unsigned int.  */
+
+#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
+#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
+#else				/* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (to, from, count)
+     char *to;
+     char *from;
+     unsigned int count;
+{
+  register char *f = from;
+  register char *t = to;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+  register char *t = to;
+  register char *f = from;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/lib/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  register int yystate;
+  register int yyn;
+  register short *yyssp;
+  register YYSTYPE *yyvsp;
+  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
+  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
+
+  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
+  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
+
+  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
+  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+
+#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  int yystacksize = YYINITDEPTH;
+  int yyfree_stacks = 0;
+
+#ifdef YYPURE
+  int yychar;
+  YYSTYPE yylval;
+  int yynerrs;
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylloc;
+#endif
+#endif
+
+  YYSTYPE yyval;		/*  the variable used to return		*/
+				/*  semantic values from the action	*/
+				/*  routines				*/
+
+  int yylen;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Starting parse\n");
+#endif
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss - 1;
+  yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in  yystate  .  */
+/* In all cases, when you get here, the value and location stacks
+   have just been pushed. so pushing a state here evens the stacks.  */
+yynewstate:
+
+  *++yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Give user a chance to reallocate the stack */
+      /* Use copies of these so that the &'s don't force the real ones into memory. */
+      YYSTYPE *yyvs1 = yyvs;
+      short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+      YYLTYPE *yyls1 = yyls;
+#endif
+
+      /* Get the current used size of the three stacks, in elements.  */
+      int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      /* Each stack pointer address is followed by the size of
+	 the data in use in that stack, in bytes.  */
+#ifdef YYLSP_NEEDED
+      /* This used to be a conditional around just the two extra args,
+	 but that might be undefined if yyoverflow is a macro.  */
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yyls1, size * sizeof (*yylsp),
+		 &yystacksize);
+#else
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yystacksize);
+#endif
+
+      yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+      yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	{
+	  yyerror("parser stack overflow");
+	  if (yyfree_stacks)
+	    {
+	      free (yyss);
+	      free (yyvs);
+#ifdef YYLSP_NEEDED
+	      free (yyls);
+#endif
+	    }
+	  return 2;
+	}
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+      yyfree_stacks = 1;
+#endif
+      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+      __yy_memcpy ((char *)yyss, (char *)yyss1,
+		   size * (unsigned int) sizeof (*yyssp));
+      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+		   size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+      __yy_memcpy ((char *)yyls, (char *)yyls1,
+		   size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + size - 1;
+      yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+      yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+  goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Reading a token: ");
+#endif
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Now at end of input.\n");
+#endif
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+      if (yydebug)
+	{
+	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise meaning
+	     of a token, for further debugging info.  */
+#ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+#endif
+	  fprintf (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* count tokens shifted since error; after three, turn off error status.  */
+  if (yyerrstatus) yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+/* Do the default action for the current state.  */
+yydefault:
+
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+
+/* Do a reduction.  yyn is the number of a rule to reduce with.  */
+yyreduce:
+  yylen = yyr2[yyn];
+  if (yylen > 0)
+    yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      int i;
+
+      fprintf (stderr, "Reducing via rule %d (line %d), ",
+	       yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+
+  switch (yyn) {
+
+case 19:
+#line 280 "./cfparse.y"
+{
+			struct passwd *pw;
+
+			if ((pw = getpwnam(yyvsp[0].val->v)) == NULL) {
+				yyerror("unkown user \"%s\"", yyvsp[0].val->v);
+				return -1;
+			}
+			lcconf->uid = pw->pw_uid;
+		;
+    break;}
+case 21:
+#line 290 "./cfparse.y"
+{ lcconf->uid = yyvsp[0].num; ;
+    break;}
+case 23:
+#line 292 "./cfparse.y"
+{
+			struct group *gr;
+
+			if ((gr = getgrnam(yyvsp[0].val->v)) == NULL) {
+				yyerror("unkown group \"%s\"", yyvsp[0].val->v);
+				return -1;
+			}
+			lcconf->gid = gr->gr_gid;
+		;
+    break;}
+case 25:
+#line 302 "./cfparse.y"
+{ lcconf->gid = yyvsp[0].num; ;
+    break;}
+case 27:
+#line 303 "./cfparse.y"
+{ lcconf->chroot = yyvsp[0].val->v; ;
+    break;}
+case 29:
+#line 309 "./cfparse.y"
+{
+			if (yyvsp[-1].num >= LC_PATHTYPE_MAX) {
+				yyerror("invalid path type %d", yyvsp[-1].num);
+				return -1;
+			}
+
+			/* free old pathinfo */
+			if (lcconf->pathinfo[yyvsp[-1].num])
+				racoon_free(lcconf->pathinfo[yyvsp[-1].num]);
+
+			/* set new pathinfo */
+			lcconf->pathinfo[yyvsp[-1].num] = strdup(yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+		;
+    break;}
+case 31:
+#line 328 "./cfparse.y"
+{ lcconf->complex_bundle = yyvsp[0].num; ;
+    break;}
+case 33:
+#line 334 "./cfparse.y"
+{
+			char path[MAXPATHLEN];
+
+			getpathname(path, sizeof(path),
+				LC_PATHTYPE_INCLUDE, yyvsp[-1].val->v);
+			vfree(yyvsp[-1].val);
+			if (yycf_switch_buffer(path) != 0)
+				return -1;
+		;
+    break;}
+case 34:
+#line 348 "./cfparse.y"
+{
+			if (yyvsp[-1].num >= LC_GSSENC_MAX) {
+				yyerror("invalid GSS ID encoding %d", yyvsp[-1].num);
+				return -1;
+			}
+			lcconf->gss_id_enc = yyvsp[-1].num;
+		;
+    break;}
+case 36:
+#line 363 "./cfparse.y"
+{
+			/*XXX to be deleted */
+		;
+    break;}
+case 38:
+#line 368 "./cfparse.y"
+{
+			/*XXX to be deleted */
+			yyvsp[0].val->l--;	/* nuke '\0' */
+			lcconf->ident[yyvsp[-1].num] = yyvsp[0].val;
+			if (lcconf->ident[yyvsp[-1].num] == NULL) {
+				yyerror("failed to set my ident: %s",
+					strerror(errno));
+				return -1;
+			}
+		;
+    break;}
+case 41:
+#line 387 "./cfparse.y"
+{
+			/*
+			 * XXX ignore it because this specification
+			 * will be obsoleted.
+			 */
+			yywarn("see racoon.conf(5), such a log specification will be obsoleted.");
+			vfree(yyvsp[0].val);
+		;
+    break;}
+case 42:
+#line 396 "./cfparse.y"
+{
+			/*
+			 * set the loglevel by configuration file only when
+			 * the command line did not specify any loglevel.
+			 */
+			if (loglevel <= LLV_BASE)
+				loglevel += yyvsp[0].num;
+		;
+    break;}
+case 46:
+#line 415 "./cfparse.y"
+{ lcconf->pad_random = yyvsp[0].num; ;
+    break;}
+case 48:
+#line 416 "./cfparse.y"
+{ lcconf->pad_randomlen = yyvsp[0].num; ;
+    break;}
+case 50:
+#line 417 "./cfparse.y"
+{ lcconf->pad_maxsize = yyvsp[0].num; ;
+    break;}
+case 52:
+#line 418 "./cfparse.y"
+{ lcconf->pad_strict = yyvsp[0].num; ;
+    break;}
+case 54:
+#line 419 "./cfparse.y"
+{ lcconf->pad_excltail = yyvsp[0].num; ;
+    break;}
+case 59:
+#line 432 "./cfparse.y"
+{
+			listen_addr (yyvsp[0].saddr, 0);
+		;
+    break;}
+case 61:
+#line 437 "./cfparse.y"
+{
+#ifdef ENABLE_NATT
+			listen_addr (yyvsp[0].saddr, 1);
+#else
+			yyerror("NAT-T support not compiled in.");
+#endif
+		;
+    break;}
+case 63:
+#line 446 "./cfparse.y"
+{
+			yyerror("admin directive is obsoleted.");
+		;
+    break;}
+case 65:
+#line 451 "./cfparse.y"
+{
+#ifdef ENABLE_ADMINPORT
+			adminsock_conf(yyvsp[-3].val, yyvsp[-2].val, yyvsp[-1].val, yyvsp[0].num);
+#else
+			yywarn("admin port support not compiled in");
+#endif
+		;
+    break;}
+case 67:
+#line 460 "./cfparse.y"
+{
+#ifdef ENABLE_ADMINPORT
+			adminsock_conf(yyvsp[0].val, NULL, NULL, -1);
+#else
+			yywarn("admin port support not compiled in");
+#endif
+		;
+    break;}
+case 69:
+#line 469 "./cfparse.y"
+{
+#ifdef ENABLE_ADMINPORT
+			adminsock_path = NULL;
+#else
+			yywarn("admin port support not compiled in");
+#endif
+		;
+    break;}
+case 71:
+#line 477 "./cfparse.y"
+{ lcconf->strict_address = TRUE; ;
+    break;}
+case 73:
+#line 481 "./cfparse.y"
+{
+			char portbuf[10];
+
+			snprintf(portbuf, sizeof(portbuf), "%ld", yyvsp[0].num);
+			yyval.saddr = str2saddr(yyvsp[-1].val->v, portbuf);
+			vfree(yyvsp[-1].val);
+			if (!yyval.saddr)
+				return -1;
+		;
+    break;}
+case 74:
+#line 492 "./cfparse.y"
+{ yyval.num = PORT_ISAKMP; ;
+    break;}
+case 75:
+#line 493 "./cfparse.y"
+{ yyval.num = yyvsp[0].num; ;
+    break;}
+case 79:
+#line 505 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+		 if (inet_pton(AF_INET, yyvsp[0].val->v,
+		     &isakmp_cfg_config.network4) != 1)
+			yyerror("bad IPv4 network address.");
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 81:
+#line 516 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			if (inet_pton(AF_INET, yyvsp[0].val->v,
+			    &isakmp_cfg_config.netmask4) != 1)
+				yyerror("bad IPv4 netmask address.");
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 83:
+#line 527 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			if (inet_pton(AF_INET, yyvsp[0].val->v,
+			    &isakmp_cfg_config.dns4) != 1)
+				yyerror("bad IPv4 DNS address.");
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 85:
+#line 538 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			if (inet_pton(AF_INET, yyvsp[0].val->v,
+			    &isakmp_cfg_config.nbns4) != 1)
+				yyerror("bad IPv4 WINS address.");
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 87:
+#line 549 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_SYSTEM;
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 89:
+#line 558 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+#ifdef HAVE_LIBRADIUS
+			isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_RADIUS;
+#else /* HAVE_LIBRADIUS */
+			yyerror("racoon not configured with --with-libradius");
+#endif /* HAVE_LIBRADIUS */
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 91:
+#line 571 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+#ifdef HAVE_LIBPAM
+			isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_PAM;
+#else /* HAVE_LIBPAM */
+			yyerror("racoon not configured with --with-libpam");
+#endif /* HAVE_LIBPAM */
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 93:
+#line 584 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_NONE;
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 95:
+#line 593 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+#ifdef HAVE_LIBRADIUS
+			isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_RADIUS;
+#else /* HAVE_LIBRADIUS */
+			yyerror("racoon not configured with --with-libradius");
+#endif /* HAVE_LIBRADIUS */
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 97:
+#line 606 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+#ifdef HAVE_LIBPAM
+			isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_PAM;
+#else /* HAVE_LIBPAM */
+			yyerror("racoon not configured with --with-libpam");
+#endif /* HAVE_LIBPAM */
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 99:
+#line 619 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			size_t len;
+
+			isakmp_cfg_config.pool_size = yyvsp[0].num;
+
+			len = yyvsp[0].num * sizeof(*isakmp_cfg_config.port_pool);
+			isakmp_cfg_config.port_pool = racoon_malloc(len);
+			if (isakmp_cfg_config.port_pool == NULL)
+				yyerror("cannot allocate memory for pool");
+			bzero(isakmp_cfg_config.port_pool, len);
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 101:
+#line 636 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			isakmp_cfg_config.pfs_group = yyvsp[0].num;
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 103:
+#line 645 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			isakmp_cfg_config.save_passwd = yyvsp[0].num;
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 105:
+#line 654 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			isakmp_cfg_config.auth_throttle = yyvsp[0].num;
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 107:
+#line 663 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_LOCAL;
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 109:
+#line 672 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+#ifdef HAVE_LIBRADIUS
+			isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_RADIUS;
+#else /* HAVE_LIBRADIUS */
+			yyerror("racoon not configured with --with-libradius");
+#endif /* HAVE_LIBRADIUS */
+#else /* ENABLE_HYBRID */
+			yyerror("racoon not configured with --enable-hybrid");
+#endif /* ENABLE_HYBRID */
+		;
+    break;}
+case 111:
+#line 685 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			strncpy(&isakmp_cfg_config.motd[0], yyvsp[0].val->v, MAXPATHLEN);
+			isakmp_cfg_config.motd[MAXPATHLEN] = '\0';
+			vfree(yyvsp[0].val);
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 116:
+#line 707 "./cfparse.y"
+{
+			lcconf->retry_counter = yyvsp[0].num;
+		;
+    break;}
+case 118:
+#line 712 "./cfparse.y"
+{
+			lcconf->retry_interval = yyvsp[-1].num * yyvsp[0].num;
+		;
+    break;}
+case 120:
+#line 717 "./cfparse.y"
+{
+			lcconf->count_persend = yyvsp[0].num;
+		;
+    break;}
+case 122:
+#line 722 "./cfparse.y"
+{
+			lcconf->retry_checkph1 = yyvsp[-1].num * yyvsp[0].num;
+		;
+    break;}
+case 124:
+#line 727 "./cfparse.y"
+{
+			lcconf->wait_ph2complete = yyvsp[-1].num * yyvsp[0].num;
+		;
+    break;}
+case 126:
+#line 732 "./cfparse.y"
+{
+#ifdef ENABLE_NATT
+			lcconf->natt_ka_interval = yyvsp[-1].num * yyvsp[0].num;
+#else
+			yyerror("NAT-T support not compiled in.");
+#endif
+		;
+    break;}
+case 128:
+#line 745 "./cfparse.y"
+{
+			cur_sainfo = newsainfo();
+			if (cur_sainfo == NULL) {
+				yyerror("failed to allocate sainfo");
+				return -1;
+			}
+		;
+    break;}
+case 129:
+#line 753 "./cfparse.y"
+{
+			struct sainfo *check;
+
+			/* default */
+			if (cur_sainfo->algs[algclass_ipsec_enc] == 0) {
+				yyerror("no encryption algorithm at %s",
+					sainfo2str(cur_sainfo));
+				return -1;
+			}
+			if (cur_sainfo->algs[algclass_ipsec_auth] == 0) {
+				yyerror("no authentication algorithm at %s",
+					sainfo2str(cur_sainfo));
+				return -1;
+			}
+			if (cur_sainfo->algs[algclass_ipsec_comp] == 0) {
+				yyerror("no compression algorithm at %s",
+					sainfo2str(cur_sainfo));
+				return -1;
+			}
+
+			/* duplicate check */
+			check = getsainfo(cur_sainfo->idsrc,
+					  cur_sainfo->iddst,
+					  cur_sainfo->id_i);
+			if (check && (!check->idsrc && !cur_sainfo->idsrc)) {
+				yyerror("duplicated sainfo: %s",
+					sainfo2str(cur_sainfo));
+				return -1;
+			}
+			inssainfo(cur_sainfo);
+		;
+    break;}
+case 131:
+#line 788 "./cfparse.y"
+{
+			cur_sainfo->idsrc = NULL;
+			cur_sainfo->iddst = NULL;
+		;
+    break;}
+case 132:
+#line 793 "./cfparse.y"
+{
+			cur_sainfo->idsrc = yyvsp[-1].val;
+			cur_sainfo->iddst = yyvsp[0].val;
+		;
+    break;}
+case 133:
+#line 800 "./cfparse.y"
+{
+			char portbuf[10];
+			struct sockaddr *saddr;
+
+			if ((yyvsp[0].num == IPPROTO_ICMP || yyvsp[0].num == IPPROTO_ICMPV6)
+			 && (yyvsp[-1].num != IPSEC_PORT_ANY || yyvsp[-1].num != IPSEC_PORT_ANY)) {
+				yyerror("port number must be \"any\".");
+				return -1;
+			}
+
+			snprintf(portbuf, sizeof(portbuf), "%lu", yyvsp[-1].num);
+			saddr = str2saddr(yyvsp[-3].val->v, portbuf);
+			vfree(yyvsp[-3].val);
+			if (saddr == NULL)
+				return -1;
+
+			switch (saddr->sa_family) {
+			case AF_INET:
+				if (yyvsp[0].num == IPPROTO_ICMPV6) {
+					yyerror("upper layer protocol mismatched.\n");
+					racoon_free(saddr);
+					return -1;
+				}
+				yyval.val = ipsecdoi_sockaddr2id(saddr,
+					yyvsp[-2].num == (sizeof(struct in_addr) << 3) &&
+						yyvsp[-4].num == IDTYPE_ADDRESS
+					  ? ~0 : yyvsp[-2].num,
+					yyvsp[0].num);
+				break;
+#ifdef INET6
+			case AF_INET6:
+				if (yyvsp[0].num == IPPROTO_ICMP) {
+					yyerror("upper layer protocol mismatched.\n");
+					racoon_free(saddr);
+					return -1;
+				}
+				yyval.val = ipsecdoi_sockaddr2id(saddr,
+					yyvsp[-2].num == (sizeof(struct in6_addr) << 3) &&
+						yyvsp[-4].num == IDTYPE_ADDRESS
+					  ? ~0 : yyvsp[-2].num,
+					yyvsp[0].num);
+				break;
+#endif
+			default:
+				yyerror("invalid family: %d", saddr->sa_family);
+				yyval.val = NULL;
+				break;
+			}
+			racoon_free(saddr);
+			if (yyval.val == NULL)
+				return -1;
+		;
+    break;}
+case 134:
+#line 853 "./cfparse.y"
+{
+			struct ipsecdoi_id_b *id_b;
+
+			if (yyvsp[-1].num == IDTYPE_ASN1DN) {
+				yyerror("id type forbidden: %d", yyvsp[-1].num);
+				yyval.val = NULL;
+				return -1;
+			}
+
+			yyvsp[0].val->l--;
+
+			yyval.val = vmalloc(sizeof(*id_b) + yyvsp[0].val->l);
+			if (yyval.val == NULL) {
+				yyerror("failed to allocate identifier");
+				return -1;
+			}
+
+			id_b = (struct ipsecdoi_id_b *)yyval.val->v;
+			id_b->type = idtype2doi(yyvsp[-1].num);
+
+			id_b->proto_id = 0;
+			id_b->port = 0;
+
+			memcpy(yyval.val->v + sizeof(*id_b), yyvsp[0].val->v, yyvsp[0].val->l);
+		;
+    break;}
+case 135:
+#line 881 "./cfparse.y"
+{
+			cur_sainfo->id_i = NULL;
+		;
+    break;}
+case 136:
+#line 886 "./cfparse.y"
+{
+			struct ipsecdoi_id_b *id_b;
+			vchar_t *idv;
+
+			if (set_identifier(&idv, yyvsp[-1].num, yyvsp[0].val) != 0) {
+				yyerror("failed to set identifer.\n");
+				return -1;
+			}
+			cur_sainfo->id_i = vmalloc(sizeof(*id_b) + idv->l);
+			if (cur_sainfo->id_i == NULL) {
+				yyerror("failed to allocate identifier");
+				return -1;
+			}
+
+			id_b = (struct ipsecdoi_id_b *)cur_sainfo->id_i->v;
+			id_b->type = idtype2doi(yyvsp[-1].num);
+
+			id_b->proto_id = 0;
+			id_b->port = 0;
+
+			memcpy(cur_sainfo->id_i->v + sizeof(*id_b),
+			       idv->v, idv->l);
+			vfree(idv);
+		;
+    break;}
+case 139:
+#line 917 "./cfparse.y"
+{
+			cur_sainfo->pfs_group = yyvsp[0].num;
+		;
+    break;}
+case 141:
+#line 922 "./cfparse.y"
+{
+			cur_sainfo->lifetime = yyvsp[-1].num * yyvsp[0].num;
+		;
+    break;}
+case 143:
+#line 927 "./cfparse.y"
+{
+#if 1
+			yyerror("byte lifetime support is deprecated");
+			return -1;
+#else
+			cur_sainfo->lifebyte = fix_lifebyte(yyvsp[-1].num * yyvsp[0].num);
+			if (cur_sainfo->lifebyte == 0)
+				return -1;
+#endif
+		;
+    break;}
+case 145:
+#line 938 "./cfparse.y"
+{
+			cur_algclass = yyvsp[0].num;
+		;
+    break;}
+case 147:
+#line 943 "./cfparse.y"
+{
+			yyerror("it's deprecated to specify a identifier in phase 2");
+		;
+    break;}
+case 149:
+#line 948 "./cfparse.y"
+{
+			yyerror("it's deprecated to specify a identifier in phase 2");
+		;
+    break;}
+case 151:
+#line 956 "./cfparse.y"
+{
+			inssainfoalg(&cur_sainfo->algs[cur_algclass], yyvsp[0].alg);
+		;
+    break;}
+case 152:
+#line 960 "./cfparse.y"
+{
+			inssainfoalg(&cur_sainfo->algs[cur_algclass], yyvsp[0].alg);
+		;
+    break;}
+case 154:
+#line 967 "./cfparse.y"
+{
+			int defklen;
+
+			yyval.alg = newsainfoalg();
+			if (yyval.alg == NULL) {
+				yyerror("failed to get algorithm allocation");
+				return -1;
+			}
+
+			yyval.alg->alg = algtype2doi(cur_algclass, yyvsp[-1].num);
+			if (yyval.alg->alg == -1) {
+				yyerror("algorithm mismatched");
+				racoon_free(yyval.alg);
+				yyval.alg = NULL;
+				return -1;
+			}
+
+			defklen = default_keylen(cur_algclass, yyvsp[-1].num);
+			if (defklen == 0) {
+				if (yyvsp[0].num) {
+					yyerror("keylen not allowed");
+					racoon_free(yyval.alg);
+					yyval.alg = NULL;
+					return -1;
+				}
+			} else {
+				if (yyvsp[0].num && check_keylen(cur_algclass, yyvsp[-1].num, yyvsp[0].num) < 0) {
+					yyerror("invalid keylen %d", yyvsp[0].num);
+					racoon_free(yyval.alg);
+					yyval.alg = NULL;
+					return -1;
+				}
+			}
+
+			if (yyvsp[0].num)
+				yyval.alg->encklen = yyvsp[0].num;
+			else
+				yyval.alg->encklen = defklen;
+
+			/* check if it's supported algorithm by kernel */
+			if (!(cur_algclass == algclass_ipsec_auth && yyvsp[-1].num == algtype_non_auth)
+			 && pk_checkalg(cur_algclass, yyvsp[-1].num, yyval.alg->encklen)) {
+				int a = algclass2doi(cur_algclass);
+				int b = algtype2doi(cur_algclass, yyvsp[-1].num);
+				if (a == IPSECDOI_ATTR_AUTH)
+					a = IPSECDOI_PROTO_IPSEC_AH;
+				yyerror("algorithm %s not supported by the kernel (missing module?)",
+					s_ipsecdoi_trns(a, b));
+				racoon_free(yyval.alg);
+				yyval.alg = NULL;
+				return -1;
+			}
+		;
+    break;}
+case 155:
+#line 1022 "./cfparse.y"
+{ yyval.num = ~0; ;
+    break;}
+case 156:
+#line 1023 "./cfparse.y"
+{ yyval.num = yyvsp[0].num; ;
+    break;}
+case 157:
+#line 1026 "./cfparse.y"
+{ yyval.num = IPSEC_PORT_ANY; ;
+    break;}
+case 158:
+#line 1027 "./cfparse.y"
+{ yyval.num = yyvsp[0].num; ;
+    break;}
+case 159:
+#line 1028 "./cfparse.y"
+{ yyval.num = IPSEC_PORT_ANY; ;
+    break;}
+case 160:
+#line 1031 "./cfparse.y"
+{ yyval.num = yyvsp[0].num; ;
+    break;}
+case 161:
+#line 1032 "./cfparse.y"
+{ yyval.num = yyvsp[0].num; ;
+    break;}
+case 162:
+#line 1033 "./cfparse.y"
+{ yyval.num = IPSEC_ULPROTO_ANY; ;
+    break;}
+case 163:
+#line 1036 "./cfparse.y"
+{ yyval.num = 0; ;
+    break;}
+case 164:
+#line 1037 "./cfparse.y"
+{ yyval.num = yyvsp[0].num; ;
+    break;}
+case 165:
+#line 1043 "./cfparse.y"
+{
+			struct remoteconf *new;
+			struct proposalspec *prspec;
+
+			new = copyrmconf(yyvsp[0].saddr);
+			if (new == NULL) {
+				yyerror("failed to get remoteconf for %s.", saddr2str (yyvsp[0].saddr));
+				return -1;
+			}
+
+			new->remote = yyvsp[-2].saddr;
+			new->inherited_from = getrmconf_strict(yyvsp[0].saddr, 1);
+			new->proposal = NULL;
+			new->prhead = NULL;
+			cur_rmconf = new;
+
+			prspec = newprspec();
+			if (prspec == NULL || !cur_rmconf->inherited_from 
+				|| !cur_rmconf->inherited_from->proposal)
+				return -1;
+			prspec->lifetime = cur_rmconf->inherited_from->proposal->lifetime;
+			prspec->lifebyte = cur_rmconf->inherited_from->proposal->lifebyte;
+			insprspec(prspec, &cur_rmconf->prhead);
+		;
+    break;}
+case 167:
+#line 1069 "./cfparse.y"
+{
+			struct remoteconf *new;
+			struct proposalspec *prspec;
+
+			new = newrmconf();
+			if (new == NULL) {
+				yyerror("failed to get new remoteconf.");
+				return -1;
+			}
+
+			new->remote = yyvsp[0].saddr;
+			cur_rmconf = new;
+
+			prspec = newprspec();
+			if (prspec == NULL)
+				return -1;
+			prspec->lifetime = oakley_get_defaultlifetime();
+			insprspec(prspec, &cur_rmconf->prhead);
+		;
+    break;}
+case 169:
+#line 1093 "./cfparse.y"
+{
+			/* check a exchange mode */
+			if (cur_rmconf->etypes == NULL) {
+				yyerror("no exchange mode specified.\n");
+				return -1;
+			}
+
+			if (cur_rmconf->idvtype == IDTYPE_UNDEFINED)
+				cur_rmconf->idvtype = IDTYPE_ADDRESS;
+
+
+			if (cur_rmconf->idvtype == IDTYPE_ASN1DN) {
+				if (cur_rmconf->mycertfile) {
+					if (cur_rmconf->idv)
+						yywarn("Both CERT and ASN1 ID "
+						       "are set. Hope this is OK.\n");
+					/* TODO: Preparse the DN here */
+				} else if (cur_rmconf->idv) {
+					/* OK, using asn1dn without X.509. */
+				} else {
+					yyerror("ASN1 ID not specified "
+						"and no CERT defined!\n");
+					return -1;
+				}
+			}
+			
+			if (cur_rmconf->prhead->spspec == NULL
+				&& cur_rmconf->inherited_from
+				&& cur_rmconf->inherited_from->prhead) {
+				cur_rmconf->prhead->spspec = cur_rmconf->inherited_from->prhead->spspec;
+			}
+			if (set_isakmp_proposal(cur_rmconf, cur_rmconf->prhead) != 0)
+				return -1;
+
+			/* DH group settting if aggressive mode is there. */
+			if (check_etypeok(cur_rmconf, ISAKMP_ETYPE_AGG) != NULL) {
+				struct isakmpsa *p;
+				int b = 0;
+
+				/* DH group */
+				for (p = cur_rmconf->proposal; p; p = p->next) {
+					if (b == 0 || (b && b == p->dh_group)) {
+						b = p->dh_group;
+						continue;
+					}
+					yyerror("DH group must be equal "
+						"in all proposals "
+						"when aggressive mode is "
+						"used.\n");
+					return -1;
+				}
+				cur_rmconf->dh_group = b;
+
+				if (cur_rmconf->dh_group == 0) {
+					yyerror("DH group must be set in the proposal.\n");
+					return -1;
+				}
+
+				/* DH group settting if PFS is required. */
+				if (oakley_setdhgroup(cur_rmconf->dh_group,
+						&cur_rmconf->dhgrp) < 0) {
+					yyerror("failed to set DH value.\n");
+					return -1;
+				}
+			}
+
+			insrmconf(cur_rmconf);
+		;
+    break;}
+case 170:
+#line 1164 "./cfparse.y"
+{
+			yyval.saddr = newsaddr(sizeof(struct sockaddr));
+			yyval.saddr->sa_family = AF_UNSPEC;
+			((struct sockaddr_in *)yyval.saddr)->sin_port = htons(yyvsp[0].num);
+		;
+    break;}
+case 171:
+#line 1170 "./cfparse.y"
+{
+			yyval.saddr = yyvsp[0].saddr;
+			if (yyval.saddr == NULL) {
+				yyerror("failed to allocate sockaddr");
+				return -1;
+			}
+		;
+    break;}
+case 174:
+#line 1184 "./cfparse.y"
+{
+			cur_rmconf->etypes = NULL;
+		;
+    break;}
+case 176:
+#line 1188 "./cfparse.y"
+{ cur_rmconf->doitype = yyvsp[0].num; ;
+    break;}
+case 178:
+#line 1189 "./cfparse.y"
+{ cur_rmconf->sittype = yyvsp[0].num; ;
+    break;}
+case 181:
+#line 1192 "./cfparse.y"
+{
+			yywarn("This directive without certtype will be removed!\n");
+			yywarn("Please use 'peers_certfile x509 \"%s\";' instead\n", yyvsp[0].val->v);
+			cur_rmconf->getcert_method = ISAKMP_GETCERT_LOCALFILE;
+			cur_rmconf->peerscertfile = strdup(yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+		;
+    break;}
+case 183:
+#line 1201 "./cfparse.y"
+{
+			cur_rmconf->cacerttype = yyvsp[-1].num;
+			cur_rmconf->getcacert_method = ISAKMP_GETCERT_LOCALFILE;
+			cur_rmconf->cacertfile = strdup(yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+		;
+    break;}
+case 185:
+#line 1209 "./cfparse.y"
+{
+			cur_rmconf->getcert_method = ISAKMP_GETCERT_LOCALFILE;
+			cur_rmconf->peerscertfile = strdup(yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+		;
+    break;}
+case 187:
+#line 1216 "./cfparse.y"
+{
+			char path[MAXPATHLEN];
+			int ret = 0;
+
+			getpathname(path, sizeof(path),
+				LC_PATHTYPE_CERT, yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+
+			if (cur_rmconf->getcert_method == ISAKMP_GETCERT_DNS) {
+				yyerror("Different peers_certfile method "
+					"already defined: %d!\n",
+					cur_rmconf->getcert_method);
+				return -1;
+			}
+			cur_rmconf->getcert_method = ISAKMP_GETCERT_LOCALFILE;
+			if (rsa_parse_file(cur_rmconf->rsa_public, path, RSA_TYPE_PUBLIC)) {
+				yyerror("Couldn't parse keyfile.\n", path);
+				return -1;
+			}
+			plog(LLV_DEBUG, LOCATION, NULL, "Public PlainRSA keyfile parsed: %s\n", path);
+		;
+    break;}
+case 189:
+#line 1239 "./cfparse.y"
+{
+			if (cur_rmconf->getcert_method) {
+				yyerror("Different peers_certfile method already defined!\n");
+				return -1;
+			}
+			cur_rmconf->getcert_method = ISAKMP_GETCERT_DNS;
+			cur_rmconf->peerscertfile = NULL;
+		;
+    break;}
+case 191:
+#line 1248 "./cfparse.y"
+{ cur_rmconf->verify_cert = yyvsp[0].num; ;
+    break;}
+case 193:
+#line 1249 "./cfparse.y"
+{ cur_rmconf->send_cert = yyvsp[0].num; ;
+    break;}
+case 195:
+#line 1250 "./cfparse.y"
+{ cur_rmconf->send_cr = yyvsp[0].num; ;
+    break;}
+case 197:
+#line 1252 "./cfparse.y"
+{
+			if (set_identifier(&cur_rmconf->idv, yyvsp[-1].num, yyvsp[0].val) != 0) {
+				yyerror("failed to set identifer.\n");
+				return -1;
+			}
+			cur_rmconf->idvtype = yyvsp[-1].num;
+		;
+    break;}
+case 199:
+#line 1261 "./cfparse.y"
+{
+#ifdef ENABLE_HYBRID
+			/* formerly identifier type login */
+			cur_rmconf->idvtype = IDTYPE_LOGIN;
+			if (set_identifier(&cur_rmconf->idv, IDTYPE_LOGIN, yyvsp[0].val) != 0) {
+				yyerror("failed to set identifer.\n");
+				return -1;
+			}
+			/* cur_rmconf->use_xauth = 1; */
+#else
+			yyerror("racoon not configured with --enable-hybrid");
+#endif
+		;
+    break;}
+case 201:
+#line 1276 "./cfparse.y"
+{
+			struct idspec  *id;
+			id = newidspec();
+			if (id == NULL) {
+				yyerror("failed to allocate idspec");
+				return -1;
+			}
+			if (set_identifier(&id->id, yyvsp[-1].num, yyvsp[0].val) != 0) {
+				yyerror("failed to set identifer.\n");
+				racoon_free(id);
+				return -1;
+			}
+			id->idtype = yyvsp[-1].num;
+			genlist_append (cur_rmconf->idvl_p, id);
+		;
+    break;}
+case 203:
+#line 1292 "./cfparse.y"
+{ cur_rmconf->verify_identifier = yyvsp[0].num; ;
+    break;}
+case 205:
+#line 1293 "./cfparse.y"
+{ cur_rmconf->nonce_size = yyvsp[0].num; ;
+    break;}
+case 207:
+#line 1295 "./cfparse.y"
+{
+			yyerror("dh_group cannot be defined here.");
+			return -1;
+		;
+    break;}
+case 209:
+#line 1300 "./cfparse.y"
+{ cur_rmconf->passive = yyvsp[0].num; ;
+    break;}
+case 211:
+#line 1301 "./cfparse.y"
+{ cur_rmconf->ike_frag = yyvsp[0].num; ;
+    break;}
+case 213:
+#line 1302 "./cfparse.y"
+{ 
+#ifdef SADB_X_EXT_NAT_T_FRAG
+			cur_rmconf->esp_frag = yyvsp[0].num; 
+#else
+			yywarn("Your kernel does not support esp_frag");
+#endif
+		;
+    break;}
+case 215:
+#line 1309 "./cfparse.y"
+{ 
+			cur_rmconf->script[SCRIPT_PHASE1_UP] = 
+			    script_path_add(vdup(yyvsp[-1].val));
+		;
+    break;}
+case 217:
+#line 1313 "./cfparse.y"
+{ 
+			cur_rmconf->script[SCRIPT_PHASE1_DOWN] = 
+			    script_path_add(vdup(yyvsp[-1].val));
+		;
+    break;}
+case 219:
+#line 1317 "./cfparse.y"
+{ cur_rmconf->mode_cfg = yyvsp[0].num; ;
+    break;}
+case 221:
+#line 1318 "./cfparse.y"
+{ cur_rmconf->gen_policy = yyvsp[0].num; ;
+    break;}
+case 223:
+#line 1319 "./cfparse.y"
+{ cur_rmconf->support_proxy = yyvsp[0].num; ;
+    break;}
+case 225:
+#line 1320 "./cfparse.y"
+{ cur_rmconf->ini_contact = yyvsp[0].num; ;
+    break;}
+case 227:
+#line 1322 "./cfparse.y"
+{
+#ifdef ENABLE_NATT
+			cur_rmconf->nat_traversal = yyvsp[0].num;
+#else
+			yyerror("NAT-T support not compiled in.");
+#endif
+		;
+    break;}
+case 229:
+#line 1330 "./cfparse.y"
+{
+#ifdef ENABLE_NATT
+			cur_rmconf->nat_traversal = yyvsp[0].num;
+#else
+			yyerror("NAT-T support not compiled in.");
+#endif
+		;
+    break;}
+case 231:
+#line 1338 "./cfparse.y"
+{
+#ifdef ENABLE_DPD
+			cur_rmconf->dpd = yyvsp[0].num;
+#else
+			yyerror("DPD support not compiled in.");
+#endif
+		;
+    break;}
+case 233:
+#line 1346 "./cfparse.y"
+{
+#ifdef ENABLE_DPD
+			cur_rmconf->dpd_interval = yyvsp[0].num;
+#else
+			yyerror("DPD support not compiled in.");
+#endif
+		;
+    break;}
+case 235:
+#line 1355 "./cfparse.y"
+{
+#ifdef ENABLE_DPD
+			cur_rmconf->dpd_retry = yyvsp[0].num;
+#else
+			yyerror("DPD support not compiled in.");
+#endif
+		;
+    break;}
+case 237:
+#line 1364 "./cfparse.y"
+{
+#ifdef ENABLE_DPD
+			cur_rmconf->dpd_maxfails = yyvsp[0].num;
+#else
+			yyerror("DPD support not compiled in.");
+#endif
+		;
+    break;}
+case 239:
+#line 1373 "./cfparse.y"
+{
+			cur_rmconf->prhead->lifetime = yyvsp[-1].num * yyvsp[0].num;
+		;
+    break;}
+case 241:
+#line 1377 "./cfparse.y"
+{ cur_rmconf->pcheck_level = yyvsp[0].num; ;
+    break;}
+case 243:
+#line 1379 "./cfparse.y"
+{
+#if 1
+			yyerror("byte lifetime support is deprecated in Phase1");
+			return -1;
+#else
+			yywarn("the lifetime of bytes in phase 1 "
+				"will be ignored at the moment.");
+			cur_rmconf->prhead->lifebyte = fix_lifebyte(yyvsp[-1].num * yyvsp[0].num);
+			if (cur_rmconf->prhead->lifebyte == 0)
+				return -1;
+#endif
+		;
+    break;}
+case 245:
+#line 1393 "./cfparse.y"
+{
+			struct secprotospec *spspec;
+
+			spspec = newspspec();
+			if (spspec == NULL)
+				return -1;
+			insspspec(spspec, &cur_rmconf->prhead);
+		;
+    break;}
+case 248:
+#line 1406 "./cfparse.y"
+{
+			struct etypes *new;
+			new = racoon_malloc(sizeof(struct etypes));
+			if (new == NULL) {
+				yyerror("filed to allocate etypes");
+				return -1;
+			}
+			new->type = yyvsp[0].num;
+			new->next = NULL;
+			if (cur_rmconf->etypes == NULL)
+				cur_rmconf->etypes = new;
+			else {
+				struct etypes *p;
+				for (p = cur_rmconf->etypes;
+				     p->next != NULL;
+				     p = p->next)
+					;
+				p->next = new;
+			}
+		;
+    break;}
+case 249:
+#line 1429 "./cfparse.y"
+{
+			cur_rmconf->certtype = yyvsp[-2].num;
+			cur_rmconf->mycertfile = strdup(yyvsp[-1].val->v);
+			vfree(yyvsp[-1].val);
+			cur_rmconf->myprivfile = strdup(yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+		;
+    break;}
+case 251:
+#line 1438 "./cfparse.y"
+{
+			char path[MAXPATHLEN];
+			int ret = 0;
+
+			getpathname(path, sizeof(path),
+				LC_PATHTYPE_CERT, yyvsp[0].val->v);
+			vfree(yyvsp[0].val);
+
+			cur_rmconf->certtype = yyvsp[-1].num;
+			cur_rmconf->send_cr = FALSE;
+			cur_rmconf->send_cert = FALSE;
+			cur_rmconf->verify_cert = FALSE;
+			if (rsa_parse_file(cur_rmconf->rsa_private, path, RSA_TYPE_PRIVATE)) {
+				yyerror("Couldn't parse keyfile.\n", path);
+				return -1;
+			}
+			plog(LLV_DEBUG, LOCATION, NULL, "Private PlainRSA keyfile parsed: %s\n", path);
+		;
+    break;}
+case 253:
+#line 1460 "./cfparse.y"
+{
+			yyval.num = algtype2doi(algclass_isakmp_dh, yyvsp[0].num);
+			if (yyval.num == -1) {
+				yyerror("must be DH group");
+				return -1;
+			}
+		;
+    break;}
+case 254:
+#line 1468 "./cfparse.y"
+{
+			if (ARRAYLEN(num2dhgroup) > yyvsp[0].num && num2dhgroup[yyvsp[0].num] != 0) {
+				yyval.num = num2dhgroup[yyvsp[0].num];
+			} else {
+				yyerror("must be DH group");
+				yyval.num = 0;
+				return -1;
+			}
+		;
+    break;}
+case 255:
+#line 1479 "./cfparse.y"
+{ yyval.val = NULL; ;
+    break;}
+case 256:
+#line 1480 "./cfparse.y"
+{ yyval.val = yyvsp[0].val; ;
+    break;}
+case 257:
+#line 1481 "./cfparse.y"
+{ yyval.val = yyvsp[0].val; ;
+    break;}
+case 260:
+#line 1489 "./cfparse.y"
+{
+			yyerror("strength directive is obsoleted.");
+		;
+    break;}
+case 262:
+#line 1493 "./cfparse.y"
+{
+			cur_rmconf->prhead->spspec->lifetime = yyvsp[-1].num * yyvsp[0].num;
+		;
+    break;}
+case 264:
+#line 1498 "./cfparse.y"
+{
+#if 1
+			yyerror("byte lifetime support is deprecated");
+			return -1;
+#else
+			cur_rmconf->prhead->spspec->lifebyte = fix_lifebyte(yyvsp[-1].num * yyvsp[0].num);
+			if (cur_rmconf->prhead->spspec->lifebyte == 0)
+				return -1;
+#endif
+		;
+    break;}
+case 266:
+#line 1510 "./cfparse.y"
+{
+			cur_rmconf->prhead->spspec->algclass[algclass_isakmp_dh] = yyvsp[0].num;
+		;
+    break;}
+case 268:
+#line 1515 "./cfparse.y"
+{
+			if (cur_rmconf->prhead->spspec->vendorid != VENDORID_GSSAPI) {
+				yyerror("wrong Vendor ID for gssapi_id");
+				return -1;
+			}
+			cur_rmconf->prhead->spspec->gssid = strdup(yyvsp[0].val->v);
+		;
+    break;}
+case 270:
+#line 1524 "./cfparse.y"
+{
+			int doi;
+			int defklen;
+
+			doi = algtype2doi(yyvsp[-2].num, yyvsp[-1].num);
+			if (doi == -1) {
+				yyerror("algorithm mismatched 1");
+				return -1;
+			}
+
+			switch (yyvsp[-2].num) {
+			case algclass_isakmp_enc:
+			/* reject suppressed algorithms */
+#ifndef HAVE_OPENSSL_RC5_H
+				if (yyvsp[-1].num == algtype_rc5) {
+					yyerror("algorithm %s not supported",
+					    s_attr_isakmp_enc(doi));
+					return -1;
+				}
+#endif
+#ifndef HAVE_OPENSSL_IDEA_H
+				if (yyvsp[-1].num == algtype_idea) {
+					yyerror("algorithm %s not supported",
+					    s_attr_isakmp_enc(doi));
+					return -1;
+				}
+#endif
+
+				cur_rmconf->prhead->spspec->algclass[algclass_isakmp_enc] = doi;
+				defklen = default_keylen(yyvsp[-2].num, yyvsp[-1].num);
+				if (defklen == 0) {
+					if (yyvsp[0].num) {
+						yyerror("keylen not allowed");
+						return -1;
+					}
+				} else {
+					if (yyvsp[0].num && check_keylen(yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num) < 0) {
+						yyerror("invalid keylen %d", yyvsp[0].num);
+						return -1;
+					}
+				}
+				if (yyvsp[0].num)
+					cur_rmconf->prhead->spspec->encklen = yyvsp[0].num;
+				else
+					cur_rmconf->prhead->spspec->encklen = defklen;
+				break;
+			case algclass_isakmp_hash:
+				cur_rmconf->prhead->spspec->algclass[algclass_isakmp_hash] = doi;
+				break;
+			case algclass_isakmp_ameth:
+				cur_rmconf->prhead->spspec->algclass[algclass_isakmp_ameth] = doi;
+				/*
+				 * We may have to set the Vendor ID for the
+				 * authentication method we're using.
+				 */
+				switch (yyvsp[-1].num) {
+				case algtype_gssapikrb:
+					if (cur_rmconf->prhead->spspec->vendorid !=
+					    VENDORID_UNKNOWN) {
+						yyerror("Vendor ID mismatch "
+						    "for auth method");
+						return -1;
+					}
+					/*
+					 * For interoperability with Win2k,
+					 * we set the Vendor ID to "GSSAPI".
+					 */
+					cur_rmconf->prhead->spspec->vendorid =
+					    VENDORID_GSSAPI;
+					break;
+				case algtype_rsasig:
+					if (cur_rmconf->certtype == ISAKMP_CERT_PLAINRSA) {
+						if (rsa_list_count(cur_rmconf->rsa_private) == 0) {
+							yyerror ("Private PlainRSA key not set. "
+								"Use directive 'certificate_type plainrsa ...'\n");
+							return -1;
+						}
+						if (rsa_list_count(cur_rmconf->rsa_public) == 0) {
+							yyerror ("Public PlainRSA keys not set. "
+								"Use directive 'peers_certfile plainrsa ...'\n");
+							return -1;
+						}
+					}
+					break;
+				default:
+					break;
+				}
+				break;
+			default:
+				yyerror("algorithm mismatched 2");
+				return -1;
+			}
+		;
+    break;}
+case 272:
+#line 1621 "./cfparse.y"
+{ yyval.num = 1; ;
+    break;}
+case 273:
+#line 1622 "./cfparse.y"
+{ yyval.num = 60; ;
+    break;}
+case 274:
+#line 1623 "./cfparse.y"
+{ yyval.num = (60 * 60); ;
+    break;}
+case 275:
+#line 1626 "./cfparse.y"
+{ yyval.num = 1; ;
+    break;}
+case 276:
+#line 1627 "./cfparse.y"
+{ yyval.num = 1024; ;
+    break;}
+case 277:
+#line 1628 "./cfparse.y"
+{ yyval.num = (1024 * 1024); ;
+    break;}
+case 278:
+#line 1629 "./cfparse.y"
+{ yyval.num = (1024 * 1024 * 1024); ;
+    break;}
+}
+   /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/lib/bison.simple"
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+  yylsp++;
+  if (yylen == 0)
+    {
+      yylsp->first_line = yylloc.first_line;
+      yylsp->first_column = yylloc.first_column;
+      yylsp->last_line = (yylsp-1)->last_line;
+      yylsp->last_column = (yylsp-1)->last_column;
+      yylsp->text = 0;
+    }
+  else
+    {
+      yylsp->last_line = (yylsp+yylen-1)->last_line;
+      yylsp->last_column = (yylsp+yylen-1)->last_column;
+    }
+#endif
+
+  /* Now "shift" the result of the reduction.
+     Determine what state that goes to,
+     based on the state we popped back to
+     and the rule number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+yyerrlab:   /* here on detecting error */
+
+  if (! yyerrstatus)
+    /* If not already recovering from an error, report this error.  */
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  int size = 0;
+	  char *msg;
+	  int x, count;
+
+	  count = 0;
+	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
+	  for (x = (yyn < 0 ? -yyn : 0);
+	       x < (sizeof(yytname) / sizeof(char *)); x++)
+	    if (yycheck[x + yyn] == x)
+	      size += strlen(yytname[x]) + 15, count++;
+	  msg = (char *) malloc(size + 15);
+	  if (msg != 0)
+	    {
+	      strcpy(msg, "parse error");
+
+	      if (count < 5)
+		{
+		  count = 0;
+		  for (x = (yyn < 0 ? -yyn : 0);
+		       x < (sizeof(yytname) / sizeof(char *)); x++)
+		    if (yycheck[x + yyn] == x)
+		      {
+			strcat(msg, count == 0 ? ", expecting `" : " or `");
+			strcat(msg, yytname[x]);
+			strcat(msg, "'");
+			count++;
+		      }
+		}
+	      yyerror(msg);
+	      free(msg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exceeded");
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror("parse error");
+    }
+
+  goto yyerrlab1;
+yyerrlab1:   /* here on error raised explicitly by an action */
+
+  if (yyerrstatus == 3)
+    {
+      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token
+     after shifting the error token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+yyerrdefault:  /* current state does not do anything special for the error token. */
+
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
+  if (yyn) goto yydefault;
+#endif
+
+yyerrpop:   /* pop the current state because it cannot handle the error token */
+
+  if (yyssp == yyss) YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "Error: state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+yyerrhandle:
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting error token, ");
+#endif
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+ yyacceptlab:
+  /* YYACCEPT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 0;
+
+ yyabortlab:
+  /* YYABORT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 1;
+}
+#line 1631 "./cfparse.y"
+
+
+static struct proposalspec *
+newprspec()
+{
+	struct proposalspec *new;
+
+	new = racoon_calloc(1, sizeof(*new));
+	if (new == NULL)
+		yyerror("failed to allocate proposal");
+
+	return new;
+}
+
+/*
+ * insert into head of list.
+ */
+static void
+insprspec(prspec, head)
+	struct proposalspec *prspec;
+	struct proposalspec **head;
+{
+	if (*head != NULL)
+		(*head)->prev = prspec;
+	prspec->next = *head;
+	*head = prspec;
+}
+
+static struct secprotospec *
+newspspec()
+{
+	struct secprotospec *new;
+
+	new = racoon_calloc(1, sizeof(*new));
+	if (new == NULL) {
+		yyerror("failed to allocate spproto");
+		return NULL;
+	}
+
+	new->encklen = 0;	/*XXX*/
+
+	/*
+	 * Default to "uknown" vendor -- we will override this
+	 * as necessary.  When we send a Vendor ID payload, an
+	 * "unknown" will be translated to a KAME/racoon ID.
+	 */
+	new->vendorid = VENDORID_UNKNOWN;
+
+	return new;
+}
+
+/*
+ * insert into head of list.
+ */
+static void
+insspspec(spspec, head)
+	struct secprotospec *spspec;
+	struct proposalspec **head;
+{
+	spspec->back = *head;
+
+	if ((*head)->spspec != NULL)
+		(*head)->spspec->prev = spspec;
+	spspec->next = (*head)->spspec;
+	(*head)->spspec = spspec;
+}
+
+/* set final acceptable proposal */
+static int
+set_isakmp_proposal(rmconf, prspec)
+	struct remoteconf *rmconf;
+	struct proposalspec *prspec;
+{
+	struct proposalspec *p;
+	struct secprotospec *s;
+	int prop_no = 1; 
+	int trns_no = 1;
+	int32_t types[MAXALGCLASS];
+
+	p = prspec;
+	if (p->next != 0) {
+		plog(LLV_ERROR, LOCATION, NULL,
+			"multiple proposal definition.\n");
+		return -1;
+	}
+
+	/* mandatory check */
+	if (p->spspec == NULL) {
+		yyerror("no remote specification found: %s.\n",
+			saddr2str(rmconf->remote));
+		return -1;
+	}
+	for (s = p->spspec; s != NULL; s = s->next) {
+		/* XXX need more to check */
+		if (s->algclass[algclass_isakmp_enc] == 0) {
+			yyerror("encryption algorithm required.");
+			return -1;
+		}
+		if (s->algclass[algclass_isakmp_hash] == 0) {
+			yyerror("hash algorithm required.");
+			return -1;
+		}
+		if (s->algclass[algclass_isakmp_dh] == 0) {
+			yyerror("DH group required.");
+			return -1;
+		}
+		if (s->algclass[algclass_isakmp_ameth] == 0) {
+			yyerror("authentication method required.");
+			return -1;
+		}
+	}
+
+	/* skip to last part */
+	for (s = p->spspec; s->next != NULL; s = s->next)
+		;
+
+	while (s != NULL) {
+		plog(LLV_DEBUG2, LOCATION, NULL,
+			"lifetime = %ld\n", (long)
+			(s->lifetime ? s->lifetime : p->lifetime));
+		plog(LLV_DEBUG2, LOCATION, NULL,
+			"lifebyte = %d\n",
+			s->lifebyte ? s->lifebyte : p->lifebyte);
+		plog(LLV_DEBUG2, LOCATION, NULL,
+			"encklen=%d\n", s->encklen);
+
+		memset(types, 0, ARRAYLEN(types));
+		types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
+		types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
+		types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
+		types[algclass_isakmp_ameth] =
+		    s->algclass[algclass_isakmp_ameth];
+
+		/* expanding spspec */
+		clean_tmpalgtype();
+		trns_no = expand_isakmpspec(prop_no, trns_no, types,
+				algclass_isakmp_enc, algclass_isakmp_ameth + 1,
+				s->lifetime ? s->lifetime : p->lifetime,
+				s->lifebyte ? s->lifebyte : p->lifebyte,
+				s->encklen, s->vendorid, s->gssid,
+				rmconf);
+		if (trns_no == -1) {
+			plog(LLV_ERROR, LOCATION, NULL,
+				"failed to expand isakmp proposal.\n");
+			return -1;
+		}
+
+		s = s->prev;
+	}
+
+	if (rmconf->proposal == NULL) {
+		plog(LLV_ERROR, LOCATION, NULL,
+			"no proposal found.\n");
+		return -1;
+	}
+
+	return 0;
+}
+
+static void
+clean_tmpalgtype()
+{
+	int i;
+	for (i = 0; i < MAXALGCLASS; i++)
+		tmpalgtype[i] = 0;	/* means algorithm undefined. */
+}
+
+static int
+expand_isakmpspec(prop_no, trns_no, types,
+		class, last, lifetime, lifebyte, encklen, vendorid, gssid,
+		rmconf)
+	int prop_no, trns_no;
+	int *types, class, last;
+	time_t lifetime;
+	int lifebyte;
+	int encklen;
+	int vendorid;
+	char *gssid;
+	struct remoteconf *rmconf;
+{
+	struct isakmpsa *new;
+
+	/* debugging */
+    {
+	int j;
+	char tb[10];
+	plog(LLV_DEBUG2, LOCATION, NULL,
+		"p:%d t:%d\n", prop_no, trns_no);
+	for (j = class; j < MAXALGCLASS; j++) {
+		snprintf(tb, sizeof(tb), "%d", types[j]);
+		plog(LLV_DEBUG2, LOCATION, NULL,
+			"%s%s%s%s\n",
+			s_algtype(j, types[j]),
+			types[j] ? "(" : "",
+			tb[0] == '0' ? "" : tb,
+			types[j] ? ")" : "");
+	}
+	plog(LLV_DEBUG2, LOCATION, NULL, "\n");
+    }
+
+#define TMPALGTYPE2STR(n) \
+	s_algtype(algclass_isakmp_##n, types[algclass_isakmp_##n])
+		/* check mandatory values */
+		if (types[algclass_isakmp_enc] == 0
+		 || types[algclass_isakmp_ameth] == 0
+		 || types[algclass_isakmp_hash] == 0
+		 || types[algclass_isakmp_dh] == 0) {
+			yyerror("few definition of algorithm "
+				"enc=%s ameth=%s hash=%s dhgroup=%s.\n",
+				TMPALGTYPE2STR(enc),
+				TMPALGTYPE2STR(ameth),
+				TMPALGTYPE2STR(hash),
+				TMPALGTYPE2STR(dh));
+			return -1;
+		}
+#undef TMPALGTYPE2STR
+
+	/* set new sa */
+	new = newisakmpsa();
+	if (new == NULL) {
+		yyerror("failed to allocate isakmp sa");
+		return -1;
+	}
+	new->prop_no = prop_no;
+	new->trns_no = trns_no++;
+	new->lifetime = lifetime;
+	new->lifebyte = lifebyte;
+	new->enctype = types[algclass_isakmp_enc];
+	new->encklen = encklen;
+	new->authmethod = types[algclass_isakmp_ameth];
+	new->hashtype = types[algclass_isakmp_hash];
+	new->dh_group = types[algclass_isakmp_dh];
+	new->vendorid = vendorid;
+#ifdef HAVE_GSSAPI
+	if (new->authmethod == OAKLEY_ATTR_AUTH_METHOD_GSSAPI_KRB) {
+		if (gssid != NULL) {
+			new->gssid = vmalloc(strlen(gssid));
+			memcpy(new->gssid->v, gssid, new->gssid->l);
+			racoon_free(gssid);
+		} else {
+			/*
+			 * Allocate the default ID so that it gets put
+			 * into a GSS ID attribute during the Phase 1
+			 * exchange.
+			 */
+			new->gssid = gssapi_get_default_gss_id();
+		}
+	}
+#endif
+	insisakmpsa(new, rmconf);
+
+	return trns_no;
+}
+
+static int
+listen_addr (struct sockaddr *addr, int udp_encap)
+{
+	struct myaddrs *p;
+
+	p = newmyaddr();
+	if (p == NULL) {
+		yyerror("failed to allocate myaddrs");
+		return -1;
+	}
+	p->addr = addr;
+	if (p->addr == NULL) {
+		yyerror("failed to copy sockaddr ");
+		delmyaddr(p);
+		return -1;
+	}
+	p->udp_encap = udp_encap;
+
+	insmyaddr(p, &lcconf->myaddrs);
+
+	lcconf->autograbaddr = 0;
+	return 0;
+}
+
+#if 0
+/*
+ * fix lifebyte.
+ * Must be more than 1024B because its unit is kilobytes.
+ * That is defined RFC2407.
+ */
+static int
+fix_lifebyte(t)
+	unsigned long t;
+{
+	if (t < 1024) {
+		yyerror("byte size should be more than 1024B.");
+		return 0;
+	}
+
+	return(t / 1024);
+}
+#endif
+
+int
+cfparse()
+{
+	int error;
+
+	yycf_init_buffer();
+
+	if (yycf_switch_buffer(lcconf->racoon_conf) != 0)
+		return -1;
+
+	error = yyparse();
+	if (error != 0) {
+		if (yyerrorcount) {
+			plog(LLV_ERROR, LOCATION, NULL,
+				"fatal parse failure (%d errors)\n",
+				yyerrorcount);
+		} else {
+			plog(LLV_ERROR, LOCATION, NULL,
+				"fatal parse failure.\n");
+		}
+		return -1;
+	}
+
+	if (error == 0 && yyerrorcount) {
+		plog(LLV_ERROR, LOCATION, NULL,
+			"parse error is nothing, but yyerrorcount is %d.\n",
+				yyerrorcount);
+		exit(1);
+	}
+
+	yycf_clean_buffer();
+
+	plog(LLV_DEBUG2, LOCATION, NULL, "parse successed.\n");
+
+	return 0;
+}
+
+int
+cfreparse()
+{
+	flushph2();
+	flushph1();
+	flushrmconf();
+	flushsainfo();
+	clean_tmpalgtype();
+	yycf_init_buffer();
+
+	if (yycf_switch_buffer(lcconf->racoon_conf) != 0)
+		return -1;
+
+	return(cfparse());
+}
+
+#ifdef ENABLE_ADMINPORT
+static void
+adminsock_conf(path, owner, group, mode_dec)
+	vchar_t *path;
+	vchar_t *owner;
+	vchar_t *group;
+	int mode_dec;
+{
+	struct passwd *pw = NULL;
+	struct group *gr = NULL;
+	mode_t mode = 0;
+	uid_t uid;
+	gid_t gid;
+	int isnum;
+
+	adminsock_path = path->v;
+
+	if (owner == NULL)
+		return;
+
+	errno = 0;
+	uid = atoi(owner->v);
+	isnum = !errno;
+	if (((pw = getpwnam(owner->v)) == NULL) && !isnum)
+		yyerror("User \"%s\" does not exist", owner->v);
+
+	if (pw)
+		adminsock_owner = pw->pw_uid;
+	else
+		adminsock_owner = uid;
+
+	if (group == NULL)
+		return;
+
+	errno = 0;
+	gid = atoi(group->v);
+	isnum = !errno;
+	if (((gr = getgrnam(group->v)) == NULL) && !isnum)
+		yyerror("Group \"%s\" does not exist", group->v);
+
+	if (gr)
+		adminsock_group = gr->gr_gid;
+	else
+		adminsock_group = gid;
+
+	if (mode_dec == -1)
+		return;
+
+	if (mode_dec > 777)
+		yyerror("Mode 0%03o is invalid", mode_dec);
+	if (mode_dec >= 400) { mode += 0400; mode_dec -= 400; }
+	if (mode_dec >= 200) { mode += 0200; mode_dec -= 200; }
+	if (mode_dec >= 100) { mode += 0200; mode_dec -= 100; }
+
+	if (mode_dec > 77)
+		yyerror("Mode 0%03o is invalid", mode_dec);
+	if (mode_dec >= 40) { mode += 040; mode_dec -= 40; }
+	if (mode_dec >= 20) { mode += 020; mode_dec -= 20; }
+	if (mode_dec >= 10) { mode += 020; mode_dec -= 10; }
+
+	if (mode_dec > 7)
+		yyerror("Mode 0%03o is invalid", mode_dec);
+	if (mode_dec >= 4) { mode += 04; mode_dec -= 4; }
+	if (mode_dec >= 2) { mode += 02; mode_dec -= 2; }
+	if (mode_dec >= 1) { mode += 02; mode_dec -= 1; }
+	
+	adminsock_mode = mode;
+
+	return;
+}
+#endif
--- a/crypto/dist/ipsec-tools/src/racoon/cfparse.y	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cfparse.y	Mon Nov 21 21:12:29 2005 +0000
@@ -1,6 +1,6 @@
-/*	$NetBSD: cfparse.y,v 1.1.1.4.2.3 2005/10/21 17:08:17 riz Exp $	*/
+/*	$NetBSD: cfparse.y,v 1.1.1.4.2.4 2005/11/21 21:12:30 tron Exp $	*/
 
-/* Id: cfparse.y,v 1.37.2.4 2005/05/10 09:45:45 manubsd Exp */
+/* Id: cfparse.y,v 1.37.2.6 2005/10/17 16:23:50 monas Exp */
 
 %{
 /*
@@ -823,7 +823,9 @@
 					return -1;
 				}
 				$$ = ipsecdoi_sockaddr2id(saddr,
-					$3 == ~0 ? (sizeof(struct in_addr) << 3): $3,
+					$3 == (sizeof(struct in_addr) << 3) &&
+						$1 == IDTYPE_ADDRESS
+					  ? ~0 : $3,
 					$5);
 				break;
 #ifdef INET6
@@ -834,7 +836,9 @@
 					return -1;
 				}
 				$$ = ipsecdoi_sockaddr2id(saddr,
-					$3 == ~0 ? (sizeof(struct in6_addr) << 3) : $3,
+					$3 == (sizeof(struct in6_addr) << 3) &&
+						$1 == IDTYPE_ADDRESS
+					  ? ~0 : $3,
 					$5);
 				break;
 #endif
--- a/crypto/dist/ipsec-tools/src/racoon/cfparse_proto.h	Mon Nov 21 20:56:38 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cfparse_proto.h	Mon Nov 21 21:12:29 2005 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfparse_proto.h,v 1.1.1.2.2.1 2005/09/03 07:03:49 snj Exp $	*/
+/*	$NetBSD: cfparse_proto.h,v 1.1.1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
 
 /* Id: cfparse_proto.h,v 1.3 2004/06/11 16:00:15 ludvigm Exp */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cftoken.c	Mon Nov 21 21:12:29 2005 +0000
@@ -0,0 +1,4158 @@
+/*	$NetBSD: cftoken.c,v 1.2.2.2 2005/11/21 21:12:30 tron Exp $	*/
+
+#line 2 "cftoken.c"
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yytext_ptr -= yy_more_len; \
+	yyleng = (int) (yy_cp - yytext_ptr); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 260
+#define YY_END_OF_BUFFER 261
+static yyconst short int yy_accept[1533] =
+    {   0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  261,  259,
+      255,  256,  259,  257,  259,  251,  251,  251,  254,  258,
+      242,  259,  259,  259,  259,  254,  254,  254,  254,  254,
+      254,  259,  259,  259,  259,  259,  259,  259,  259,  259,
+      259,  259,  259,  259,  259,  259,  254,  259,  259,  259,
+      259,  259,  259,  259,  259,  254,  259,  259,    2,    6,
+       14,  254,  254,  259,  259,  259,   17,   26,  254,  259,
+
+      259,  254,  259,  259,  259,   28,   34,  254,  254,  259,
+      259,   36,   43,  254,  259,  259,  259,   65,   72,  254,
+      254,  254,  254,  259,  259,  259,  259,  259,  259,   45,
+       63,   79,  259,  254,  254,   78,   90,  254,  254,  254,
+      254,  259,  259,  259,  259,  259,   80,  254,  259,   94,
+       97,  254,  254,  254,  254,  254,  254,  259,  259,  259,
+      259,  259,  259,  259,  259,  259,  259,  259,  259,   95,
+      254,  254,  254,  254,  259,  259,  259,  259,  150,  151,
+      164,  259,  259,  255,    0,  253,  257,  167,  254,  254,
+      251,    0,  254,    0,  243,  244,  245,    0,  254,  254,
+
+      170,    0,    0,    0,  254,  254,  254,    0,  254,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  250,    0,    0,  165,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  254,  254,
+        0,    0,    0,    0,  254,    0,  250,    0,    0,    0,
+        0,  254,    0,    0,    0,    0,    0,    0,    0,    0,
+      254,    0,  254,    0,    0,    0,    0,  250,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+      254,    0,  254,  254,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,  250,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  167,
+      254,  252,  254,    0,  168,  254,  188,    0,    0,    0,
+        0,    0,  254,  177,    0,  254,  169,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,  213,  202,  247,
+        0,    0,    0,  166,  211,    0,  185,  179,    0,    0,
+
+      246,    0,    0,  174,    0,    0,  175,    0,    0,  249,
+        0,    0,    0,    0,    0,   19,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,  254,    0,    0,    0,
+        0,    0,  254,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  254,    0,
+        0,    0,    0,    0,    0,    0,   57,    0,    0,    0,
+        0,    0,    0,    0,    0,   76,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,  101,  139,  169,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  246,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,  167,  178,    0,    0,    0,    0,  242,    0,    0,
+        0,    0,    0,    0,  236,    0,    0,  248,    0,  172,
+      180,    0,    0,  201,  247,    0,    0,    0,  187,    0,
+        0,    0,    0,    0,    0,  246,  203,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    7,    0,    0,    0,    0,    0,    0,    3,
+        0,    0,    0,    0,    0,    0,    0,   20,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   48,    0,    0,    0,
+       55,    0,    0,    0,    0,    0,    0,    0,    0,   77,
+        0,   86,    0,    0,    0,    0,    0,    0,   85,    0,
+        0,    0,   98,  138,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   99,    0,    0,    0,    0,  130,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  137,
+        0,  114,    0,    0,  154,    0,    0,    0,    0,    0,
+        0,  153,    0,    0,  183,    0,    0,    0,  242,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,  248,    0,
+      173,    0,  237,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  204,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   64,    0,
+        4,    0,    0,    0,    0,    0,    0,   22,    0,    0,
+        0,    0,    0,   39,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   54,    0,    0,    0,
+        0,    0,    0,    0,   49,   75,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  133,
+
+        0,    0,    0,    0,    0,    0,  132,    0,  128,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  240,    0,    0,    0,    0,    0,
+        0,  226,    0,    0,    0,    0,    0,    0,  171,  247,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  227,  228,  225,  246,  206,    0,    0,    0,
+      208,  210,  239,    0,    0,    0,    0,    0,    0,    0,
+       35,    0,    0,    0,   91,   73,    5,    0,    0,    0,
+
+        0,    0,   11,   23,   24,   25,   21,    0,    0,    0,
+        0,    0,    0,   37,    0,    0,    0,    0,    0,   69,
+       70,    0,    0,    0,   59,    0,    0,    0,    0,    0,
+       56,    0,   53,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,  117,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+      145,    0,    0,    0,  131,    0,    0,    0,    0,    0,
+        0,  159,    0,    0,    0,  162,    0,  238,    0,  181,
+        0,  212,    0,    0,  200,  217,  218,    0,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,  214,    0,    0,
+        0,    0,    0,    0,    0,    0,  190,    0,    0,    0,
+        0,    0,   15,    0,   27,    1,    0,    0,    8,   13,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,   66,
+        0,    0,   68,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   93,    0,  113,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  135,    0,    0,    0,    0,    0,
+      105,    0,  120,    0,    0,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,  182,  241,  184,  176,    0,  192,
+        0,    0,    0,  215,  216,  219,  220,  221,  222,  223,
+      191,  186,    0,  189,  205,  207,  209,    0,    0,    0,
+        0,    0,   44,   12,    0,    0,    0,    0,    0,    0,
+        0,   41,    0,    0,   67,    0,    0,    0,    0,    0,
+       47,   46,    0,    0,    0,    0,    0,    0,    0,    0,
+       84,    0,    0,    0,    0,    0,  121,    0,    0,    0,
+      144,    0,    0,    0,    0,  143,    0,    0,    0,    0,
+      136,  148,    0,    0,    0,    0,    0,    0,    0,    0,
+      149,    0,    0,    0,    0,    0,    0,    0,  158,    0,
+
+        0,    0,  152,  163,    0,  193,    0,    0,    0,    0,
+        0,    0,  235,  234,    0,    0,    0,    0,    0,    0,
+        0,   29,    0,   40,    0,    0,    0,    0,    0,    0,
+        0,   61,   58,    0,   74,    0,    0,    0,    0,    0,
+       81,   92,    0,    0,  140,    0,  141,    0,    0,    0,
+        0,    0,  106,  102,  134,    0,    0,    0,    0,    0,
+        0,  146,  115,    0,  119,  103,    0,    0,    0,    0,
+        0,    0,    0,  160,    0,  229,    0,    0,    0,    0,
+        0,    0,    0,    0,  161,   16,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,   52,    0,    0,    0,    0,
+
+        0,    0,    0,   82,    0,  100,    0,    0,    0,    0,
+      107,    0,    0,    0,    0,  122,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  195,    0,
+        0,    0,  197,  199,    0,    0,    0,    0,   10,    0,
+        0,    0,    0,    0,   38,    0,    0,   50,    0,   51,
+       62,    0,    0,    0,    0,    0,  142,    0,    0,    0,
+        0,    0,    0,    0,    0,  147,    0,    0,    0,  118,
+        0,  109,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   32,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,    0,    0,  124,    0,    0,    0,
+        0,    0,  194,  196,  198,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,   60,    0,    0,
+        0,   83,    0,   96,    0,  104,    0,  108,  127,    0,
+        0,    0,  125,    0,    0,    0,    0,    0,    0,    0,
+        0,  224,   18,    9,   33,   31,    0,   42,   71,    0,
+        0,    0,    0,    0,    0,  116,    0,  129,    0,    0,
+        0,  157,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,  123,  126,    0,    0,    0,    0,    0,    0,    0,
+        0,   30,    0,    0,    0,  112,  110,    0,    0,    0,
+
+      233,  231,  232,  230,    0,    0,    0,  111,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   87,    0,  155,    0,   89,  156,    0,    0,
+       88,    0
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    4,    5,    1,    6,    1,    1,    1,
+        1,    1,    1,    7,    8,    9,   10,   11,   12,   13,
+       14,   15,   16,   17,   18,   19,   20,   21,   22,    1,
+        1,    1,    1,    1,   23,   24,   23,   23,   23,   23,
+       25,   25,   25,   25,   26,   25,   27,   25,   25,   25,
+       25,   25,   25,   28,   25,   25,   25,   25,   25,   25,
+       29,    1,   30,    1,   31,    1,   32,   33,   34,   35,
+
+       36,   37,   38,   39,   40,   41,   42,   43,   44,   45,
+       46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
+       56,   57,   58,    1,   59,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst int yy_meta[60] =
+    {   0,
+        1,    1,    2,    1,    1,    3,    1,    1,    3,    1,
+        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+        3,    1,    5,    5,    6,    6,    6,    6,    1,    1,
+        1,    5,    5,    5,    5,    5,    5,    6,    6,    6,
+        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
+        6,    6,    6,    6,    6,    6,    6,    1,    1
+    } ;
+
+static yyconst short int yy_base[1542] =
+    {   0,
+        0,    0,   26,   44,   27,   58,   68,   87, 1820, 1819,
+       84,   90,   92,   95,  108,  120,  128,  137,  165,    0,
+        0,    0,    0,    0,  127,  172,  224,  277,   31,   40,
+      330,    0,  358,  386,    0,    0,   61,  150, 1840, 1843,
+     1837, 1843, 1834,    0,    0,  440, 1782,  134, 1830, 1843,
+     1829, 1810, 1809, 1808,    0,  182,  120,   75,   97,  177,
+      117, 1781,  182,  156,  110, 1773,  194,   16,  168, 1780,
+      199,  207,  182,   64, 1792, 1791,  219, 1776,  207,  204,
+      234,   73,  236,  246,  239,  256,  131,  157, 1843, 1843,
+     1843,  271,  283,  271,  241,  260, 1843, 1843,  294,  288,
+
+       86,  291,  294,  213,  303, 1843, 1843, 1790,  342,  352,
+      359, 1843, 1843,  325,  393,  255,  311, 1843, 1843,  214,
+      435,  433,  397,  245,  307,  434,  373,  449, 1784, 1843,
+     1843, 1843, 1791, 1777,  382, 1843, 1843, 1769,  302,  462,
+      398,  452,  292,  380,  363,  450, 1843, 1775,  462, 1843,
+     1843, 1781,  483,  486,  496,  494,  464,  302,  489,  446,
+      463,  481,  501,  515,  519,  525,  516, 1782,  418, 1843,
+     1765,  532,  548,  551, 1766,  534,  529,  539, 1843, 1843,
+     1843,  540,  554, 1813, 1810, 1843,    0,    0,    0, 1807,
+     1757,    0,   61, 1776, 1843, 1843, 1843, 1780,  200,  456,
+
+     1843, 1764, 1762, 1756,  513,  534,  565, 1756,  568, 1758,
+     1769, 1753, 1770, 1749, 1767, 1755, 1762, 1763, 1740, 1760,
+     1744, 1777, 1747, 1756, 1745, 1746, 1751, 1843, 1747, 1750,
+      576, 1744, 1752, 1749, 1750, 1748, 1733, 1741, 1732, 1730,
+     1740, 1730, 1724, 1729, 1722, 1735, 1736, 1719, 1730, 1732,
+      479,  559, 1722, 1725,  370, 1715, 1717, 1726,  345,  576,
+     1727, 1725, 1723, 1709,  594, 1720,  466, 1722, 1700, 1709,
+     1704,  588, 1702, 1719, 1701, 1697, 1697, 1696, 1697, 1713,
+      350, 1693,  597, 1698, 1692, 1707, 1689, 1694, 1694, 1687,
+     1690, 1700, 1681, 1683, 1687, 1686,  560, 1684, 1678, 1677,
+
+     1683, 1692, 1689, 1687, 1692, 1672,  569, 1675, 1681, 1681,
+      602, 1667,  603,  605, 1685, 1685, 1665, 1674, 1678, 1665,
+      578, 1662, 1665, 1673, 1672,  577,  580,  489, 1670, 1666,
+     1670, 1673, 1652, 1657, 1665, 1650, 1663, 1666, 1665,  583,
+     1647,  588, 1644, 1645,  588,  580,  591, 1682, 1640, 1640,
+     1639, 1658, 1654, 1637, 1636, 1648,  582, 1633, 1646,    0,
+        0,    0,  631, 1646, 1843,  633, 1843, 1669, 1626, 1643,
+     1627, 1626,  363, 1645, 1625,  632, 1843, 1629, 1641, 1638,
+     1622, 1621, 1622, 1636, 1621, 1626, 1623, 1843, 1843,  591,
+     1617, 1632, 1619, 1843, 1843, 1630, 1843, 1843, 1615,  609,
+
+      600,  635, 1614, 1843, 1622, 1620, 1843, 1607, 1620, 1843,
+     1607,  624,  625, 1610, 1601, 1843,  624, 1616, 1611, 1596,
+     1602, 1602, 1610, 1599, 1592, 1594,  655, 1591, 1598, 1603,
+     1608, 1598,  656, 1591, 1596, 1592, 1594, 1598, 1592, 1591,
+     1598, 1587, 1588, 1582, 1590, 1574, 1574, 1573,  657, 1583,
+     1576, 1583, 1604, 1586,  620,  636, 1843, 1586, 1573, 1575,
+     1578, 1562, 1562, 1555, 1565, 1843, 1565, 1569, 1571, 1559,
+     1556,  633, 1568, 1563, 1571, 1565, 1555, 1563, 1549, 1561,
+     1560, 1544, 1543, 1553, 1554, 1541, 1843, 1559, 1558, 1554,
+     1548, 1552, 1549,  634, 1553, 1532, 1546, 1545, 1533, 1543,
+
+     1533,  633, 1537, 1545,  642, 1519, 1524, 1524, 1522, 1531,
+     1523, 1529,  637, 1533, 1515, 1526, 1518, 1528, 1523, 1542,
+     1510, 1521, 1523, 1520, 1508,  653, 1517, 1519, 1518, 1513,
+     1544, 1843, 1843, 1519, 1514, 1514, 1511, 1497, 1534, 1500,
+     1512,  648, 1503, 1530, 1843, 1494, 1509, 1489, 1498, 1520,
+     1843, 1492, 1500, 1843, 1843, 1483,  681, 1501, 1501, 1481,
+     1495, 1484, 1492, 1487, 1481, 1843, 1843,  659, 1506, 1512,
+     1487, 1473, 1481, 1489, 1473, 1475, 1477, 1465, 1463, 1478,
+     1482, 1472, 1843, 1461, 1459, 1472, 1459, 1461, 1459, 1474,
+     1452,  661, 1451, 1462, 1451, 1453, 1461, 1843, 1461, 1445,
+
+     1452, 1449, 1460, 1448, 1459, 1447, 1456, 1438, 1439, 1456,
+     1450, 1449, 1432, 1452, 1446, 1450, 1843, 1437, 1447, 1432,
+     1843, 1439, 1445, 1423, 1443, 1437, 1457, 1441, 1414, 1843,
+     1433, 1418, 1418, 1410, 1414, 1413, 1428, 1424, 1843, 1405,
+     1411, 1423, 1843, 1408, 1401,  662, 1412, 1406, 1418,  669,
+     1416, 1401, 1419, 1414, 1400, 1397, 1410, 1406, 1407, 1410,
+     1411, 1391, 1843, 1410, 1405, 1388, 1402, 1843, 1397, 1386,
+     1399, 1389, 1387, 1385, 1395, 1399, 1397, 1394, 1381, 1843,
+     1389, 1843, 1386, 1388, 1373, 1373, 1365, 1380, 1372, 1387,
+     1366, 1843, 1371, 1403, 1843, 1364, 1368, 1372, 1843, 1398,
+
+     1378, 1358, 1355, 1375, 1368,  693, 1365,  661, 1843, 1369,
+     1843, 1356, 1843, 1366,  699, 1390, 1389, 1388, 1386, 1380,
+     1384, 1343, 1358, 1354, 1360, 1357, 1337, 1351, 1353, 1370,
+      703, 1371, 1372, 1333, 1843, 1333, 1345, 1332, 1344, 1344,
+     1338, 1342, 1331, 1341, 1329, 1337, 1336, 1325, 1843, 1319,
+     1843, 1322, 1331, 1332, 1323, 1326, 1313,  707, 1307, 1312,
+     1309, 1316, 1308, 1308, 1314, 1309, 1304, 1318, 1300, 1310,
+     1306,  711, 1305,  675, 1300, 1298, 1843, 1297, 1297, 1296,
+     1294,   24,   53,  117, 1843, 1843,  193,  259,  399,  621,
+      649,  651,  678,  678,  684,  689,  680,  684,  695, 1843,
+
+      687,  700,  699,  704,  701,  689, 1843,  694, 1843,  708,
+      701,  693,  711,  695,  714,  703,  707,  714,  713,  701,
+      720,  699,  722,  742,  724,  706,  706,  724,  725,  709,
+      710,  713,  707,  733,  720,  720,  720,  733,  729,  738,
+      731,  760,  756,  724, 1843,  725,  757,  733,  742,  765,
+      746, 1843,  765,  767,  753,  750,  747,  756, 1843,  738,
+      776,  776,  776,  774,  773,  779,  776,  776,  746,  753,
+      767,  764, 1843, 1843, 1843,  751, 1843,  786,  784,  792,
+     1843, 1843, 1843,  766,  758,  776,  753,  778,  773,  775,
+     1843,  775,  775,  767, 1843, 1843, 1843,  765,  776,  781,
+
+      782,  787, 1843, 1843, 1843, 1843, 1843,  780,  777,  782,
+      792,  778,  789,  795,  796,  779,  797,  794,  796, 1843,
+     1843,  781,  787,  795, 1843,  789,  794,  795,  792,  799,
+     1843,  808, 1843,  795,  791,  793,  793,  808,  802,  802,
+      802,  803,  799,  801,  816,  813,  802, 1843,  812,  801,
+      806,  826,  821,  809,  824,  830,  820,  824,  830,  826,
+      823,  831,  824,  838,  821,  836,  839,  843,  827,  845,
+     1843,  822,  844,  841, 1843,  831,  852,  841,  834,  834,
+      836, 1843,  857,  846,  846, 1843,  848, 1843,  853, 1843,
+      858, 1843,  882,  881, 1843, 1843, 1843,  855,  882,  867,
+
+      865,  886,  885,  884,  891,  888,  891, 1843,  894,  869,
+      875,  861,  868,  895,  898,  902, 1843,  881,  877,  887,
+      883,  880, 1843,  883, 1843, 1843,  890,  889, 1843, 1843,
+      875,  872,  895,  870,  894,  895,  895,  886,  900, 1843,
+      890,  898, 1843,  895,  884,  888,  886,  924,  925,  889,
+      885,  893,  892,  905,  896,  907,  908,  913,  899,  899,
+      900, 1843,  913, 1843,  920,  908,  924,  920,  909,  921,
+      924,  925,  922,  907,  926,  934,  915,  921,  915,  933,
+      932,  920,  919,  933, 1843,  938,  940,  941,  927,  935,
+     1843,  930, 1843,  934,  950,  948,  937,  944,  938,  946,
+
+      947,  952,  955,  956, 1843, 1843, 1843, 1843,  945, 1843,
+      983,  948,  950, 1843, 1843, 1843, 1843, 1843, 1843, 1843,
+     1843, 1843,  965, 1843, 1843, 1843, 1843,  957,  968,  971,
+      960,  970, 1843, 1843,  975,  972,  973,  967,  975,  973,
+      971, 1843,  982,  980, 1843,  969,  972,  969,  973,  971,
+     1843, 1843,  974,  986,  973,  974,  991,  986,  981,  992,
+     1843,  989,  983,  981,  979, 1001, 1843,  978, 1003,  980,
+     1843, 1006, 1007, 1003, 1009, 1843, 1007,  986, 1003, 1008,
+     1843, 1843, 1005, 1010,  990,  999, 1013, 1004, 1004, 1020,
+     1022, 1003, 1010, 1012, 1021, 1023, 1022, 1027, 1843, 1016,
+
+     1028, 1018, 1843, 1843, 1032, 1843, 1050, 1048, 1056, 1019,
+     1038, 1036, 1843, 1843, 1020, 1039, 1025, 1024, 1041, 1046,
+     1042, 1048, 1044, 1843, 1031, 1048, 1052, 1047, 1052, 1036,
+     1054, 1843, 1843, 1035, 1843, 1058, 1045, 1047, 1044, 1057,
+     1843, 1843, 1059, 1045, 1843, 1057, 1843, 1054, 1052, 1051,
+     1055, 1056, 1843, 1843, 1843, 1066, 1055, 1069, 1055, 1062,
+     1054, 1843, 1843, 1075, 1843, 1843, 1070, 1062, 1063, 1077,
+     1074, 1083, 1071, 1843, 1068, 1843, 1101, 1106, 1106, 1110,
+     1093, 1094, 1095, 1082, 1843, 1843, 1092, 1098, 1079, 1086,
+     1089, 1099, 1083, 1086, 1093, 1843, 1101, 1087, 1103, 1105,
+
+     1090, 1097, 1112, 1843, 1104, 1843, 1109, 1103, 1101, 1102,
+     1843, 1104, 1105, 1111, 1102, 1843, 1116, 1103, 1110, 1117,
+     1110, 1112, 1108, 1115, 1116, 1111, 1132, 1124, 1843, 1149,
+     1147, 1155, 1843, 1843, 1134, 1135, 1128, 1136, 1843, 1130,
+     1141, 1136, 1139, 1134, 1843, 1141, 1138, 1843, 1136, 1843,
+     1843, 1140, 1150, 1150, 1147, 1155, 1843, 1152, 1145, 1146,
+     1139, 1155, 1160, 1153, 1154, 1843, 1159, 1179, 1142, 1843,
+     1147, 1843, 1159, 1168, 1150, 1185, 1188, 1191, 1162, 1170,
+     1164, 1172, 1173, 1167, 1175, 1172, 1162, 1169, 1843, 1165,
+     1163, 1181, 1172, 1187, 1177, 1172, 1171, 1187, 1184, 1169,
+
+     1194, 1178, 1185, 1186, 1193, 1197, 1843, 1176, 1193, 1188,
+     1192, 1197, 1843, 1843, 1843, 1197, 1189, 1199, 1191, 1185,
+     1206, 1187, 1201, 1206, 1208, 1197, 1212, 1843, 1204, 1207,
+     1213, 1843, 1196, 1843, 1219, 1843, 1220, 1843, 1843, 1219,
+     1216, 1215, 1843, 1221, 1214, 1222, 1217, 1226, 1210, 1228,
+     1212, 1843, 1843, 1843, 1843, 1843, 1215, 1843, 1843, 1236,
+     1230, 1223, 1223, 1215, 1221, 1843, 1237, 1843, 1234, 1244,
+     1230, 1843, 1232, 1242, 1234, 1244, 1242, 1250, 1237, 1235,
+     1249, 1843, 1843, 1237, 1251, 1244, 1240, 1239, 1242, 1241,
+     1244, 1843, 1251, 1246, 1256, 1843, 1843, 1248, 1262, 1259,
+
+     1843, 1843, 1843, 1843, 1262, 1261, 1251, 1843, 1252, 1253,
+     1259, 1255, 1268, 1269, 1270, 1261, 1272, 1268, 1267, 1270,
+     1275, 1272, 1843, 1282, 1843, 1267, 1843, 1843, 1280, 1276,
+     1843, 1843, 1320, 1326, 1324, 1330, 1332, 1333, 1334, 1337,
+     1339
+    } ;
+
+static yyconst short int yy_def[1542] =
+    {   0,
+     1532,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,   19,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,   31,    1,    1,    1,    1,    1,    1, 1532, 1532,
+     1532, 1532, 1533, 1534, 1535, 1532,   46,   46, 1536, 1532,
+     1536, 1532, 1532, 1532, 1537, 1536, 1536, 1536, 1536, 1536,
+     1536, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1536, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1536, 1532, 1532, 1532, 1532,
+     1532, 1536, 1536, 1532, 1532, 1532, 1532, 1532, 1536, 1532,
+
+     1532, 1536, 1532, 1532, 1532, 1532, 1532,   56, 1536, 1532,
+     1532, 1532, 1532, 1536, 1532, 1532, 1532, 1532, 1532,   56,
+     1536, 1536, 1536, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1537,   56, 1536, 1532, 1532,   56, 1536, 1536,
+     1536, 1532, 1532, 1532, 1532, 1532, 1532,   56, 1532, 1532,
+     1532,   56, 1536, 1536, 1536, 1536, 1536, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+       56, 1536, 1536, 1536, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1533, 1532, 1534, 1538, 1539, 1536,
+       46, 1540, 1536, 1532, 1532, 1532, 1532, 1537, 1536, 1536,
+
+     1532, 1532, 1532, 1532, 1536, 1536, 1536, 1532, 1536, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1536, 1536,
+     1532, 1532, 1532, 1532, 1536, 1532, 1532, 1532, 1532, 1532,
+     1532, 1536, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1536, 1532, 1536, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1536, 1532, 1536, 1536, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1541,
+     1539, 1540, 1536, 1532, 1532, 1536, 1532, 1532, 1532, 1532,
+     1532, 1532, 1536, 1532, 1532, 1536, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1536, 1532, 1532, 1532,
+     1532, 1532, 1536, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1536, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532,    0, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532
+    } ;
+
+static yyconst short int yy_nxt[1903] =
+    {   0,
+       40,   41,   42,   43,   44,   40,   40,   40,   40,   45,
+       46,   47,   47,   48,   47,   47,   47,   47,   47,   47,
+       49,   50,   49,   51,   40,   52,   53,   54,   55,   40,
+       40,   56,   57,   58,   59,   60,   61,   62,   63,   64,
+       40,   65,   66,   67,   68,   69,   70,   40,   71,   72,
+       73,   74,   75,   40,   40,   76,   40,   40,   40,   77,
+       86,  225,  148,   78,   87,   79,  189,  226,   80,   81,
+      149,  148,   82,  931,   83,   84,   85,   77,   88,  149,
+      189,   78,  181,   79,   89,   90,   80,   81,  150,   91,
+       82,   86,   83,   84,   85,   87,  363,  150,  240,  932,
+
+       92,   93,  189,  182,  251,   98,  205,   94,   91,   88,
+      206,   98,  183,  241,   95,   89,   90,   96,   99,   92,
+       93,  252,  189,  100,   99,  189,   94,  102,  101,  100,
+      102,  267,  207,   95,  101,  103,   96,  226,  103,  108,
+      104,  105,  109,  104,  105,  219,  208,  110,  132,  106,
+      107,  108,  106,  107,  109,  133,  220,  111,  134,  110,
+      933,  114,  203,  135,  211,  112,  113,  115,  193,  111,
+      114,  181,  116,  194,  117,  204,  115,  112,  113,  257,
+      212,  116,  189,  117,  136,  118,  119,  189, 1532,  216,
+      217,  240,  182,  132,  118,  119,  120,  121,  122,  123,
+
+      133,  183,  218,  134,  227,  189,  258,  124,  135,  125,
+      209,  126,  228,  127,  128,  237,  199,  200,  129,  229,
+      201,  238,  130,  131,  189,  213,  210,  214,  222,  136,
+      137,  202,  231,  223,  366,  239,  934,  215,  232,  224,
+      216,  246,  234,  248,  270,  235,  231,  281,  233,  249,
+      205,  247,  232,  218,  206,  138,  139,  140,  236,  141,
+      221,  189,  233,  142,  244,  282,  143,  144,  222,  231,
+      145,  253,  237,  223,  146,  232,  189,  254,  255,  250,
+      262,  234,  147,  137,  235,  233,  278,  205,  189,  263,
+      286,  206,  239,  264,  256,  234,  189,  236,  235,  189,
+
+      225,  221,  259,  935,  216,  217,  226,  189,  138,  139,
+      140,  236,  141,  203,  205,  261,  142,  218,  260,  143,
+      144,  216,  217,  145,  209,  269,  204,  146,  222,  265,
+      189,  304,  266,  223,  218,  147,  151,  323,  234,  224,
+      210,  235,  287,  208,  203,  268,  279,  189,  221,  280,
+      189,  212,  288,  271,  236,  189,  205,  300,  226,  230,
+      206,  152,  153,  154,  155,  156,  157,  158,  189,  159,
+      276,  160,  161,  162,  163,  164,  165,  207,  427,  166,
+      167,  273,  168,  449,  169,  216,  217,  189,  170,  171,
+      172,  208,  173,  174,  234,  175,  176,  235,  218,  306,
+
+      177,  274,  189,  189,  292,  541,  231,  405,  178,  275,
+      236,  230,  232,  423,  222,  179,  180,  171,  172,  223,
+      173,  174,  233,  175,  176,  224,  216,  217,  177,  211,
+      298,  209,  207,  348,  936,  305,  178,  277,  189,  218,
+      189,  285,  302,  179,  180,  189,  208,  210,  190,  349,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      190,  189,  190,  190,  205,  289,  283,  189,  206,  189,
+      290,  190,  190,  190,  190,  190,  190,  203,  284,  291,
+      293,  328,  230,  237,  234,  216,  303,  235,  189,  307,
+      204,  189,  220,  205,  192,  216,  217,  206,  218,  189,
+
+      236,  189,  329,  239,  294,  367,  309,  301,  218,  322,
+      392,  211,  330,  418,  311,  222,  435,  313,  189,  221,
+      223,  314,  216,  324,  499,  203,  331,  209,  315,  419,
+      325,  207,  333,  326,  316,  327,  332,  189,  312,  189,
+      317,  318,  319,  320,  386,  208,  334,  335,  321,  237,
+      336,  227,  226,  189,  337,  346,  189,  338,  341,  228,
+      342,  339,  371,  235,  343,  355,  229,  340,  356,  239,
+      189,  358,  237,  189,  203,  344,  345,  213,  357,  214,
+      376,  189,  372,  207,  209,  221,  352,  351,  240,  215,
+      397,  398,  239,  189,  396,  353,  221,  208,  420,  189,
+
+      210,  373,  189,  241,  359,  465,  405,  189,  189,  490,
+      189,  491,  476,  385,  374,  466,  496,  405,  396,  405,
+      403,  513,  366,  518,  428,  529,  433,  497,  511,  498,
+      373,  440,  514,  482,  517,  409,  189,  189,  189,  519,
+      555,  451,  556,  374,  562,  565,  567,  568,  569,  566,
+      570,  480,  371,  483,  577,  546,  551,  563,  564,  581,
+      189,  189,  189,  619,  551,  551,  558,  937,  664,  578,
+      557,  621,  558,  620,  730,  667,  544,  635,  656,  557,
+      533,  535,  565,  688,  689,  675,  566,  703,  938,  731,
+      939,  704,  715,  716,  717,  718,  591,  719,  720,  721,
+
+      753,  799,  613,  803,  856,  701,  701,  597,  853,  861,
+      857,  854,  804,  940,  862,  878,  879,  805,  880,  904,
+      905,  906,  920,  921,  923,  924,  941,  942,  943,  944,
+      945,  946,  947,  948,  949,  950,  951,  952,  953,  954,
+      955,  956,  957,  958,  959,  960,  961,  962,  963,  964,
+      965,  966,  967,  968,  969,  970,  971,  972,  973,  974,
+      975,  976,  977,  978,  979,  980,  981,  982,  983,  984,
+      985,  986,  987,  988,  989,  990,  991,  992,  993,  995,
+      996,  994,  997,  998,  999, 1000, 1001,  555, 1002, 1003,
+     1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013,
+
+      566, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022,
+     1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032,
+     1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042,
+     1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
+     1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062,
+     1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072,
+     1073, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083,
+     1084, 1085, 1086, 1088, 1074, 1089, 1090, 1091, 1087, 1092,
+     1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
+     1104, 1105, 1093, 1106, 1107, 1108, 1109, 1110, 1111, 1112,
+
+     1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123,
+     1124, 1125, 1126, 1113, 1127, 1128, 1129, 1130, 1131, 1132,
+     1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142,
+     1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152,
+     1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162,
+     1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172,
+     1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182,
+     1183, 1184, 1185, 1186, 1187, 1188, 1190, 1191, 1192, 1193,
+     1194, 1195, 1197, 1198, 1199, 1200, 1201, 1196, 1109, 1202,
+     1203, 1204, 1189, 1205, 1206, 1207, 1208, 1210, 1209, 1211,
+
+     1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221,
+     1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231,
+     1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241,
+     1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251,
+     1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261,
+     1262, 1263, 1264, 1265, 1266, 1267, 1269, 1270, 1268, 1271,
+     1272, 1273, 1274, 1275, 1276, 1277, 1279, 1280, 1281, 1282,
+     1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292,
+     1278, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301,
+     1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311,
+
+     1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321,
+     1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331,
+     1333, 1332, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341,
+     1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351,
+     1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361,
+     1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371,
+     1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1381, 1383,
+     1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393,
+     1394, 1395, 1396, 1380, 1382, 1397, 1398, 1399, 1400, 1401,
+     1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411,
+
+     1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421,
+     1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431,
+     1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441,
+     1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451,
+     1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461,
+     1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471,
+     1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481,
+     1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491,
+     1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501,
+     1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511,
+
+     1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521,
+     1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531,
+      185,  185,  185,  185,  185,  185,  187,  188,  187,  187,
+      187,  187,  190,  190,  190,  198,  360,  361,  361,  361,
+      362,  362,  532,  930,  929,  928,  927,  926,  925,  922,
+      919,  918,  917,  916,  915,  914,  913,  912,  911,  910,
+      909,  908,  907,  903,  902,  901,  900,  899,  898,  897,
+      896,  895,  894,  893,  892,  891,  890,  889,  888,  887,
+      886,  885,  884,  883,  882,  881,  877,  876,  875,  874,
+      873,  872,  871,  870,  869,  868,  867,  866,  865,  864,
+
+      863,  860,  859,  858,  855,  852,  851,  850,  849,  848,
+      847,  846,  845,  844,  843,  842,  841,  840,  839,  838,
+      837,  836,  699,  835,  834,  833,  832,  831,  830,  829,
+      828,  827,  826,  825,  824,  823,  822,  821,  820,  819,
+      818,  817,  816,  815,  814,  813,  812,  811,  810,  809,
+      808,  807,  806,  802,  801,  800,  798,  699,  797,  796,
+      795,  794,  793,  792,  791,  790,  789,  699,  788,  787,
+      786,  785,  784,  783,  782,  781,  780,  779,  778,  777,
+      776,  775,  774,  773,  772,  771,  770,  769,  768,  767,
+      766,  765,  764,  763,  762,  761,  760,  759,  758,  757,
+
+      756,  755,  754,  752,  737,  751,  750,  749,  748,  747,
+      746,  745,  744,  743,  742,  741,  740,  739,  738,  737,
+      736,  735,  734,  733,  732,  729,  728,  727,  726,  725,
+      724,  723,  722,  714,  713,  712,  711,  710,  709,  708,
+      707,  706,  705,  702,  701,  700,  699,  698,  697,  696,
+      695,  694,  693,  692,  691,  690,  687,  686,  685,  684,
+      683,  682,  681,  680,  679,  678,  677,  676,  674,  673,
+      672,  671,  670,  669,  668,  666,  665,  663,  662,  661,
+      660,  659,  658,  657,  655,  654,  653,  652,  651,  650,
+      649,  648,  647,  646,  645,  644,  643,  642,  641,  640,
+
+      639,  638,  637,  636,  634,  633,  632,  631,  630,  629,
+      628,  627,  626,  625,  624,  623,  622,  618,  617,  616,
+      615,  614,  612,  611,  610,  609,  608,  607,  606,  605,
+      604,  603,  602,  601,  600,  599,  598,  596,  595,  594,
+      593,  592,  590,  589,  588,  587,  586,  585,  584,  583,
+      582,  580,  579,  576,  575,  574,  573,  572,  571,  561,
+      560,  559,  558,  557,  554,  553,  552,  551,  550,  549,
+      548,  547,  546,  545,  543,  542,  540,  539,  538,  537,
+      536,  534,  531,  530,  528,  527,  526,  525,  524,  523,
+      522,  521,  520,  516,  515,  512,  510,  509,  508,  507,
+
+      506,  505,  504,  503,  502,  501,  500,  495,  494,  493,
+      492,  489,  488,  487,  486,  485,  484,  481,  479,  478,
+      477,  475,  474,  473,  472,  471,  470,  469,  468,  467,
+      464,  463,  462,  461,  460,  459,  458,  457,  456,  455,
+      454,  453,  452,  450,  448,  447,  446,  445,  444,  443,
+      442,  441,  439,  438,  437,  436,  434,  432,  431,  430,
+      429,  426,  425,  424,  422,  421,  417,  416,  415,  414,
+      413,  412,  411,  410,  409,  408,  407,  406,  405,  404,
+      403,  402,  401,  400,  399,  396,  395,  394,  393,  392,
+      391,  390,  389,  388,  387,  386,  385,  384,  383,  382,
+
+      381,  380,  379,  378,  377,  375,  370,  369,  368,  365,
+      364, 1532,  189,  186,  184,  354,  350,  347,  310,  308,
+      299,  297,  296,  295,  272,  245,  243,  242,  230,  221,
+      212,  197,  196,  195,  189,  189, 1532,  186,  184, 1532,
+       97,   97,   39, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532
+    } ;
+
+static yyconst short int yy_chk[1903] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
+        5,   68,   29,    3,    5,    3,  193,   68,    3,    3,
+       29,   30,    3,  782,    3,    3,    3,    4,    5,   30,
+       58,    4,   37,    4,    5,    5,    4,    4,   29,    7,
+        4,    6,    4,    4,    4,    6,  193,   30,   74,  783,
+
+        7,    7,   59,   37,   82,   11,   58,    7,    8,    6,
+       58,   12,   37,   74,    7,    6,    6,    7,   11,    8,
+        8,   82,   61,   11,   12,   57,    8,   13,   11,   12,
+       14,  101,   59,    8,   12,   13,    8,  101,   14,   15,
+       13,   13,   15,   14,   14,   65,   59,   15,   25,   13,
+       13,   16,   14,   14,   16,   25,   65,   15,   25,   16,
+      784,   17,   57,   25,   61,   15,   15,   17,   48,   16,
+       18,   38,   17,   48,   17,   57,   18,   16,   16,   87,
+       87,   18,   60,   18,   25,   17,   17,   56,   48,   64,
+       64,   88,   38,   26,   18,   18,   19,   19,   19,   19,
+
+       26,   38,   64,   26,   69,  199,   88,   19,   26,   19,
+       60,   19,   69,   19,   19,   73,   56,   56,   19,   69,
+       56,   73,   19,   19,   77,   63,   60,   63,   67,   26,
+       27,   56,   71,   67,  199,   73,  787,   63,   71,   67,
+       79,   79,   72,   80,  104,   72,  104,  120,   71,   80,
+       77,   79,  104,   79,   77,   27,   27,   27,   72,   27,
+       80,   86,  104,   27,   77,  120,   27,   27,   81,   83,
+       27,   83,   85,   81,   27,   83,   92,   84,   85,   81,
+       95,   84,   27,   28,   84,   83,  116,   86,   93,   95,
+      124,   86,   85,   96,   86,   96,  102,   84,   96,   99,
+
+      116,  124,   92,  788,   94,   94,  116,  139,   28,   28,
+       28,   96,   28,   92,   93,   94,   28,   94,   93,   28,
+       28,  100,  100,   28,  102,  103,   92,   28,  103,   99,
+      114,  143,  100,  103,  100,   28,   31,  158,  105,  103,
+      102,  105,  125,   99,  139,  102,  117,  109,  143,  117,
+      259,  158,  125,  105,  105,  281,  114,  139,  125,  117,
+      114,   31,   31,   31,   31,   31,   31,   31,  373,   31,
+      114,   31,   31,   31,   31,   31,   31,  109,  259,   31,
+       31,  109,   31,  281,   31,  110,  110,  135,   31,   33,
+       33,  109,   33,   33,  111,   33,   33,  111,  110,  145,
+
+       33,  110,  123,  141,  127,  373,  127,  255,   33,  111,
+      111,  145,  127,  255,  144,   33,   33,   34,   34,  144,
+       34,   34,  127,   34,   34,  144,  115,  115,   34,  135,
+      135,  141,  123,  169,  789,  144,   34,  115,  122,  115,
+      121,  123,  141,   34,   34,   46,  123,  141,   46,  169,
+       46,   46,   46,   46,   46,   46,   46,   46,   46,   46,
+       46,  200,   46,   46,  122,  126,  121,  140,  122,  157,
+      126,   46,   46,   46,   46,   46,   46,  121,  122,  126,
+      128,  160,  126,  146,  128,  142,  142,  128,  153,  146,
+      121,  154,  160,  140,   46,  149,  149,  140,  142,  156,
+
+      128,  155,  161,  146,  128,  200,  149,  140,  149,  157,
+      267,  157,  162,  251,  153,  162,  267,  154,  205,  161,
+      162,  154,  159,  159,  328,  153,  162,  156,  154,  251,
+      159,  155,  163,  159,  155,  159,  162,  172,  153,  206,
+      155,  155,  155,  156,  328,  155,  163,  164,  156,  167,
+      165,  164,  163,  173,  165,  167,  174,  165,  166,  164,
+      166,  165,  205,  166,  166,  176,  164,  165,  177,  167,
+      207,  182,  178,  209,  172,  166,  166,  176,  178,  176,
+      209,  260,  206,  173,  174,  177,  173,  172,  183,  176,
+      231,  231,  178,  272,  252,  174,  182,  173,  252,  265,
+
+      174,  207,  283,  183,  183,  297,  307,  311,  313,  321,
+      314,  321,  307,  327,  207,  297,  326,  346,  340,  357,
+      345,  342,  272,  346,  260,  357,  265,  326,  340,  327,
+      265,  272,  342,  313,  345,  347,  363,  376,  366,  347,
+      390,  283,  390,  265,  400,  401,  402,  402,  402,  401,
+      402,  311,  313,  314,  412,  412,  413,  400,  400,  417,
+      427,  433,  449,  455,  472,  494,  456,  790,  502,  413,
+      417,  456,  505,  455,  568,  505,  376,  472,  494,  502,
+      363,  366,  513,  526,  526,  513,  513,  542,  791,  568,
+      792,  542,  557,  557,  557,  557,  427,  557,  557,  557,
+
+      592,  646,  449,  650,  708,  592,  646,  433,  706,  715,
+      708,  706,  650,  793,  715,  731,  731,  650,  731,  758,
+      758,  758,  772,  772,  774,  774,  794,  795,  796,  797,
+      798,  799,  801,  802,  803,  804,  805,  806,  808,  810,
+      811,  812,  813,  814,  815,  816,  817,  818,  819,  820,
+      821,  822,  823,  824,  825,  826,  827,  828,  829,  830,
+      831,  832,  833,  834,  835,  836,  837,  838,  839,  840,
+      841,  842,  843,  844,  846,  847,  848,  849,  850,  851,
+      853,  850,  854,  855,  856,  857,  858,  860,  861,  862,
+      863,  864,  865,  866,  867,  868,  869,  870,  871,  872,
+
+      876,  878,  879,  880,  884,  885,  886,  887,  888,  889,
+      890,  892,  893,  894,  898,  899,  900,  901,  902,  908,
+      909,  910,  911,  912,  913,  914,  915,  916,  917,  918,
+      919,  922,  923,  924,  926,  927,  928,  929,  930,  932,
+      934,  935,  936,  937,  938,  939,  940,  941,  942,  943,
+      944,  945,  946,  947,  949,  950,  951,  952,  953,  954,
+      955,  956,  957,  958,  959,  960,  961,  962,  963,  964,
+      965,  966,  967,  968,  955,  969,  970,  972,  967,  973,
+      974,  976,  977,  978,  979,  980,  981,  983,  984,  985,
+      987,  989,  973,  991,  993,  994,  998,  999, 1000, 1001,
+
+     1002, 1003, 1004, 1005, 1006, 1007, 1009, 1010, 1011, 1012,
+     1013, 1014, 1015, 1001, 1016, 1018, 1019, 1020, 1021, 1022,
+     1024, 1027, 1028, 1031, 1032, 1033, 1034, 1035, 1036, 1037,
+     1038, 1039, 1041, 1042, 1044, 1045, 1046, 1047, 1048, 1049,
+     1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059,
+     1060, 1061, 1063, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
+     1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081,
+     1082, 1083, 1084, 1086, 1087, 1088, 1089, 1090, 1092, 1094,
+     1095, 1096, 1097, 1098, 1099, 1100, 1101, 1096, 1101, 1102,
+     1103, 1104, 1088, 1109, 1111, 1111, 1111, 1112, 1111, 1113,
+
+     1123, 1128, 1129, 1130, 1131, 1132, 1135, 1136, 1137, 1138,
+     1139, 1140, 1141, 1143, 1144, 1146, 1147, 1148, 1149, 1150,
+     1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1162, 1163,
+     1164, 1165, 1166, 1168, 1169, 1170, 1172, 1173, 1174, 1175,
+     1177, 1178, 1179, 1180, 1183, 1184, 1185, 1186, 1187, 1188,
+     1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1194, 1197,
+     1198, 1200, 1201, 1202, 1205, 1207, 1208, 1209, 1210, 1211,
+     1212, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223,
+     1207, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1234, 1236,
+     1237, 1238, 1239, 1240, 1243, 1244, 1246, 1248, 1249, 1250,
+
+     1251, 1252, 1256, 1257, 1258, 1259, 1260, 1261, 1264, 1267,
+     1268, 1269, 1270, 1271, 1272, 1273, 1275, 1277, 1278, 1278,
+     1279, 1278, 1280, 1281, 1282, 1283, 1284, 1287, 1288, 1289,
+     1290, 1291, 1292, 1293, 1294, 1295, 1297, 1298, 1299, 1300,
+     1301, 1302, 1303, 1305, 1307, 1308, 1309, 1310, 1312, 1313,
+     1314, 1315, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324,
+     1325, 1326, 1327, 1328, 1330, 1331, 1332, 1335, 1336, 1337,
+     1338, 1340, 1341, 1342, 1343, 1344, 1346, 1347, 1349, 1352,
+     1353, 1354, 1355, 1335, 1336, 1356, 1358, 1359, 1360, 1361,
+     1362, 1363, 1364, 1365, 1367, 1368, 1369, 1371, 1373, 1374,
+
+     1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384,
+     1385, 1386, 1387, 1388, 1390, 1391, 1392, 1393, 1394, 1395,
+     1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405,
+     1406, 1408, 1409, 1410, 1411, 1412, 1416, 1417, 1418, 1419,
+     1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1429, 1430,
+     1431, 1433, 1435, 1437, 1440, 1441, 1442, 1444, 1445, 1446,
+     1447, 1448, 1449, 1450, 1451, 1457, 1460, 1461, 1462, 1463,
+     1464, 1465, 1467, 1469, 1470, 1471, 1473, 1474, 1475, 1476,
+     1477, 1478, 1479, 1480, 1481, 1484, 1485, 1486, 1487, 1488,
+     1489, 1490, 1491, 1493, 1494, 1495, 1498, 1499, 1500, 1505,
+
+     1506, 1507, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516,
+     1517, 1518, 1519, 1520, 1521, 1522, 1524, 1526, 1529, 1530,
+     1533, 1533, 1533, 1533, 1533, 1533, 1534, 1535, 1534, 1534,
+     1534, 1534, 1536, 1536, 1536, 1537, 1538, 1539, 1539, 1539,
+     1540, 1540, 1541,  781,  780,  779,  778,  776,  775,  773,
+      771,  770,  769,  768,  767,  766,  765,  764,  763,  762,
+      761,  760,  759,  757,  756,  755,  754,  753,  752,  750,
+      748,  747,  746,  745,  744,  743,  742,  741,  740,  739,
+      738,  737,  736,  734,  733,  732,  730,  729,  728,  727,
+      726,  725,  724,  723,  722,  721,  720,  719,  718,  717,
+
+      716,  714,  712,  710,  707,  705,  704,  703,  702,  701,
+      700,  698,  697,  696,  694,  693,  691,  690,  689,  688,
+      687,  686,  685,  684,  683,  681,  679,  678,  677,  676,
+      675,  674,  673,  672,  671,  670,  669,  667,  666,  665,
+      664,  662,  661,  660,  659,  658,  657,  656,  655,  654,
+      653,  652,  651,  649,  648,  647,  645,  644,  642,  641,
+      640,  638,  637,  636,  635,  634,  633,  632,  631,  629,
+      628,  627,  626,  625,  624,  623,  622,  620,  619,  618,
+      616,  615,  614,  613,  612,  611,  610,  609,  608,  607,
+      606,  605,  604,  603,  602,  601,  600,  599,  597,  596,
+
+      595,  594,  593,  591,  590,  589,  588,  587,  586,  585,
+      584,  582,  581,  580,  579,  578,  577,  576,  575,  574,
+      573,  572,  571,  570,  569,  565,  564,  563,  562,  561,
+      560,  559,  558,  556,  553,  552,  550,  549,  548,  547,
+      546,  544,  543,  541,  540,  539,  538,  537,  536,  535,
+      534,  531,  530,  529,  528,  527,  525,  524,  523,  522,
+      521,  520,  519,  518,  517,  516,  515,  514,  512,  511,
+      510,  509,  508,  507,  506,  504,  503,  501,  500,  499,
+      498,  497,  496,  495,  493,  492,  491,  490,  489,  488,
+      486,  485,  484,  483,  482,  481,  480,  479,  478,  477,
+
+      476,  475,  474,  473,  471,  470,  469,  468,  467,  465,
+      464,  463,  462,  461,  460,  459,  458,  454,  453,  452,
+      451,  450,  448,  447,  446,  445,  444,  443,  442,  441,
+      440,  439,  438,  437,  436,  435,  434,  432,  431,  430,
+      429,  428,  426,  425,  424,  423,  422,  421,  420,  419,
+      418,  415,  414,  411,  409,  408,  406,  405,  403,  399,
+      396,  393,  392,  391,  387,  386,  385,  384,  383,  382,
+      381,  380,  379,  378,  375,  374,  372,  371,  370,  369,
+      368,  364,  359,  358,  356,  355,  354,  353,  352,  351,
+      350,  349,  348,  344,  343,  341,  339,  338,  337,  336,
+
+      335,  334,  333,  332,  331,  330,  329,  325,  324,  323,
+      322,  320,  319,  318,  317,  316,  315,  312,  310,  309,
+      308,  306,  305,  304,  303,  302,  301,  300,  299,  298,
+      296,  295,  294,  293,  292,  291,  290,  289,  288,  287,
+      286,  285,  284,  282,  280,  279,  278,  277,  276,  275,
+      274,  273,  271,  270,  269,  268,  266,  264,  263,  262,
+      261,  258,  257,  256,  254,  253,  250,  249,  248,  247,
+      246,  245,  244,  243,  242,  241,  240,  239,  238,  237,
+      236,  235,  234,  233,  232,  230,  229,  227,  226,  225,
+      224,  223,  222,  221,  220,  219,  218,  217,  216,  215,
+
+      214,  213,  212,  211,  210,  208,  204,  203,  202,  198,
+      194,  191,  190,  185,  184,  175,  171,  168,  152,  148,
+      138,  134,  133,  129,  108,   78,   76,   75,   70,   66,
+       62,   54,   53,   52,   51,   49,   47,   43,   41,   39,
+       10,    9, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+
+     1532, 1532
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+static int yy_more_flag = 0;
+static int yy_more_len = 0;
+#define yymore() (yy_more_flag = 1)
+#define YY_MORE_ADJ yy_more_len
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "./cftoken.l"
+#define INITIAL 0
+/* Id: cftoken.l,v 1.31.2.7 2005/11/06 17:18:26 monas Exp */
+#line 4 "./cftoken.l"
+/*
+ * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 and 2003 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#ifdef HAVE_NETINET6_IPSEC 
+#  include <netinet6/ipsec.h>
+#else 
+#  include <netinet/ipsec.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <ctype.h>
+#include <glob.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+#include "var.h"
+#include "misc.h"
+#include "vmbuf.h"
+#include "plog.h"
+#include "debug.h"
+
+#include "algorithm.h"
+#include "cfparse_proto.h"
+#include "cftoken_proto.h"
+#include "localconf.h"
+#include "oakley.h"
+#include "isakmp_var.h"
+#include "isakmp.h"
+#include "ipsec_doi.h"
+#include "proposal.h"
+#include "nattraversal.h"
+#ifdef GC
+#include "gcmalloc.h"
+#endif
+
+#include "cfparse.h"
+
+int yyerrorcount = 0;
+
+#if defined(YIPS_DEBUG)
+#  define YYDB plog(LLV_DEBUG2, LOCATION, NULL,                                \
+		"begin <%d>%s\n", yy_start, yytext);
+#  define YYD {                                                                \
+	plog(LLV_DEBUG2, LOCATION, NULL, "<%d>%s",                             \
+	    yy_start, loglevel >= LLV_DEBUG2 ? "\n" : "");                     \
+}
+#else
+#  define YYDB
+#  define YYD
+#endif /* defined(YIPS_DEBUG) */
+
+#define MAX_INCLUDE_DEPTH 10
+
+static struct include_stack {
+	char *path;
+	FILE *fp;
+	YY_BUFFER_STATE prevstate;
+	int lineno;
+	glob_t matches;
+	int matchon;
+} incstack[MAX_INCLUDE_DEPTH];
+static int incstackp = 0;
+
+static int yy_first_time = 1;
+/* common seciton */
+/*octet		(([01]?{digit}?{digit})|((2([0-4]{digit}))|(25[0-5]))) */
+#define S_INI 1
+#define S_PRIV 2
+#define S_PTH 3
+#define S_INF 4
+#define S_LOG 5
+#define S_P