summaryrefslogtreecommitdiffstats
path: root/ipsec-tools
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2018-05-03 14:15:11 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2018-08-02 10:25:37 +0200
commitb376ae131d9e99a90ddbee2015a2e19d67244ba1 (patch)
treed8a5fd2c217baae5ab62579f02fb8401fef8f22a /ipsec-tools
parentipsec-tools: Apply patches from FreeBSD ports. (diff)
downloadrtems-libbsd-b376ae131d9e99a90ddbee2015a2e19d67244ba1.tar.bz2
ipsec-tools: Port libipsec, setkey and racoon.
Note that this replaces the libipsec from FreeBSD with the one provided by ipsec-tools.
Diffstat (limited to 'ipsec-tools')
-rw-r--r--ipsec-tools/src/config.h276
-rw-r--r--ipsec-tools/src/libipsec/config.h1
-rw-r--r--ipsec-tools/src/libipsec/ipsec_dump_policy.c2
-rw-r--r--ipsec-tools/src/libipsec/ipsec_get_policylen.c2
-rw-r--r--ipsec-tools/src/libipsec/ipsec_strerror.c2
-rw-r--r--ipsec-tools/src/libipsec/key_debug.c2
-rw-r--r--ipsec-tools/src/libipsec/libpfkey.h7
-rw-r--r--ipsec-tools/src/libipsec/pfkey.c10
-rw-r--r--ipsec-tools/src/libipsec/pfkey_dump.c26
-rw-r--r--ipsec-tools/src/libipsec/policy_parse.c2719
-rw-r--r--ipsec-tools/src/libipsec/policy_parse.h139
-rw-r--r--ipsec-tools/src/libipsec/policy_parse.y15
-rw-r--r--ipsec-tools/src/libipsec/policy_token.c138
-rw-r--r--ipsec-tools/src/libipsec/policy_token.l3
-rw-r--r--ipsec-tools/src/libipsec/test-policy.c12
-rw-r--r--ipsec-tools/src/racoon/admin.c9
-rw-r--r--ipsec-tools/src/racoon/algorithm.c9
-rw-r--r--ipsec-tools/src/racoon/algorithm.h4
-rw-r--r--ipsec-tools/src/racoon/backupsa.c12
-rw-r--r--ipsec-tools/src/racoon/cfparse.c7128
-rw-r--r--ipsec-tools/src/racoon/cfparse.h606
-rw-r--r--ipsec-tools/src/racoon/cfparse_wrapper.c5
-rw-r--r--ipsec-tools/src/racoon/cftoken.c1142
-rw-r--r--ipsec-tools/src/racoon/cftoken_proto.h13
-rw-r--r--ipsec-tools/src/racoon/cftoken_wrapper.c5
-rw-r--r--ipsec-tools/src/racoon/config.h1
-rw-r--r--ipsec-tools/src/racoon/crypto_openssl.c16
-rw-r--r--ipsec-tools/src/racoon/dnssec.c9
-rw-r--r--ipsec-tools/src/racoon/eaytest.c2
-rw-r--r--ipsec-tools/src/racoon/evt.c9
-rw-r--r--ipsec-tools/src/racoon/genlist.c9
-rw-r--r--ipsec-tools/src/racoon/getcertsbyname.c9
-rw-r--r--ipsec-tools/src/racoon/grabmyaddr.c9
-rw-r--r--ipsec-tools/src/racoon/gssapi.c9
-rw-r--r--ipsec-tools/src/racoon/handler.c9
-rw-r--r--ipsec-tools/src/racoon/ipsec_doi.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_agg.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_base.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_cfg.c2
-rw-r--r--ipsec-tools/src/racoon/isakmp_frag.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_ident.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_inf.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_newg.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_quick.c9
-rw-r--r--ipsec-tools/src/racoon/isakmp_unity.c2
-rw-r--r--ipsec-tools/src/racoon/isakmp_xauth.c2
-rw-r--r--ipsec-tools/src/racoon/kmpstat.c2
-rw-r--r--ipsec-tools/src/racoon/localconf.c9
-rw-r--r--ipsec-tools/src/racoon/logger.c9
-rw-r--r--ipsec-tools/src/racoon/main.c59
-rw-r--r--ipsec-tools/src/racoon/misc.c9
-rw-r--r--ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.c2
-rw-r--r--ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.c2
-rw-r--r--ipsec-tools/src/racoon/missing/crypto/sha2/config.h1
-rw-r--r--ipsec-tools/src/racoon/missing/crypto/sha2/sha2.c29
-rw-r--r--ipsec-tools/src/racoon/nattraversal.c9
-rw-r--r--ipsec-tools/src/racoon/oakley.c9
-rw-r--r--ipsec-tools/src/racoon/package_version.h5
-rw-r--r--ipsec-tools/src/racoon/pfkey.c9
-rw-r--r--ipsec-tools/src/racoon/plainrsa-gen.c2
-rw-r--r--ipsec-tools/src/racoon/plog.c12
-rw-r--r--ipsec-tools/src/racoon/policy.c9
-rw-r--r--ipsec-tools/src/racoon/privsep.c11
-rw-r--r--ipsec-tools/src/racoon/proposal.c9
-rw-r--r--ipsec-tools/src/racoon/prsa_par.c2398
-rw-r--r--ipsec-tools/src/racoon/prsa_par.h156
-rw-r--r--ipsec-tools/src/racoon/prsa_par.y6
-rw-r--r--ipsec-tools/src/racoon/prsa_par_wrapper.c5
-rw-r--r--ipsec-tools/src/racoon/prsa_tok.c543
-rw-r--r--ipsec-tools/src/racoon/prsa_tok.l4
-rw-r--r--ipsec-tools/src/racoon/prsa_tok_wrapper.c5
-rw-r--r--ipsec-tools/src/racoon/racoonctl.c2
-rw-r--r--ipsec-tools/src/racoon/remoteconf.c9
-rw-r--r--ipsec-tools/src/racoon/rsalist.c9
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-admin-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-algorithm-data.h12
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-backupsa-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-cfparse_wrapper-data.h11
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-cftoken_wrapper-data.h21
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-crypto_openssl-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-data.h90
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-dnssec-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-evt-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-genlist-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-getcertsbyname-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-grabmyaddr-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-gssapi-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-handler-data.h9
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-ipsec_doi-data.h8
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp-data.h7
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_agg-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_base-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_frag-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_ident-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_inf-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_newg-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_quick-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-localconf-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-logger-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-main-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-misc-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-namespace.h763
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-nattraversal-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-oakley-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-pfkey-data.h5
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-plog-data.h7
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-policy-data.h5
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-privsep-data.h5
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-proposal-data.h5
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_par_wrapper-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_tok_wrapper-data.h16
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-remoteconf-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-rsalist-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-safefile-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-sainfo-data.h6
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-schedule-data.h5
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h12
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-sha2-data.h8
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-sockmisc-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-str2val-data.h4
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-strnames-data.h30
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-vendorid-data.h5
-rw-r--r--ipsec-tools/src/racoon/rtems-bsd-racoon-vmbuf-data.h4
-rw-r--r--ipsec-tools/src/racoon/safefile.c16
-rw-r--r--ipsec-tools/src/racoon/sainfo.c9
-rw-r--r--ipsec-tools/src/racoon/schedule.c9
-rw-r--r--ipsec-tools/src/racoon/security.c2
-rw-r--r--ipsec-tools/src/racoon/session.c16
-rw-r--r--ipsec-tools/src/racoon/sockmisc.c17
-rw-r--r--ipsec-tools/src/racoon/sockmisc.h3
-rw-r--r--ipsec-tools/src/racoon/str2val.c9
-rw-r--r--ipsec-tools/src/racoon/strnames.c9
-rw-r--r--ipsec-tools/src/racoon/throttle.c2
-rw-r--r--ipsec-tools/src/racoon/vendorid.c9
-rw-r--r--ipsec-tools/src/racoon/vmbuf.c9
-rw-r--r--ipsec-tools/src/setkey/config.h1
-rw-r--r--ipsec-tools/src/setkey/package_version.h5
-rw-r--r--ipsec-tools/src/setkey/parse.c4227
-rw-r--r--ipsec-tools/src/setkey/parse.h258
-rw-r--r--ipsec-tools/src/setkey/parse.y13
-rw-r--r--ipsec-tools/src/setkey/parse_wrapper.c5
-rw-r--r--ipsec-tools/src/setkey/rtems-bsd-setkey-data.h34
-rw-r--r--ipsec-tools/src/setkey/rtems-bsd-setkey-namespace.h81
-rw-r--r--ipsec-tools/src/setkey/rtems-bsd-setkey-parse_wrapper-data.h25
-rw-r--r--ipsec-tools/src/setkey/rtems-bsd-setkey-setkey-data.h8
-rw-r--r--ipsec-tools/src/setkey/rtems-bsd-setkey-token_wrapper-data.h18
-rw-r--r--ipsec-tools/src/setkey/setkey.c69
-rw-r--r--ipsec-tools/src/setkey/token.c673
-rw-r--r--ipsec-tools/src/setkey/token_wrapper.c12
150 files changed, 9697 insertions, 12792 deletions
diff --git a/ipsec-tools/src/config.h b/ipsec-tools/src/config.h
new file mode 100644
index 00000000..cd831ccc
--- /dev/null
+++ b/ipsec-tools/src/config.h
@@ -0,0 +1,276 @@
+/* Generated on a FreeBSD 11.1 machine and adapted for RTEMS */
+
+/* Extra defines necessary for RTEMS. */
+#define SYSCONFDIR "/etc"
+
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* in-kernel NAT-T is broken */
+/* #undef BROKEN_NATT */
+
+/* If printf doesn't support %zu. */
+/* #undef BROKEN_PRINTF */
+
+/* Enable admin port */
+/* #undef ENABLE_ADMINPORT */
+
+/* Enable dead peer detection */
+#define ENABLE_DPD /**/
+
+/* IKE fragmentation support */
+#define ENABLE_FRAG /**/
+
+/* Hybrid authentication support */
+/* #undef ENABLE_HYBRID */
+
+/* Enable NAT-Traversal */
+#define ENABLE_NATT /**/
+
+/* Enable NAT-Traversal draft 00 */
+/* #undef ENABLE_NATT_00 */
+
+/* Enable NAT-Traversal draft 01 */
+/* #undef ENABLE_NATT_01 */
+
+/* Enable NAT-Traversal draft 02 */
+/* #undef ENABLE_NATT_02 */
+
+/* Enable NAT-Traversal draft 03 */
+/* #undef ENABLE_NATT_03 */
+
+/* Enable NAT-Traversal draft 04 */
+/* #undef ENABLE_NATT_04 */
+
+/* Enable NAT-Traversal draft 05 */
+/* #undef ENABLE_NATT_05 */
+
+/* Enable NAT-Traversal draft 06 */
+/* #undef ENABLE_NATT_06 */
+
+/* Enable NAT-Traversal draft 07 */
+/* #undef ENABLE_NATT_07 */
+
+/* Enable NAT-Traversal draft 08 */
+/* #undef ENABLE_NATT_08 */
+
+/* Enable NAT-Traversal RFC version */
+#define ENABLE_NATT_RFC /**/
+
+/* Enable samode-unspec */
+/* #undef ENABLE_SAMODE_UNSPECIFIED */
+
+/* Enable statictics */
+/* #undef ENABLE_STATS */
+
+/* Have a monotonic clock */
+#define HAVE_CLOCK_MONOTONIC /**/
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Have __func__ macro */
+#define HAVE_FUNC_MACRO /**/
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Enable GSS API */
+/* #undef HAVE_GSSAPI */
+
+/* Have iconv using const */
+/* #undef HAVE_ICONV_2ND_CONST */
+
+/* Define to 1 if you have the `iconv_open' function. */
+/* #undef HAVE_ICONV_OPEN */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Have ipsec_policy_t */
+/* #undef HAVE_IPSEC_POLICY_T */
+
+/* Hybrid authentication uses LDAP */
+/* #undef HAVE_LIBLDAP */
+
+/* Hybrid authentication uses PAM */
+/* #undef HAVE_LIBPAM */
+
+/* Hybrid authentication uses RADIUS */
+/* #undef HAVE_LIBRADIUS */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <openssl/aes.h> header file. */
+#define HAVE_OPENSSL_AES_H 1
+
+/* Define to 1 if you have the <openssl/camellia.h> header file. */
+#define HAVE_OPENSSL_CAMELLIA_H 1
+
+/* Define to 1 if you have the <openssl/engine.h> header file. */
+#define HAVE_OPENSSL_ENGINE_H 1
+
+/* Define to 1 if you have the <openssl/idea.h> header file. */
+#define HAVE_OPENSSL_IDEA_H 1
+
+/* Define to 1 if you have the <openssl/rc5.h> header file. */
+/* #undef HAVE_OPENSSL_RC5_H */
+
+/* Define to 1 if you have the `pam_start' function. */
+/* #undef HAVE_PAM_START */
+
+/* Are PF_KEY policy priorities supported? */
+/* #undef HAVE_PFKEY_POLICY_PRIORITY */
+
+/* Have forward policy */
+/* #undef HAVE_POLICY_FWD */
+
+/* Define to 1 if you have the `rad_create_request' function. */
+/* #undef HAVE_RAD_CREATE_REQUEST */
+
+/* Is readline available? */
+/* #undef HAVE_READLINE */
+
+/* Enable Security Context */
+/* #undef HAVE_SECCTX */
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* sha2 is defined in sha.h */
+#define HAVE_SHA2_IN_SHA_H /**/
+
+/* Define to 1 if you have the <shadow.h> header file. */
+/* #undef HAVE_SHADOW_H */
+
+/* Define to 1 if you have the `socket' function. */
+#define HAVE_SOCKET 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <varargs.h> header file. */
+/* #undef HAVE_VARARGS_H */
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Support IPv6 */
+#define INET6 /**/
+
+/* Use advanced IPv6 API */
+#define INET6_ADVAPI /**/
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+#define PACKAGE "ipsec-tools"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "ipsec-tools"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "ipsec-tools 0.8.2"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "ipsec-tools"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.8.2"
+
+/* Path to ipsec.h */
+#define PATH_IPSEC_H <netipsec/ipsec.h>
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* A 'va_copy' style function */
+#define VA_COPY va_copy
+
+/* Version number of package */
+#define VERSION "0.8.2"
+
+/* SHA2 support */
+#define WITH_SHA2 /**/
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#define YYTEXT_POINTER 1
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
diff --git a/ipsec-tools/src/libipsec/config.h b/ipsec-tools/src/libipsec/config.h
new file mode 100644
index 00000000..f97325b7
--- /dev/null
+++ b/ipsec-tools/src/libipsec/config.h
@@ -0,0 +1 @@
+#include "../config.h"
diff --git a/ipsec-tools/src/libipsec/ipsec_dump_policy.c b/ipsec-tools/src/libipsec/ipsec_dump_policy.c
index 4d0eb773..14789547 100644
--- a/ipsec-tools/src/libipsec/ipsec_dump_policy.c
+++ b/ipsec-tools/src/libipsec/ipsec_dump_policy.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: ipsec_dump_policy.c,v 1.9 2010/12/03 15:01:11 tteras Exp $ */
/* Id: ipsec_dump_policy.c,v 1.10 2005/06/29 09:12:37 manubsd Exp */
diff --git a/ipsec-tools/src/libipsec/ipsec_get_policylen.c b/ipsec-tools/src/libipsec/ipsec_get_policylen.c
index 5a497780..acea77ea 100644
--- a/ipsec-tools/src/libipsec/ipsec_get_policylen.c
+++ b/ipsec-tools/src/libipsec/ipsec_get_policylen.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: ipsec_get_policylen.c,v 1.7 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: ipsec_get_policylen.c,v 1.5 2000/05/07 05:25:03 itojun Exp $ */
diff --git a/ipsec-tools/src/libipsec/ipsec_strerror.c b/ipsec-tools/src/libipsec/ipsec_strerror.c
index ca26d0e8..f9a5951e 100644
--- a/ipsec-tools/src/libipsec/ipsec_strerror.c
+++ b/ipsec-tools/src/libipsec/ipsec_strerror.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: ipsec_strerror.c,v 1.6 2010/04/07 14:53:52 vanhu Exp $ */
/* $KAME: ipsec_strerror.c,v 1.7 2000/07/30 00:45:12 itojun Exp $ */
diff --git a/ipsec-tools/src/libipsec/key_debug.c b/ipsec-tools/src/libipsec/key_debug.c
index e381a984..61eafed1 100644
--- a/ipsec-tools/src/libipsec/key_debug.c
+++ b/ipsec-tools/src/libipsec/key_debug.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: key_debug.c,v 1.9 2008/12/05 06:02:20 tteras Exp $ */
/* $KAME: key_debug.c,v 1.29 2001/08/16 14:25:41 itojun Exp $ */
diff --git a/ipsec-tools/src/libipsec/libpfkey.h b/ipsec-tools/src/libipsec/libpfkey.h
index c05285a2..dab2cca8 100644
--- a/ipsec-tools/src/libipsec/libpfkey.h
+++ b/ipsec-tools/src/libipsec/libpfkey.h
@@ -93,7 +93,11 @@ struct pfkey_send_sa_args {
};
/* The options built into libipsec */
+#ifndef __rtems__
extern int libipsec_opt;
+#else /* __rtems__ */
+extern const int libipsec_opt;
+#endif /* __rtems__ */
#define LIBIPSEC_OPT_NATT 0x01
#define LIBIPSEC_OPT_FRAG 0x02
#define LIBIPSEC_OPT_SEC_CTX 0x04
@@ -108,6 +112,9 @@ void ipsec_hexdump __P((const void *, int));
const char *ipsec_strerror __P((void));
void kdebug_sadb __P((struct sadb_msg *));
ipsec_policy_t ipsec_set_policy __P((__ipsec_const char *, int));
+#ifdef __rtems__
+extern void ipsec_free_policy(ipsec_policy_t buf);
+#endif /* __rtems__ */
int ipsec_get_policylen __P((ipsec_policy_t));
char *ipsec_dump_policy __P((ipsec_policy_t, __ipsec_const char *));
diff --git a/ipsec-tools/src/libipsec/pfkey.c b/ipsec-tools/src/libipsec/pfkey.c
index 554952d7..a621be12 100644
--- a/ipsec-tools/src/libipsec/pfkey.c
+++ b/ipsec-tools/src/libipsec/pfkey.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: pfkey.c,v 1.21.2.1 2011/11/14 13:25:06 tteras Exp $ */
/* $KAME: pfkey.c,v 1.47 2003/10/02 19:52:12 itojun Exp $ */
@@ -95,7 +97,11 @@ static caddr_t pfkey_setsecctx __P((caddr_t, caddr_t, u_int, u_int8_t, u_int8_t,
caddr_t, u_int16_t));
#endif
+#ifndef __rtems__
int libipsec_opt = 0
+#else /* __rtems__ */
+const int libipsec_opt = 0
+#endif /* __rtems__ */
#ifdef SADB_X_EXT_NAT_T_TYPE
| LIBIPSEC_OPT_NATT
#endif
@@ -116,7 +122,11 @@ static struct sadb_supported *ipsec_supported[] = { NULL, NULL, NULL,
#endif
};
+#ifndef __rtems__
static int supported_map[] = {
+#else /* __rtems__ */
+static const int supported_map[] = {
+#endif /* __rtems__ */
SADB_SATYPE_AH,
SADB_SATYPE_ESP,
SADB_X_SATYPE_IPCOMP,
diff --git a/ipsec-tools/src/libipsec/pfkey_dump.c b/ipsec-tools/src/libipsec/pfkey_dump.c
index 4627ebc8..1c6c0480 100644
--- a/ipsec-tools/src/libipsec/pfkey_dump.c
+++ b/ipsec-tools/src/libipsec/pfkey_dump.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: pfkey_dump.c,v 1.18 2010/12/03 14:32:52 tteras Exp $ */
/* $KAME: pfkey_dump.c,v 1.45 2003/09/08 10:14:56 itojun Exp $ */
@@ -122,7 +124,11 @@ struct val2str {
/*
* Must to be re-written about following strings.
*/
+#ifndef __rtems__
static char *str_satype[] = {
+#else /* __rtems__ */
+static const char *str_satype[] = {
+#endif /* __rtems__ */
"unspec",
"unknown",
"ah",
@@ -137,20 +143,32 @@ static char *str_satype[] = {
"tcp",
};
+#ifndef __rtems__
static char *str_mode[] = {
+#else /* __rtems__ */
+static const char *str_mode[] = {
+#endif /* __rtems__ */
"any",
"transport",
"tunnel",
};
+#ifndef __rtems__
static char *str_state[] = {
+#else /* __rtems__ */
+static const char *str_state[] = {
+#endif /* __rtems__ */
"larval",
"mature",
"dying",
"dead",
};
+#ifndef __rtems__
static struct val2str str_alg_auth[] = {
+#else /* __rtems__ */
+static const struct val2str str_alg_auth[] = {
+#endif /* __rtems__ */
{ SADB_AALG_NONE, "none", },
{ SADB_AALG_MD5HMAC, "hmac-md5", },
{ SADB_AALG_SHA1HMAC, "hmac-sha1", },
@@ -178,7 +196,11 @@ static struct val2str str_alg_auth[] = {
{ -1, NULL, },
};
+#ifndef __rtems__
static struct val2str str_alg_enc[] = {
+#else /* __rtems__ */
+static const struct val2str str_alg_enc[] = {
+#endif /* __rtems__ */
{ SADB_EALG_NONE, "none", },
{ SADB_EALG_DESCBC, "des-cbc", },
{ SADB_EALG_3DESCBC, "3des-cbc", },
@@ -203,7 +225,11 @@ static struct val2str str_alg_enc[] = {
{ -1, NULL, },
};
+#ifndef __rtems__
static struct val2str str_alg_comp[] = {
+#else /* __rtems__ */
+static const struct val2str str_alg_comp[] = {
+#endif /* __rtems__ */
{ SADB_X_CALG_NONE, "none", },
{ SADB_X_CALG_OUI, "oui", },
{ SADB_X_CALG_DEFLATE, "deflate", },
diff --git a/ipsec-tools/src/libipsec/policy_parse.c b/ipsec-tools/src/libipsec/policy_parse.c
index dcfa3d09..c9877cec 100644
--- a/ipsec-tools/src/libipsec/policy_parse.c
+++ b/ipsec-tools/src/libipsec/policy_parse.c
@@ -1,77 +1,106 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.6.2"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
+/* original parser id follows */
+/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
+/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
+
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define YYPATCH 20170201
+
+#define YYEMPTY (-1)
+#define yyclearin (yychar = YYEMPTY)
+#define yyerrok (yyerrflag = 0)
+#define YYRECOVERING() (yyerrflag != 0)
+#define YYENOMEM (-2)
+#define YYEOF 0
+
+#ifndef yyparse
+#define yyparse __libipsecparse
+#endif /* yyparse */
+
+#ifndef yylex
+#define yylex __libipseclex
+#endif /* yylex */
+
+#ifndef yyerror
+#define yyerror __libipsecerror
+#endif /* yyerror */
+
+#ifndef yychar
+#define yychar __libipsecchar
+#endif /* yychar */
+
+#ifndef yyval
+#define yyval __libipsecval
+#endif /* yyval */
+
+#ifndef yylval
+#define yylval __libipseclval
+#endif /* yylval */
+
+#ifndef yydebug
+#define yydebug __libipsecdebug
+#endif /* yydebug */
+
+#ifndef yynerrs
+#define yynerrs __libipsecnerrs
+#endif /* yynerrs */
+
+#ifndef yyerrflag
+#define yyerrflag __libipsecerrflag
+#endif /* yyerrflag */
+
+#ifndef yylhs
+#define yylhs __libipseclhs
+#endif /* yylhs */
+
+#ifndef yylen
+#define yylen __libipseclen
+#endif /* yylen */
+
+#ifndef yydefred
+#define yydefred __libipsecdefred
+#endif /* yydefred */
+
+#ifndef yydgoto
+#define yydgoto __libipsecdgoto
+#endif /* yydgoto */
+
+#ifndef yysindex
+#define yysindex __libipsecsindex
+#endif /* yysindex */
+
+#ifndef yyrindex
+#define yyrindex __libipsecrindex
+#endif /* yyrindex */
+
+#ifndef yygindex
+#define yygindex __libipsecgindex
+#endif /* yygindex */
+
+#ifndef yytable
+#define yytable __libipsectable
+#endif /* yytable */
+
+#ifndef yycheck
+#define yycheck __libipseccheck
+#endif /* yycheck */
+
+#ifndef yyname
+#define yyname __libipsecname
+#endif /* yyname */
+
+#ifndef yyrule
+#define yyrule __libipsecrule
+#endif /* yyrule */
+#define YYPREFIX "__libipsec"
+#define YYPURE 0
-/* Substitute the variable and function names. */
-#define yyparse __libipsecparse
-#define yylex __libipseclex
-#define yyerror __libipsecerror
-#define yylval __libipseclval
-#define yychar __libipsecchar
-#define yydebug __libipsecdebug
-#define yynerrs __libipsecnerrs
-
-/* Copy the first part of user declarations. */
-/* Line 336 of yacc.c */
-#line 65 "policy_parse.y"
-
+#line 66 "../../ipsec-tools/src/libipsec/policy_parse.y"
+#ifdef __rtems__
+#include <machine/rtems-bsd-user-space.h>
+#endif /* __rtems__ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -133,1878 +162,270 @@ extern int yylex __P((void));
extern char *__libipsectext; /*XXX*/
-
-/* Line 336 of yacc.c */
-#line 139 "policy_parse.c"
-
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
-# else
-# define YY_NULL 0
-# endif
-# endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "y.tab.h". */
-#ifndef _LIBIPSEC_Y_TAB_H
-# define _LIBIPSEC_Y_TAB_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int __libipsecdebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- DIR = 258,
- PRIORITY = 259,
- PLUS = 260,
- PRIO_BASE = 261,
- PRIO_OFFSET = 262,
- ACTION = 263,
- PROTOCOL = 264,
- MODE = 265,
- LEVEL = 266,
- LEVEL_SPECIFY = 267,
- IPADDRESS = 268,
- PORT = 269,
- ME = 270,
- ANY = 271,
- SLASH = 272,
- HYPHEN = 273
- };
-#endif
-/* Tokens. */
-#define DIR 258
-#define PRIORITY 259
-#define PLUS 260
-#define PRIO_BASE 261
-#define PRIO_OFFSET 262
-#define ACTION 263
-#define PROTOCOL 264
-#define MODE 265
-#define LEVEL 266
-#define LEVEL_SPECIFY 267
-#define IPADDRESS 268
-#define PORT 269
-#define ME 270
-#define ANY 271
-#define SLASH 272
-#define HYPHEN 273
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 350 of yacc.c */
-#line 129 "policy_parse.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+#line 132 "../../ipsec-tools/src/libipsec/policy_parse.y"
+typedef union {
u_int num;
u_int32_t num32;
struct _val {
int len;
char *buf;
} val;
-
-
-/* Line 350 of yacc.c */
-#line 228 "policy_parse.c"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE __libipseclval;
+#endif /* !YYSTYPE_IS_DECLARED */
+#line 182 "__libipsec.tab.c"
+/* compatibility with bison */
#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int __libipsecparse (void *YYPARSE_PARAM);
-#else
-int __libipsecparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int __libipsecparse (void);
-#else
-int __libipsecparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !_LIBIPSEC_Y_TAB_H */
-
-/* Copy the second part of user declarations. */
-
-/* Line 353 of yacc.c */
-#line 256 "policy_parse.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+/* compatibility with FreeBSD */
+# ifdef YYPARSE_PARAM_TYPE
+# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
# else
-# define YYSIZE_T unsigned int
+# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
#else
-# define YYUSE(e) /* empty */
+# define YYPARSE_DECL() yyparse(void)
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+/* Parameters sent to lex. */
+#ifdef YYLEX_PARAM
+# define YYLEX_DECL() yylex(void *YYLEX_PARAM)
+# define YYLEX yylex(YYLEX_PARAM)
#else
-static int
-YYID (yyi)
- int yyi;
+# define YYLEX_DECL() yylex(void)
+# define YYLEX yylex()
#endif
-{
- return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+/* Parameters sent to yyerror. */
+#ifndef YYERROR_DECL
+#define YYERROR_DECL() yyerror(const char *s)
#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 5
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 48
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 19
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 16
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 34
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 60
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 273
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 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, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 4, 9, 10, 17, 18, 26, 27,
- 34, 35, 44, 45, 54, 56, 57, 60, 68, 75,
- 81, 86, 93, 97, 100, 102, 104, 106, 108, 110,
- 111, 116, 117, 124, 128
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 20, 0, -1, -1, 3, 8, 21, 27, -1, -1,
- 3, 4, 7, 8, 22, 27, -1, -1, 3, 4,
- 18, 7, 8, 23, 27, -1, -1, 3, 4, 6,
- 8, 24, 27, -1, -1, 3, 4, 6, 5, 7,
- 8, 25, 27, -1, -1, 3, 4, 6, 18, 7,
- 8, 26, 27, -1, 3, -1, -1, 27, 28, -1,
- 29, 17, 30, 17, 32, 17, 31, -1, 29, 17,
- 30, 17, 32, 17, -1, 29, 17, 30, 17, 32,
- -1, 29, 17, 30, 17, -1, 29, 17, 30, 17,
- 17, 31, -1, 29, 17, 30, -1, 29, 17, -1,
- 29, -1, 9, -1, 10, -1, 11, -1, 12, -1,
- -1, 13, 33, 18, 13, -1, -1, 13, 14, 34,
- 18, 13, 14, -1, 15, 18, 16, -1, 16, 18,
- 15, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 151, 151, 150, 166, 165, 185, 184, 207, 206,
- 218, 217, 240, 239, 261, 273, 275, 287, 288, 289,
- 290, 291, 292, 293, 297, 304, 308, 312, 316, 323,
- 323, 334, 334, 345, 351
-};
+#ifndef YYERROR_CALL
+#define YYERROR_CALL(msg) yyerror(msg)
#endif
-#if YYDEBUG || YYERROR_VERBOSE || 0
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "DIR", "PRIORITY", "PLUS", "PRIO_BASE",
- "PRIO_OFFSET", "ACTION", "PROTOCOL", "MODE", "LEVEL", "LEVEL_SPECIFY",
- "IPADDRESS", "PORT", "ME", "ANY", "SLASH", "HYPHEN", "$accept",
- "policy_spec", "$@1", "$@2", "$@3", "$@4", "$@5", "$@6", "rules", "rule",
- "protocol", "mode", "level", "addresses", "$@7", "$@8", YY_NULL
+extern int YYPARSE_DECL();
+
+#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
+#define YYERRCODE 256
+typedef int YYINT;
+static const YYINT __libipseclhs[] = { -1,
+ 2, 0, 3, 0, 4, 0, 5, 0, 6, 0,
+ 7, 0, 0, 1, 1, 8, 8, 8, 8, 8,
+ 8, 8, 8, 9, 10, 12, 12, 13, 11, 14,
+ 11, 11, 11,
};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273
+static const YYINT __libipseclen[] = { 2,
+ 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,
};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 19, 21, 20, 22, 20, 23, 20, 24, 20,
- 25, 20, 26, 20, 20, 27, 27, 28, 28, 28,
- 28, 28, 28, 28, 28, 29, 30, 31, 31, 33,
- 32, 34, 32, 32, 32
+static const YYINT __libipsecdefred[] = { 0,
+ 0, 0, 0, 1, 0, 0, 0, 14, 0, 7,
+ 0, 3, 0, 0, 0, 14, 0, 14, 5, 24,
+ 15, 0, 9, 0, 11, 0, 14, 0, 14, 14,
+ 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 30, 0, 0, 0, 26, 27, 20, 0, 0,
+ 0, 32, 33, 16, 0, 29, 0, 31,
};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 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 YYINT __libipsecdgoto[] = { 2,
+ 14, 8, 18, 27, 16, 29, 30, 21, 22, 33,
+ 41, 48, 43, 50,
};
-
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 0, 14, 0, 0, 2, 1, 0, 0, 0, 15,
- 0, 8, 0, 4, 0, 3, 0, 15, 0, 15,
- 6, 25, 16, 24, 10, 9, 12, 5, 15, 23,
- 15, 15, 7, 26, 22, 11, 13, 20, 29, 0,
- 0, 0, 19, 31, 0, 0, 0, 27, 28, 21,
- 18, 0, 0, 33, 34, 17, 0, 30, 0, 32
+static const YYINT __libipsecsindex[] = { -257,
+ -250, 0, -246, 0, -249, -251, -245, 0, -244, 0,
+ -239, 0, -243, -231, -238, 0, -229, 0, 0, 0,
+ 0, -237, 0, -231, 0, -231, 0, -228, 0, 0,
+ -231, 0, -236, -231, -231, -242, -230, -233, -232, -235,
+ -234, 0, -227, -226, -223, 0, 0, 0, -235, -225,
+ -224, 0, 0, 0, -219, 0, -218, 0,
};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 2, 9, 19, 28, 17, 30, 31, 15, 22,
- 23, 34, 49, 42, 44, 51
+static const YYINT __libipsecrindex[] = { 0,
+ 41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 42, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 49, 0, 51, 0, 2, 0, 0,
+ 52, 0, 3, 53, 54, 4, -217, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0, 0, 0, 6, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -18
-static const yytype_int8 yypact[] =
-{
- 6, -3, 4, 1, -18, -18, -2, 2, 8, -18,
- 10, -18, 18, -18, 19, 3, 20, -18, 21, -18,
- -18, -18, -18, 9, -18, 3, -18, 3, -18, 22,
- -18, -18, 3, -18, 13, 3, 3, 5, 17, 15,
- 16, 12, 23, -18, 24, 25, 28, -18, -18, -18,
- 12, 26, 32, -18, -18, -18, 33, -18, 34, -18
+static const YYINT __libipsecgindex[] = { 0,
+ -9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 7, 0, 0,
};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
-{
- -18, -18, -18, -18, -18, -18, -18, -18, -17, -18,
- -18, -18, -15, -18, -18, -18
+#define YYTABLESIZE 269
+static const YYINT __libipsectable[] = { 1,
+ 23, 22, 21, 19, 18, 17, 24, 3, 26, 9,
+ 12, 4, 10, 5, 6, 13, 15, 31, 19, 34,
+ 35, 17, 11, 23, 37, 7, 38, 39, 40, 46,
+ 47, 20, 25, 28, 36, 32, 49, 42, 44, 45,
+ 13, 2, 56, 52, 51, 53, 55, 57, 8, 58,
+ 4, 6, 10, 12, 28, 54, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 23, 22, 21, 19, 18, 17,
};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
- 25, 3, 27, 10, 5, 4, 11, 6, 7, 1,
- 13, 32, 21, 35, 36, 14, 12, 16, 38, 8,
- 39, 40, 41, 47, 48, 18, 29, 20, 24, 26,
- 37, 43, 33, 45, 46, 55, 0, 0, 0, 0,
- 50, 53, 52, 54, 56, 57, 58, 0, 59
+static const YYINT __libipseccheck[] = { 257,
+ 0, 0, 0, 0, 0, 0, 16, 258, 18, 259,
+ 262, 262, 262, 260, 261, 261, 261, 27, 262, 29,
+ 30, 261, 272, 262, 267, 272, 269, 270, 271, 265,
+ 266, 263, 262, 271, 271, 264, 271, 268, 272, 272,
+ 0, 0, 267, 270, 272, 269, 272, 267, 0, 268,
+ 0, 0, 0, 0, 272, 49, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 263, 263, 263, 263, 263, 263,
};
-
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-18))
-
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
-
-static const yytype_int8 yycheck[] =
-{
- 17, 4, 19, 5, 0, 8, 8, 6, 7, 3,
- 8, 28, 9, 30, 31, 7, 18, 7, 13, 18,
- 15, 16, 17, 11, 12, 7, 17, 8, 8, 8,
- 17, 14, 10, 18, 18, 50, -1, -1, -1, -1,
- 17, 16, 18, 15, 18, 13, 13, -1, 14
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 3, 20, 4, 8, 0, 6, 7, 18, 21,
- 5, 8, 18, 8, 7, 27, 7, 24, 7, 22,
- 8, 9, 28, 29, 8, 27, 8, 27, 23, 17,
- 25, 26, 27, 10, 30, 27, 27, 17, 13, 15,
- 16, 17, 32, 14, 33, 18, 18, 11, 12, 31,
- 17, 34, 18, 16, 15, 31, 18, 13, 13, 14
-};
-
-#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 yyerrorlab
-
-
-/* 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. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
-
-/* This macro is provided for backward compatibility. */
-
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
+#define YYFINAL 2
+#ifndef YYDEBUG
+#define YYDEBUG 0
#endif
-
-/* Enable debugging if requested. */
+#define YYMAXTOKEN 272
+#define YYUNDFTOKEN 289
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
#if YYDEBUG
+static const char *const __libipsecname[] = {
+
+"end-of-file",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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"DIR","PRIORITY","PLUS",
+"PRIO_BASE","PRIO_OFFSET","ACTION","PROTOCOL","MODE","LEVEL","LEVEL_SPECIFY",
+"IPADDRESS","PORT","ME","ANY","SLASH","HYPHEN",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+"illegal-symbol",
+};
+static const char *const __libipsecrule[] = {
+"$accept : policy_spec",
+"$$1 :",
+"policy_spec : DIR ACTION $$1 rules",
+"$$2 :",
+"policy_spec : DIR PRIORITY PRIO_OFFSET ACTION $$2 rules",
+"$$3 :",
+"policy_spec : DIR PRIORITY HYPHEN PRIO_OFFSET ACTION $$3 rules",
+"$$4 :",
+"policy_spec : DIR PRIORITY PRIO_BASE ACTION $$4 rules",
+"$$5 :",
+"policy_spec : DIR PRIORITY PRIO_BASE PLUS PRIO_OFFSET ACTION $$5 rules",
+"$$6 :",
+"policy_spec : DIR PRIORITY PRIO_BASE HYPHEN PRIO_OFFSET ACTION $$6 rules",
+"policy_spec : DIR",
+"rules :",
+"rules : rules rule",
+"rule : protocol SLASH mode SLASH addresses SLASH level",
+"rule : protocol SLASH mode SLASH addresses SLASH",
+"rule : protocol SLASH mode SLASH addresses",
+"rule : protocol SLASH mode SLASH",
+"rule : protocol SLASH mode SLASH SLASH level",
+"rule : protocol SLASH mode",
+"rule : protocol SLASH",
+"rule : protocol",
+"protocol : PROTOCOL",
+"mode : MODE",
+"level : LEVEL",
+"level : LEVEL_SPECIFY",
+"$$7 :",
+"addresses : IPADDRESS $$7 HYPHEN IPADDRESS",
+"$$8 :",
+"addresses : IPADDRESS PORT $$8 HYPHEN IPADDRESS PORT",
+"addresses : ME HYPHEN ANY",
+"addresses : ANY HYPHEN ME",
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
+};
#endif
-{
- YYUSE (yyvaluep);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
- {
-
- default:
- break;
- }
-}
-
-
-
-/* The lookahead symbol. */
-int yychar;
+int yydebug;
+int yynerrs;
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
+int yyerrflag;
+int yychar;
+YYSTYPE yyval;
+YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
+/* define the initial stack-sizes */
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- 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;
- yyvsp = yyvs;
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* 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;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 2:
-/* Line 1787 of yacc.c */
-#line 151 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (2)].num);
- p_type = (yyvsp[(2) - (2)].num);
-
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
- p_priority = PRIORITY_DEFAULT;
-#else
- p_priority = 0;
-#endif
-
- if (init_x_policy())
- return -1;
- }
- break;
-
- case 4:
-/* Line 1787 of yacc.c */
-#line 166 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (4)].num);
- p_type = (yyvsp[(4) - (4)].num);
- p_priority_offset = -atol((yyvsp[(3) - (4)].val).buf);
-
- errno = 0;
- 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 6:
-/* Line 1787 of yacc.c */
-#line 185 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (5)].num);
- p_type = (yyvsp[(5) - (5)].num);
-
- errno = 0;
- p_priority_offset = atol((yyvsp[(4) - (5)].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 8:
-/* Line 1787 of yacc.c */
-#line 207 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (4)].num);
- p_type = (yyvsp[(4) - (4)].num);
-
- p_priority = (yyvsp[(3) - (4)].num32);
-
- if (init_x_policy())
- return -1;
- }
- break;
-
- case 10:
-/* Line 1787 of yacc.c */
-#line 218 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (6)].num);
- p_type = (yyvsp[(6) - (6)].num);
-
- errno = 0;
- p_priority_offset = atol((yyvsp[(5) - (6)].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) - (6)].num32) - (u_int32_t) p_priority_offset;
-
- if (init_x_policy())
- return -1;
- }
- break;
-
- case 12:
-/* Line 1787 of yacc.c */
-#line 240 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (6)].num);
- p_type = (yyvsp[(6) - (6)].num);
-
- errno = 0;
- p_priority_offset = atol((yyvsp[(5) - (6)].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) - (6)].num32) + (u_int32_t) p_priority_offset;
-
- if (init_x_policy())
- return -1;
- }
- break;
-
- case 14:
-/* Line 1787 of yacc.c */
-#line 262 "policy_parse.y"
- {
- p_dir = (yyvsp[(1) - (1)].num);
- p_type = 0; /* ignored it by kernel */
-
- p_priority = 0;
-
- if (init_x_policy())
- return -1;
- }
- break;
-
- case 16:
-/* Line 1787 of yacc.c */
-#line 275 "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 23:
-/* Line 1787 of yacc.c */
-#line 293 "policy_parse.y"
- {
- __ipsec_errcode = EIPSEC_FEW_ARGUMENTS;
- return -1;
- }
- break;
-
- case 24:
-/* Line 1787 of yacc.c */
-#line 297 "policy_parse.y"
- {
- __ipsec_errcode = EIPSEC_FEW_ARGUMENTS;
- return -1;
- }
- break;
-
- case 25:
-/* Line 1787 of yacc.c */
-#line 304 "policy_parse.y"
- { p_protocol = (yyvsp[(1) - (1)].num); }
- break;
-
- case 26:
-/* Line 1787 of yacc.c */
-#line 308 "policy_parse.y"
- { p_mode = (yyvsp[(1) - (1)].num); }
- break;
-
- case 27:
-/* Line 1787 of yacc.c */
-#line 312 "policy_parse.y"
- {
- p_level = (yyvsp[(1) - (1)].num);
- p_reqid = 0;
- }
- break;
-
- case 28:
-/* Line 1787 of yacc.c */
-#line 316 "policy_parse.y"
- {
- p_level = IPSEC_LEVEL_UNIQUE;
- p_reqid = atol((yyvsp[(1) - (1)].val).buf); /* atol() is good. */
- }
- break;
-
- case 29:
-/* Line 1787 of yacc.c */
-#line 323 "policy_parse.y"
- {
- p_src = parse_sockaddr(&(yyvsp[(1) - (1)].val), NULL);
- if (p_src == NULL)
- return -1;
- }
- break;
-
- case 30:
-/* Line 1787 of yacc.c */
-#line 329 "policy_parse.y"
- {
- p_dst = parse_sockaddr(&(yyvsp[(4) - (4)].val), NULL);
- if (p_dst == NULL)
- return -1;
- }
- break;
-
- case 31:
-/* Line 1787 of yacc.c */
-#line 334 "policy_parse.y"
- {
- p_src = parse_sockaddr(&(yyvsp[(1) - (2)].val), &(yyvsp[(2) - (2)].val));
- if (p_src == NULL)
- return -1;
- }
- break;
-
- case 32:
-/* Line 1787 of yacc.c */
-#line 340 "policy_parse.y"
- {
- p_dst = parse_sockaddr(&(yyvsp[(5) - (6)].val), &(yyvsp[(6) - (6)].val));
- if (p_dst == NULL)
- return -1;
- }
- break;
-
- case 33:
-/* Line 1787 of yacc.c */
-#line 345 "policy_parse.y"
- {
- if (p_dir != IPSEC_DIR_OUTBOUND) {
- __ipsec_errcode = EIPSEC_INVAL_DIR;
- return -1;
- }
- }
- break;
-
- case 34:
-/* Line 1787 of yacc.c */
-#line 351 "policy_parse.y"
- {
- if (p_dir != IPSEC_DIR_INBOUND) {
- __ipsec_errcode = EIPSEC_INVAL_DIR;
- return -1;
- }
- }
- break;
-
-
-/* Line 1787 of yacc.c */
-#line 1777 "policy_parse.c"
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* 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 - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
#endif
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
-
-
-/* Line 2048 of yacc.c */
-#line 362 "policy_parse.y"
+#define YYINITSTACKSIZE 200
+typedef struct {
+ unsigned stacksize;
+ YYINT *s_base;
+ YYINT *s_mark;
+ YYINT *s_last;
+ YYSTYPE *l_base;
+ YYSTYPE *l_mark;
+} YYSTACKDATA;
+/* variables for the parser stack */
+static YYSTACKDATA yystack;
+#line 366 "../../ipsec-tools/src/libipsec/policy_parse.y"
void
yyerror(msg)
@@ -2245,6 +666,10 @@ policy_parse(msg, msglen)
error = yyparse(); /* it must be set errcode. */
__policy__strbuffer__free__();
+ #ifdef __rtems__
+ /* This frees the p_src and p_dst buffers. */
+ policy_parse_request_init();
+ #endif /* __rtems__ */
if (error) {
if (pbuf != NULL)
@@ -2277,3 +702,495 @@ ipsec_set_policy(msg, msglen)
__ipsec_errcode = EIPSEC_NO_ERROR;
return policy;
}
+#ifdef __rtems__
+
+void
+ipsec_free_policy(ipsec_policy_t buf)
+{
+ free(buf);
+}
+#endif /* __rtems__ */
+#line 714 "__libipsec.tab.c"
+
+#if YYDEBUG
+#include <stdio.h> /* needed for printf */
+#endif
+
+#include <stdlib.h> /* needed for malloc, etc */
+#include <string.h> /* needed for memset */
+
+/* allocate initial stack or double stack size, up to YYMAXDEPTH */
+static int yygrowstack(YYSTACKDATA *data)
+{
+ int i;
+ unsigned newsize;
+ YYINT *newss;
+ YYSTYPE *newvs;
+
+ if ((newsize = data->stacksize) == 0)
+ newsize = YYINITSTACKSIZE;
+ else if (newsize >= YYMAXDEPTH)
+ return YYENOMEM;
+ else if ((newsize *= 2) > YYMAXDEPTH)
+ newsize = YYMAXDEPTH;
+
+ i = (int) (data->s_mark - data->s_base);
+ newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
+ if (newss == 0)
+ return YYENOMEM;
+
+ data->s_base = newss;
+ data->s_mark = newss + i;
+
+ newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
+ if (newvs == 0)
+ return YYENOMEM;
+
+ data->l_base = newvs;
+ data->l_mark = newvs + i;
+
+ data->stacksize = newsize;
+ data->s_last = data->s_base + newsize - 1;
+ return 0;
+}
+
+#if YYPURE || defined(YY_NO_LEAKS)
+static void yyfreestack(YYSTACKDATA *data)
+{
+ free(data->s_base);
+ free(data->l_base);
+ memset(data, 0, sizeof(*data));
+}
+#else
+#define yyfreestack(data) /* nothing */
+#endif
+
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+
+int
+YYPARSE_DECL()
+{
+ int yym, yyn, yystate;
+#if YYDEBUG
+ const char *yys;
+
+ if ((yys = getenv("YYDEBUG")) != 0)
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+#endif
+
+ yym = 0;
+ yyn = 0;
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = YYEMPTY;
+ yystate = 0;
+
+#if YYPURE
+ memset(&yystack, 0, sizeof(yystack));
+#endif
+
+ if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystack.s_mark = yystack.s_base;
+ yystack.l_mark = yystack.l_base;
+ yystate = 0;
+ *yystack.s_mark = 0;
+
+yyloop:
+ if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ }
+ if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ yychar = YYEMPTY;
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag != 0) goto yyinrecovery;
+
+ YYERROR_CALL("syntax error");
+
+ goto yyerrlab; /* redundant goto avoids 'unused label' warning */
+yyerrlab:
+ ++yynerrs;
+
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yystack.s_mark);
+#endif
+ if (yystack.s_mark <= yystack.s_base) goto yyabort;
+ --yystack.s_mark;
+ --yystack.l_mark;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == YYEOF) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = YYEMPTY;
+ goto yyloop;
+ }
+
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ if (yym > 0)
+ yyval = yystack.l_mark[1-yym];
+ else
+ memset(&yyval, 0, sizeof yyval);
+
+ switch (yyn)
+ {
+case 1:
+#line 154 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[-1].num;
+ p_type = yystack.l_mark[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 169 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[-3].num;
+ p_type = yystack.l_mark[0].num;
+ p_priority_offset = -atol(yystack.l_mark[-1].val.buf);
+
+ errno = 0;
+ 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 188 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[-4].num;
+ p_type = yystack.l_mark[0].num;
+
+ errno = 0;
+ p_priority_offset = atol(yystack.l_mark[-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 210 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[-3].num;
+ p_type = yystack.l_mark[0].num;
+
+ p_priority = yystack.l_mark[-1].num32;
+
+ if (init_x_policy())
+ return -1;
+ }
+break;
+case 9:
+#line 221 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[-5].num;
+ p_type = yystack.l_mark[0].num;
+
+ errno = 0;
+ p_priority_offset = atol(yystack.l_mark[-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 = yystack.l_mark[-3].num32 - (u_int32_t) p_priority_offset;
+
+ if (init_x_policy())
+ return -1;
+ }
+break;
+case 11:
+#line 243 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[-5].num;
+ p_type = yystack.l_mark[0].num;
+
+ errno = 0;
+ p_priority_offset = atol(yystack.l_mark[-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 = yystack.l_mark[-3].num32 + (u_int32_t) p_priority_offset;
+
+ if (init_x_policy())
+ return -1;
+ }
+break;
+case 13:
+#line 265 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dir = yystack.l_mark[0].num;
+ p_type = 0; /* ignored it by kernel */
+
+ p_priority = 0;
+
+ if (init_x_policy())
+ return -1;
+ }
+break;
+case 15:
+#line 278 "../../ipsec-tools/src/libipsec/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 296 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ __ipsec_errcode = EIPSEC_FEW_ARGUMENTS;
+ return -1;
+ }
+break;
+case 23:
+#line 300 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ __ipsec_errcode = EIPSEC_FEW_ARGUMENTS;
+ return -1;
+ }
+break;
+case 24:
+#line 307 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ { p_protocol = yystack.l_mark[0].num; }
+break;
+case 25:
+#line 311 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ { p_mode = yystack.l_mark[0].num; }
+break;
+case 26:
+#line 315 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_level = yystack.l_mark[0].num;
+ p_reqid = 0;
+ }
+break;
+case 27:
+#line 319 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_level = IPSEC_LEVEL_UNIQUE;
+ p_reqid = atol(yystack.l_mark[0].val.buf); /* atol() is good. */
+ }
+break;
+case 28:
+#line 326 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_src = parse_sockaddr(&yystack.l_mark[0].val, NULL);
+ if (p_src == NULL)
+ return -1;
+ }
+break;
+case 29:
+#line 332 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dst = parse_sockaddr(&yystack.l_mark[0].val, NULL);
+ if (p_dst == NULL)
+ return -1;
+ }
+break;
+case 30:
+#line 337 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_src = parse_sockaddr(&yystack.l_mark[-1].val, &yystack.l_mark[0].val);
+ if (p_src == NULL)
+ return -1;
+ }
+break;
+case 31:
+#line 343 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ p_dst = parse_sockaddr(&yystack.l_mark[-1].val, &yystack.l_mark[0].val);
+ if (p_dst == NULL)
+ return -1;
+ }
+break;
+case 32:
+#line 348 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ if (p_dir != IPSEC_DIR_OUTBOUND) {
+ __ipsec_errcode = EIPSEC_INVAL_DIR;
+ return -1;
+ }
+ }
+break;
+case 33:
+#line 354 "../../ipsec-tools/src/libipsec/policy_parse.y"
+ {
+ if (p_dir != IPSEC_DIR_INBOUND) {
+ __ipsec_errcode = EIPSEC_INVAL_DIR;
+ return -1;
+ }
+ }
+break;
+#line 1140 "__libipsec.tab.c"
+ }
+ yystack.s_mark -= yym;
+ yystate = *yystack.s_mark;
+ yystack.l_mark -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yystack.s_mark = YYFINAL;
+ *++yystack.l_mark = yyval;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == YYEOF) goto yyaccept;
+ goto yyloop;
+ }
+ if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ *++yystack.s_mark = (YYINT) yystate;
+ *++yystack.l_mark = yyval;
+ goto yyloop;
+
+yyoverflow:
+ YYERROR_CALL("yacc stack overflow");
+
+yyabort:
+ yyfreestack(&yystack);
+ return (1);
+
+yyaccept:
+ yyfreestack(&yystack);
+ return (0);
+}
diff --git a/ipsec-tools/src/libipsec/policy_parse.h b/ipsec-tools/src/libipsec/policy_parse.h
index 113444d3..e2142c05 100644
--- a/ipsec-tools/src/libipsec/policy_parse.h
+++ b/ipsec-tools/src/libipsec/policy_parse.h
@@ -1,125 +1,32 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-#ifndef _LIBIPSEC_POLICY_PARSE_H
-# define _LIBIPSEC_POLICY_PARSE_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
+#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
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-#if YYDEBUG
-extern int __libipsecdebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- DIR = 258,
- PRIORITY = 259,
- PLUS = 260,
- PRIO_BASE = 261,
- PRIO_OFFSET = 262,
- ACTION = 263,
- PROTOCOL = 264,
- MODE = 265,
- LEVEL = 266,
- LEVEL_SPECIFY = 267,
- IPADDRESS = 268,
- PORT = 269,
- ME = 270,
- ANY = 271,
- SLASH = 272,
- HYPHEN = 273
- };
-#endif
-/* Tokens. */
-#define DIR 258
-#define PRIORITY 259
-#define PLUS 260
-#define PRIO_BASE 261
-#define PRIO_OFFSET 262
-#define ACTION 263
-#define PROTOCOL 264
-#define MODE 265
-#define LEVEL 266
-#define LEVEL_SPECIFY 267
-#define IPADDRESS 268
-#define PORT 269
-#define ME 270
-#define ANY 271
-#define SLASH 272
-#define HYPHEN 273
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 2049 of yacc.c */
-#line 129 "policy_parse.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+typedef union {
u_int num;
u_int32_t num32;
struct _val {
int len;
char *buf;
} val;
-
-
-/* Line 2049 of yacc.c */
-#line 103 "policy_parse.h"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
+#endif /* !YYSTYPE_IS_DECLARED */
extern YYSTYPE __libipseclval;
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int __libipsecparse (void *YYPARSE_PARAM);
-#else
-int __libipsecparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int __libipsecparse (void);
-#else
-int __libipsecparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !_LIBIPSEC_POLICY_PARSE_H */
diff --git a/ipsec-tools/src/libipsec/policy_parse.y b/ipsec-tools/src/libipsec/policy_parse.y
index 321f4f06..a7cdca82 100644
--- a/ipsec-tools/src/libipsec/policy_parse.y
+++ b/ipsec-tools/src/libipsec/policy_parse.y
@@ -63,6 +63,9 @@
*/
%{
+#ifdef __rtems__
+#include <machine/rtems-bsd-user-space.h>
+#endif /* __rtems__ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -600,6 +603,10 @@ policy_parse(msg, msglen)
error = yyparse(); /* it must be set errcode. */
__policy__strbuffer__free__();
+ #ifdef __rtems__
+ /* This frees the p_src and p_dst buffers. */
+ policy_parse_request_init();
+ #endif /* __rtems__ */
if (error) {
if (pbuf != NULL)
@@ -632,3 +639,11 @@ ipsec_set_policy(msg, msglen)
__ipsec_errcode = EIPSEC_NO_ERROR;
return policy;
}
+#ifdef __rtems__
+
+void
+ipsec_free_policy(ipsec_policy_t buf)
+{
+ free(buf);
+}
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/libipsec/policy_token.c b/ipsec-tools/src/libipsec/policy_token.c
index 1728394c..8192cc49 100644
--- a/ipsec-tools/src/libipsec/policy_token.c
+++ b/ipsec-tools/src/libipsec/policy_token.c
@@ -1,6 +1,5 @@
-#line 2 "policy_token.c"
-#line 4 "policy_token.c"
+#line 3 "<stdout>"
#define YY_INT_ALIGNED short int
@@ -35,6 +34,16 @@
/* First, we deal with platform-specific or compiler-specific issues. */
+#if defined(__FreeBSD__)
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+#include <sys/cdefs.h>
+#include <stdint.h>
+#else
+#define __dead2
+#endif
+
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
@@ -50,7 +59,8 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__FreeBSD__) || \
+ (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -161,7 +171,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
+#define YY_BUF_SIZE 1024
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -283,6 +293,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+#define yy_current_buffer YY_CURRENT_BUFFER
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
@@ -371,7 +382,7 @@ extern char *__libipsectext;
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static void yy_fatal_error (yyconst char msg[] ) __dead2;
/* Done after the current pattern has been matched and before the
* corresponding action - sets up __libipsectext.
@@ -565,7 +576,7 @@ int __libipsec_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *__libipsectext;
-#line 1 "policy_token.l"
+#line 1 "../../ipsec-tools/src/libipsec/policy_token.l"
/* $NetBSD: policy_token.l,v 1.7 2007/07/18 12:07:50 vanhu Exp $ */
/* Id: policy_token.l,v 1.12 2005/05/05 12:32:18 manubsd Exp */
/*
@@ -596,7 +607,10 @@ char *__libipsectext;
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#line 35 "policy_token.l"
+#line 35 "../../ipsec-tools/src/libipsec/policy_token.l"
+#ifdef __rtems__
+#include <machine/rtems-bsd-user-space.h>
+#endif /* __rtems__ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -626,7 +640,7 @@ char *__libipsectext;
int __libipseclex __P((void));
/* common section */
-#line 630 "policy_token.c"
+#line 644 "<stdout>"
#define INITIAL 0
@@ -802,14 +816,14 @@ extern int __libipseclex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
-#line 97 "policy_token.l"
+#line 100 "../../ipsec-tools/src/libipsec/policy_token.l"
-#line 813 "policy_token.c"
+#line 827 "<stdout>"
if ( !(yy_init) )
{
@@ -853,7 +867,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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;
@@ -894,17 +908,17 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 99 "policy_token.l"
+#line 102 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_DIR_INBOUND; return(DIR); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 100 "policy_token.l"
+#line 103 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_DIR_OUTBOUND; return(DIR); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 101 "policy_token.l"
+#line 104 "../../ipsec-tools/src/libipsec/policy_token.l"
{
#ifdef HAVE_POLICY_FWD
yylval.num = IPSEC_DIR_FWD; return(DIR);
@@ -915,37 +929,37 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 109 "policy_token.l"
+#line 112 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(PRIORITY); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 110 "policy_token.l"
+#line 113 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(PRIORITY); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 111 "policy_token.l"
+#line 114 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num32 = PRIORITY_LOW; return(PRIO_BASE); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 112 "policy_token.l"
+#line 115 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num32 = PRIORITY_DEFAULT; return(PRIO_BASE); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 113 "policy_token.l"
+#line 116 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num32 = PRIORITY_HIGH; return(PRIO_BASE); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 114 "policy_token.l"
+#line 117 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(PLUS); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 115 "policy_token.l"
+#line 118 "../../ipsec-tools/src/libipsec/policy_token.l"
{
yylval.val.len = strlen(__libipsectext);
yylval.val.buf = __libipsectext;
@@ -954,82 +968,82 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 121 "policy_token.l"
+#line 124 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_POLICY_DISCARD; return(ACTION); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 122 "policy_token.l"
+#line 125 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_POLICY_NONE; return(ACTION); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 123 "policy_token.l"
+#line 126 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_POLICY_IPSEC; return(ACTION); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 124 "policy_token.l"
+#line 127 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_POLICY_BYPASS; return(ACTION); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 125 "policy_token.l"
+#line 128 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_POLICY_ENTRUST; return(ACTION); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 127 "policy_token.l"
+#line 130 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPPROTO_ESP; return(PROTOCOL); }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 128 "policy_token.l"
+#line 131 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPPROTO_AH; return(PROTOCOL); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 129 "policy_token.l"
+#line 132 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPPROTO_IPCOMP; return(PROTOCOL); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 131 "policy_token.l"
+#line 134 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_MODE_TRANSPORT; return(MODE); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 132 "policy_token.l"
+#line 135 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_MODE_TUNNEL; return(MODE); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 134 "policy_token.l"
+#line 137 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(ME); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 135 "policy_token.l"
+#line 138 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(ANY); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 137 "policy_token.l"
+#line 140 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_LEVEL_DEFAULT; return(LEVEL); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 138 "policy_token.l"
+#line 141 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_LEVEL_USE; return(LEVEL); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 139 "policy_token.l"
+#line 142 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_LEVEL_REQUIRE; return(LEVEL); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 140 "policy_token.l"
+#line 143 "../../ipsec-tools/src/libipsec/policy_token.l"
{
yylval.val.len = strlen(__libipsectext + 7);
yylval.val.buf = __libipsectext + 7;
@@ -1038,17 +1052,17 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 145 "policy_token.l"
+#line 148 "../../ipsec-tools/src/libipsec/policy_token.l"
{ yylval.num = IPSEC_LEVEL_UNIQUE; return(LEVEL); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 146 "policy_token.l"
+#line 149 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(SLASH); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 148 "policy_token.l"
+#line 151 "../../ipsec-tools/src/libipsec/policy_token.l"
{
yylval.val.len = strlen(__libipsectext);
yylval.val.buf = __libipsectext;
@@ -1057,12 +1071,12 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 154 "policy_token.l"
+#line 157 "../../ipsec-tools/src/libipsec/policy_token.l"
{ return(HYPHEN); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 156 "policy_token.l"
+#line 159 "../../ipsec-tools/src/libipsec/policy_token.l"
{
/* Remove leading '[' and trailing ']' */
yylval.val.buf = __libipsectext + 1;
@@ -1073,21 +1087,21 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 164 "policy_token.l"
+#line 167 "../../ipsec-tools/src/libipsec/policy_token.l"
{ ; }
YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
-#line 165 "policy_token.l"
+#line 168 "../../ipsec-tools/src/libipsec/policy_token.l"
{ ; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 167 "policy_token.l"
+#line 170 "../../ipsec-tools/src/libipsec/policy_token.l"
ECHO;
YY_BREAK
-#line 1091 "policy_token.c"
+#line 1105 "<stdout>"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1229,9 +1243,9 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1363,14 +1377,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ 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);
+ 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;
@@ -1395,10 +1409,10 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1814,7 +1828,7 @@ YY_BUFFER_STATE __libipsec_scan_bytes (yyconst char * yybytes, yy_size_t _yyby
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2003,7 +2017,7 @@ int __libipseclex_destroy (void)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2012,7 +2026,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2044,7 +2058,7 @@ void __libipsecfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 167 "policy_token.l"
+#line 170 "../../ipsec-tools/src/libipsec/policy_token.l"
diff --git a/ipsec-tools/src/libipsec/policy_token.l b/ipsec-tools/src/libipsec/policy_token.l
index 243b6785..b8f8ffc2 100644
--- a/ipsec-tools/src/libipsec/policy_token.l
+++ b/ipsec-tools/src/libipsec/policy_token.l
@@ -32,6 +32,9 @@
*/
%{
+#ifdef __rtems__
+#include <machine/rtems-bsd-user-space.h>
+#endif /* __rtems__ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/ipsec-tools/src/libipsec/test-policy.c b/ipsec-tools/src/libipsec/test-policy.c
index a6e6efc4..8ffeec0b 100644
--- a/ipsec-tools/src/libipsec/test-policy.c
+++ b/ipsec-tools/src/libipsec/test-policy.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: test-policy.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $KAME: test-policy.c,v 1.16 2003/08/26 03:24:08 itojun Exp $ */
@@ -51,7 +53,13 @@
struct req_t {
int result; /* expected result; 0:ok 1:ng */
char *str;
+#ifndef __rtems__
} reqs[] = {
+#else /* __rtems__ */
+};
+
+static const struct req_t reqs[] = {
+#endif /* __rtems__ */
{ 0, "out ipsec" },
{ 1, "must_error" },
{ 1, "in ipsec must_error" },
@@ -124,7 +132,11 @@ test1()
int
test1sub1(req)
+#ifndef __rtems__
struct req_t *req;
+#else /* __rtems__ */
+ const struct req_t *req;
+#endif /* __rtems__ */
{
char *buf;
diff --git a/ipsec-tools/src/racoon/admin.c b/ipsec-tools/src/racoon/admin.c
index 4b1875bc..4f195ca3 100644
--- a/ipsec-tools/src/racoon/admin.c
+++ b/ipsec-tools/src/racoon/admin.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: admin.c,v 1.38.4.1 2013/06/03 05:49:59 tteras Exp $ */
/* Id: admin.c,v 1.25 2006/04/06 14:31:04 manubsd Exp */
@@ -773,3 +779,6 @@ admin_close()
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-admin-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/algorithm.c b/ipsec-tools/src/racoon/algorithm.c
index 3fd50f6e..e3552674 100644
--- a/ipsec-tools/src/racoon/algorithm.c
+++ b/ipsec-tools/src/racoon/algorithm.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: algorithm.c,v 1.8 2006/10/06 12:02:27 manu Exp $ */
/* Id: algorithm.c,v 1.15 2006/05/23 20:23:09 manubsd Exp */
@@ -955,3 +961,6 @@ algclass2doi(class)
/*NOTREACHED*/
return -1;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-algorithm-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/algorithm.h b/ipsec-tools/src/racoon/algorithm.h
index 8b631b66..5e5fa3ee 100644
--- a/ipsec-tools/src/racoon/algorithm.h
+++ b/ipsec-tools/src/racoon/algorithm.h
@@ -34,7 +34,11 @@
#ifndef _ALGORITHM_H
#define _ALGORITHM_H
+#ifndef __rtems__
#include <gnuc.h>
+#else /* __rtems__ */
+#include "gnuc.h"
+#endif /* __rtems__ */
/* algorithm class */
enum {
diff --git a/ipsec-tools/src/racoon/backupsa.c b/ipsec-tools/src/racoon/backupsa.c
index 82d74ca8..67ec973f 100644
--- a/ipsec-tools/src/racoon/backupsa.c
+++ b/ipsec-tools/src/racoon/backupsa.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: backupsa.c,v 1.10 2010/04/02 15:15:00 christos Exp $ */
/* $KAME: backupsa.c,v 1.16 2001/12/31 20:13:40 thorpej Exp $ */
@@ -36,6 +42,9 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
+#ifdef __rtems__
+#define strtouq strtoull
+#endif /* __rtems__ */
#include <stdlib.h>
#include <stdio.h>
@@ -467,3 +476,6 @@ main()
exit(0);
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-backupsa-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/cfparse.c b/ipsec-tools/src/racoon/cfparse.c
index 19c60e78..24ef12da 100644
--- a/ipsec-tools/src/racoon/cfparse.c
+++ b/ipsec-tools/src/racoon/cfparse.c
@@ -1,70 +1,103 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.6.2"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-
-
+/* original parser id follows */
+/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
+/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
+
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define YYPATCH 20170201
+
+#define YYEMPTY (-1)
+#define yyclearin (yychar = YYEMPTY)
+#define yyerrok (yyerrflag = 0)
+#define YYRECOVERING() (yyerrflag != 0)
+#define YYENOMEM (-2)
+#define YYEOF 0
+
+#ifndef yyparse
+#define yyparse racoonyyparse
+#endif /* yyparse */
+
+#ifndef yylex
+#define yylex racoonyylex
+#endif /* yylex */
+
+#ifndef yyerror
+#define yyerror racoonyyerror
+#endif /* yyerror */
+
+#ifndef yychar
+#define yychar racoonyychar
+#endif /* yychar */
+
+#ifndef yyval
+#define yyval racoonyyval
+#endif /* yyval */
+
+#ifndef yylval
+#define yylval racoonyylval
+#endif /* yylval */
+
+#ifndef yydebug
+#define yydebug racoonyydebug
+#endif /* yydebug */
+
+#ifndef yynerrs
+#define yynerrs racoonyynerrs
+#endif /* yynerrs */
+
+#ifndef yyerrflag
+#define yyerrflag racoonyyerrflag
+#endif /* yyerrflag */
+
+#ifndef yylhs
+#define yylhs racoonyylhs
+#endif /* yylhs */
+
+#ifndef yylen
+#define yylen racoonyylen
+#endif /* yylen */
+
+#ifndef yydefred
+#define yydefred racoonyydefred
+#endif /* yydefred */
+
+#ifndef yydgoto
+#define yydgoto racoonyydgoto
+#endif /* yydgoto */
+
+#ifndef yysindex
+#define yysindex racoonyysindex
+#endif /* yysindex */
+
+#ifndef yyrindex
+#define yyrindex racoonyyrindex
+#endif /* yyrindex */
+
+#ifndef yygindex
+#define yygindex racoonyygindex
+#endif /* yygindex */
+
+#ifndef yytable
+#define yytable racoonyytable
+#endif /* yytable */
+
+#ifndef yycheck
+#define yycheck racoonyycheck
+#endif /* yycheck */
+
+#ifndef yyname
+#define yyname racoonyyname
+#endif /* yyname */
+
+#ifndef yyrule
+#define yyrule racoonyyrule
+#endif /* yyrule */
+#define YYPREFIX "racoonyy"
-/* Copy the first part of user declarations. */
-/* Line 336 of yacc.c */
-#line 5 "cfparse.y"
+#define YYPURE 0
+#line 6 "../../ipsec-tools/src/racoon/cfparse.y"
/*
* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 and 2003 WIDE Project.
* All rights reserved.
@@ -304,2596 +337,1991 @@ static int process_rmconf()
return 0;
}
-
-/* Line 336 of yacc.c */
-#line 310 "cfparse.c"
-
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
-# else
-# define YY_NULL 0
-# endif
-# endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "y.tab.h". */
-#ifndef YY_Y_TAB_H
-# define YY_Y_TAB_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int yydebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- PRIVSEP = 258,
- USER = 259,
- GROUP = 260,
- CHROOT = 261,
- PATH = 262,
- PATHTYPE = 263,
- INCLUDE = 264,
- PFKEY_BUFFER = 265,
- LOGGING = 266,
- LOGLEV = 267,
- PADDING = 268,
- PAD_RANDOMIZE = 269,
- PAD_RANDOMIZELEN = 270,
- PAD_MAXLEN = 271,
- PAD_STRICT = 272,
- PAD_EXCLTAIL = 273,
- LISTEN = 274,
- X_ISAKMP = 275,
- X_ISAKMP_NATT = 276,
- X_ADMIN = 277,
- STRICT_ADDRESS = 278,
- ADMINSOCK = 279,
- DISABLED = 280,
- LDAPCFG = 281,
- LDAP_HOST = 282,
- LDAP_PORT = 283,
- LDAP_PVER = 284,
- LDAP_BASE = 285,
- LDAP_BIND_DN = 286,
- LDAP_BIND_PW = 287,
- LDAP_SUBTREE = 288,
- LDAP_ATTR_USER = 289,
- LDAP_ATTR_ADDR = 290,
- LDAP_ATTR_MASK = 291,
- LDAP_ATTR_GROUP = 292,
- LDAP_ATTR_MEMBER = 293,
- RADCFG = 294,
- RAD_AUTH = 295,
- RAD_ACCT = 296,
- RAD_TIMEOUT = 297,
- RAD_RETRIES = 298,
- MODECFG = 299,
- CFG_NET4 = 300,
- CFG_MASK4 = 301,
- CFG_DNS4 = 302,
- CFG_NBNS4 = 303,
- CFG_DEFAULT_DOMAIN = 304,
- CFG_AUTH_SOURCE = 305,
- CFG_AUTH_GROUPS = 306,
- CFG_SYSTEM = 307,
- CFG_RADIUS = 308,
- CFG_PAM = 309,
- CFG_LDAP = 310,
- CFG_LOCAL = 311,
- CFG_NONE = 312,
- CFG_GROUP_SOURCE = 313,
- CFG_ACCOUNTING = 314,
- CFG_CONF_SOURCE = 315,
- CFG_MOTD = 316,
- CFG_POOL_SIZE = 317,
- CFG_AUTH_THROTTLE = 318,
- CFG_SPLIT_NETWORK = 319,
- CFG_SPLIT_LOCAL = 320,
- CFG_SPLIT_INCLUDE = 321,
- CFG_SPLIT_DNS = 322,
- CFG_PFS_GROUP = 323,
- CFG_SAVE_PASSWD = 324,
- RETRY = 325,
- RETRY_COUNTER = 326,
- RETRY_INTERVAL = 327,
- RETRY_PERSEND = 328,
- RETRY_PHASE1 = 329,
- RETRY_PHASE2 = 330,
- NATT_KA = 331,
- ALGORITHM_CLASS = 332,
- ALGORITHMTYPE = 333,
- STRENGTHTYPE = 334,
- SAINFO = 335,
- FROM = 336,
- REMOTE = 337,
- ANONYMOUS = 338,
- CLIENTADDR = 339,
- INHERIT = 340,
- REMOTE_ADDRESS = 341,
- EXCHANGE_MODE = 342,
- EXCHANGETYPE = 343,
- DOI = 344,
- DOITYPE = 345,
- SITUATION = 346,
- SITUATIONTYPE = 347,
- CERTIFICATE_TYPE = 348,
- CERTTYPE = 349,
- PEERS_CERTFILE = 350,
- CA_TYPE = 351,
- VERIFY_CERT = 352,
- SEND_CERT = 353,
- SEND_CR = 354,
- MATCH_EMPTY_CR = 355,
- IDENTIFIERTYPE = 356,
- IDENTIFIERQUAL = 357,
- MY_IDENTIFIER = 358,
- PEERS_IDENTIFIER = 359,
- VERIFY_IDENTIFIER = 360,
- DNSSEC = 361,
- CERT_X509 = 362,
- CERT_PLAINRSA = 363,
- NONCE_SIZE = 364,
- DH_GROUP = 365,
- KEEPALIVE = 366,
- PASSIVE = 367,
- INITIAL_CONTACT = 368,
- NAT_TRAVERSAL = 369,
- REMOTE_FORCE_LEVEL = 370,
- PROPOSAL_CHECK = 371,
- PROPOSAL_CHECK_LEVEL = 372,
- GENERATE_POLICY = 373,
- GENERATE_LEVEL = 374,
- SUPPORT_PROXY = 375,
- PROPOSAL = 376,
- EXEC_PATH = 377,
- EXEC_COMMAND = 378,
- EXEC_SUCCESS = 379,
- EXEC_FAILURE = 380,
- GSS_ID = 381,
- GSS_ID_ENC = 382,
- GSS_ID_ENCTYPE = 383,
- COMPLEX_BUNDLE = 384,
- DPD = 385,
- DPD_DELAY = 386,
- DPD_RETRY = 387,
- DPD_MAXFAIL = 388,
- PH1ID = 389,
- XAUTH_LOGIN = 390,
- WEAK_PHASE1_CHECK = 391,
- REKEY = 392,
- PREFIX = 393,
- PORT = 394,
- PORTANY = 395,
- UL_PROTO = 396,
- ANY = 397,
- IKE_FRAG = 398,
- ESP_FRAG = 399,
- MODE_CFG = 400,
- PFS_GROUP = 401,
- LIFETIME = 402,
- LIFETYPE_TIME = 403,
- LIFETYPE_BYTE = 404,
- STRENGTH = 405,
- REMOTEID = 406,
- SCRIPT = 407,
- PHASE1_UP = 408,
- PHASE1_DOWN = 409,
- PHASE1_DEAD = 410,
- NUMBER = 411,
- SWITCH = 412,
- BOOLEAN = 413,
- HEXSTRING = 414,
- QUOTEDSTRING = 415,
- ADDRSTRING = 416,
- ADDRRANGE = 417,
- UNITTYPE_BYTE = 418,
- UNITTYPE_KBYTES = 419,
- UNITTYPE_MBYTES = 420,
- UNITTYPE_TBYTES = 421,
- UNITTYPE_SEC = 422,
- UNITTYPE_MIN = 423,
- UNITTYPE_HOUR = 424,
- EOS = 425,
- BOC = 426,
- EOC = 427,
- COMMA = 428
- };
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-/* Tokens. */
-#define PRIVSEP 258
-#define USER 259
-#define GROUP 260
-#define CHROOT 261
-#define PATH 262
-#define PATHTYPE 263
-#define INCLUDE 264
-#define PFKEY_BUFFER 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 LDAPCFG 281
-#define LDAP_HOST 282
-#define LDAP_PORT 283
-#define LDAP_PVER 284
-#define LDAP_BASE 285
-#define LDAP_BIND_DN 286
-#define LDAP_BIND_PW 287
-#define LDAP_SUBTREE 288
-#define LDAP_ATTR_USER 289
-#define LDAP_ATTR_ADDR 290
-#define LDAP_ATTR_MASK 291
-#define LDAP_ATTR_GROUP 292
-#define LDAP_ATTR_MEMBER 293
-#define RADCFG 294
-#define RAD_AUTH 295
-#define RAD_ACCT 296
-#define RAD_TIMEOUT 297
-#define RAD_RETRIES 298
-#define MODECFG 299
-#define CFG_NET4 300
-#define CFG_MASK4 301
-#define CFG_DNS4 302
-#define CFG_NBNS4 303
-#define CFG_DEFAULT_DOMAIN 304
-#define CFG_AUTH_SOURCE 305
-#define CFG_AUTH_GROUPS 306
-#define CFG_SYSTEM 307
-#define CFG_RADIUS 308
-#define CFG_PAM 309
-#define CFG_LDAP 310
-#define CFG_LOCAL 311
-#define CFG_NONE 312
-#define CFG_GROUP_SOURCE 313
-#define CFG_ACCOUNTING 314
-#define CFG_CONF_SOURCE 315
-#define CFG_MOTD 316
-#define CFG_POOL_SIZE 317
-#define CFG_AUTH_THROTTLE 318
-#define CFG_SPLIT_NETWORK 319
-#define CFG_SPLIT_LOCAL 320
-#define CFG_SPLIT_INCLUDE 321
-#define CFG_SPLIT_DNS 322
-#define CFG_PFS_GROUP 323
-#define CFG_SAVE_PASSWD 324
-#define RETRY 325
-#define RETRY_COUNTER 326
-#define RETRY_INTERVAL 327
-#define RETRY_PERSEND 328
-#define RETRY_PHASE1 329
-#define RETRY_PHASE2 330
-#define NATT_KA 331
-#define ALGORITHM_CLASS 332
-#define ALGORITHMTYPE 333
-#define STRENGTHTYPE 334
-#define SAINFO 335
-#define FROM 336
-#define REMOTE 337
-#define ANONYMOUS 338
-#define CLIENTADDR 339
-#define INHERIT 340
-#define REMOTE_ADDRESS 341
-#define EXCHANGE_MODE 342
-#define EXCHANGETYPE 343
-#define DOI 344
-#define DOITYPE 345
-#define SITUATION 346
-#define SITUATIONTYPE 347
-#define CERTIFICATE_TYPE 348
-#define CERTTYPE 349
-#define PEERS_CERTFILE 350
-#define CA_TYPE 351
-#define VERIFY_CERT 352
-#define SEND_CERT 353
-#define SEND_CR 354
-#define MATCH_EMPTY_CR 355
-#define IDENTIFIERTYPE 356
-#define IDENTIFIERQUAL 357
-#define MY_IDENTIFIER 358
-#define PEERS_IDENTIFIER 359
-#define VERIFY_IDENTIFIER 360
-#define DNSSEC 361
-#define CERT_X509 362
-#define CERT_PLAINRSA 363
-#define NONCE_SIZE 364
-#define DH_GROUP 365
-#define KEEPALIVE 366
-#define PASSIVE 367
-#define INITIAL_CONTACT 368
-#define NAT_TRAVERSAL 369
-#define REMOTE_FORCE_LEVEL 370
-#define PROPOSAL_CHECK 371
-#define PROPOSAL_CHECK_LEVEL 372
-#define GENERATE_POLICY 373
-#define GENERATE_LEVEL 374
-#define SUPPORT_PROXY 375
-#define PROPOSAL 376
-#define EXEC_PATH 377
-#define EXEC_COMMAND 378
-#define EXEC_SUCCESS 379
-#define EXEC_FAILURE 380
-#define GSS_ID 381
-#define GSS_ID_ENC 382
-#define GSS_ID_ENCTYPE 383
-#define COMPLEX_BUNDLE 384
-#define DPD 385
-#define DPD_DELAY 386
-#define DPD_RETRY 387
-#define DPD_MAXFAIL 388
-#define PH1ID 389
-#define XAUTH_LOGIN 390
-#define WEAK_PHASE1_CHECK 391
-#define REKEY 392
-#define PREFIX 393
-#define PORT 394
-#define PORTANY 395
-#define UL_PROTO 396
-#define ANY 397
-#define IKE_FRAG 398
-#define ESP_FRAG 399
-#define MODE_CFG 400
-#define PFS_GROUP 401
-#define LIFETIME 402
-#define LIFETYPE_TIME 403
-#define LIFETYPE_BYTE 404
-#define STRENGTH 405
-#define REMOTEID 406
-#define SCRIPT 407
-#define PHASE1_UP 408
-#define PHASE1_DOWN 409
-#define PHASE1_DEAD 410
-#define NUMBER 411
-#define SWITCH 412
-#define BOOLEAN 413
-#define HEXSTRING 414
-#define QUOTEDSTRING 415
-#define ADDRSTRING 416
-#define ADDRRANGE 417
-#define UNITTYPE_BYTE 418
-#define UNITTYPE_KBYTES 419
-#define UNITTYPE_MBYTES 420
-#define UNITTYPE_TBYTES 421
-#define UNITTYPE_SEC 422
-#define UNITTYPE_MIN 423
-#define UNITTYPE_HOUR 424
-#define EOS 425
-#define BOC 426
-#define EOC 427
-#define COMMA 428
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 350 of yacc.c */
-#line 247 "cfparse.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+#line 247 "../../ipsec-tools/src/racoon/cfparse.y"
+typedef union {
unsigned long num;
vchar_t *val;
struct remoteconf *rmconf;
struct sockaddr *saddr;
struct sainfoalg *alg;
-
-
-/* Line 350 of yacc.c */
-#line 708 "cfparse.c"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
+#endif /* !YYSTYPE_IS_DECLARED */
+#line 356 "racoonyy.tab.c"
+/* compatibility with bison */
#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
+/* compatibility with FreeBSD */
+# ifdef YYPARSE_PARAM_TYPE
+# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
+# else
+# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
+# endif
#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !YY_Y_TAB_H */
-
-/* Copy the second part of user declarations. */
-
-/* Line 353 of yacc.c */
-#line 736 "cfparse.c"
-
-#ifdef short
-# undef short
+# define YYPARSE_DECL() yyparse(void)
#endif
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
+/* Parameters sent to lex. */
+#ifdef YYLEX_PARAM
+# define YYLEX_DECL() yylex(void *YYLEX_PARAM)
+# define YYLEX yylex(YYLEX_PARAM)
#else
-typedef unsigned char yytype_uint8;
+# define YYLEX_DECL() yylex(void)
+# define YYLEX yylex()
#endif
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
+/* Parameters sent to yyerror. */
+#ifndef YYERROR_DECL
+#define YYERROR_DECL() yyerror(const char *s)
#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
+#ifndef YYERROR_CALL
+#define YYERROR_CALL(msg) yyerror(msg)
#endif
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
+extern int YYPARSE_DECL();
+
+#define PRIVSEP 257
+#define USER 258
+#define GROUP 259
+#define CHROOT 260
+#define PATH 261
+#define PATHTYPE 262
+#define INCLUDE 263
+#define PFKEY_BUFFER 264
+#define LOGGING 265
+#define LOGLEV 266
+#define PADDING 267
+#define PAD_RANDOMIZE 268
+#define PAD_RANDOMIZELEN 269
+#define PAD_MAXLEN 270
+#define PAD_STRICT 271
+#define PAD_EXCLTAIL 272
+#define LISTEN 273
+#define X_ISAKMP 274
+#define X_ISAKMP_NATT 275
+#define X_ADMIN 276
+#define STRICT_ADDRESS 277
+#define ADMINSOCK 278
+#define DISABLED 279
+#define LDAPCFG 280
+#define LDAP_HOST 281
+#define LDAP_PORT 282
+#define LDAP_PVER 283
+#define LDAP_BASE 284
+#define LDAP_BIND_DN 285
+#define LDAP_BIND_PW 286
+#define LDAP_SUBTREE 287
+#define LDAP_ATTR_USER 288
+#define LDAP_ATTR_ADDR 289
+#define LDAP_ATTR_MASK 290
+#define LDAP_ATTR_GROUP 291
+#define LDAP_ATTR_MEMBER 292
+#define RADCFG 293
+#define RAD_AUTH 294
+#define RAD_ACCT 295
+#define RAD_TIMEOUT 296
+#define RAD_RETRIES 297
+#define MODECFG 298
+#define CFG_NET4 299
+#define CFG_MASK4 300
+#define CFG_DNS4 301
+#define CFG_NBNS4 302
+#define CFG_DEFAULT_DOMAIN 303
+#define CFG_AUTH_SOURCE 304
+#define CFG_AUTH_GROUPS 305
+#define CFG_SYSTEM 306
+#define CFG_RADIUS 307
+#define CFG_PAM 308
+#define CFG_LDAP 309
+#define CFG_LOCAL 310
+#define CFG_NONE 311
+#define CFG_GROUP_SOURCE 312
+#define CFG_ACCOUNTING 313
+#define CFG_CONF_SOURCE 314
+#define CFG_MOTD 315
+#define CFG_POOL_SIZE 316
+#define CFG_AUTH_THROTTLE 317
+#define CFG_SPLIT_NETWORK 318
+#define CFG_SPLIT_LOCAL 319
+#define CFG_SPLIT_INCLUDE 320
+#define CFG_SPLIT_DNS 321
+#define CFG_PFS_GROUP 322
+#define CFG_SAVE_PASSWD 323
+#define RETRY 324
+#define RETRY_COUNTER 325
+#define RETRY_INTERVAL 326
+#define RETRY_PERSEND 327
+#define RETRY_PHASE1 328
+#define RETRY_PHASE2 329
+#define NATT_KA 330
+#define ALGORITHM_CLASS 331
+#define ALGORITHMTYPE 332
+#define STRENGTHTYPE 333
+#define SAINFO 334
+#define FROM 335
+#define REMOTE 336
+#define ANONYMOUS 337
+#define CLIENTADDR 338
+#define INHERIT 339
+#define REMOTE_ADDRESS 340
+#define EXCHANGE_MODE 341
+#define EXCHANGETYPE 342
+#define DOI 343
+#define DOITYPE 344
+#define SITUATION 345
+#define SITUATIONTYPE 346
+#define CERTIFICATE_TYPE 347
+#define CERTTYPE 348
+#define PEERS_CERTFILE 349
+#define CA_TYPE 350
+#define VERIFY_CERT 351
+#define SEND_CERT 352
+#define SEND_CR 353
+#define MATCH_EMPTY_CR 354
+#define IDENTIFIERTYPE 355
+#define IDENTIFIERQUAL 356
+#define MY_IDENTIFIER 357
+#define PEERS_IDENTIFIER 358
+#define VERIFY_IDENTIFIER 359
+#define DNSSEC 360
+#define CERT_X509 361
+#define CERT_PLAINRSA 362
+#define NONCE_SIZE 363
+#define DH_GROUP 364
+#define KEEPALIVE 365
+#define PASSIVE 366
+#define INITIAL_CONTACT 367
+#define NAT_TRAVERSAL 368
+#define REMOTE_FORCE_LEVEL 369
+#define PROPOSAL_CHECK 370
+#define PROPOSAL_CHECK_LEVEL 371
+#define GENERATE_POLICY 372
+#define GENERATE_LEVEL 373
+#define SUPPORT_PROXY 374
+#define PROPOSAL 375
+#define EXEC_PATH 376
+#define EXEC_COMMAND 377
+#define EXEC_SUCCESS 378
+#define EXEC_FAILURE 379
+#define GSS_ID 380
+#define GSS_ID_ENC 381
+#define GSS_ID_ENCTYPE 382
+#define COMPLEX_BUNDLE 383
+#define DPD 384
+#define DPD_DELAY 385
+#define DPD_RETRY 386
+#define DPD_MAXFAIL 387
+#define PH1ID 388
+#define XAUTH_LOGIN 389
+#define WEAK_PHASE1_CHECK 390
+#define REKEY 391
+#define PREFIX 392
+#define PORT 393
+#define PORTANY 394
+#define UL_PROTO 395
+#define ANY 396
+#define IKE_FRAG 397
+#define ESP_FRAG 398
+#define MODE_CFG 399
+#define PFS_GROUP 400
+#define LIFETIME 401
+#define LIFETYPE_TIME 402
+#define LIFETYPE_BYTE 403
+#define STRENGTH 404
+#define REMOTEID 405
+#define SCRIPT 406
+#define PHASE1_UP 407
+#define PHASE1_DOWN 408
+#define PHASE1_DEAD 409
+#define NUMBER 410
+#define SWITCH 411
+#define BOOLEAN 412
+#define HEXSTRING 413
+#define QUOTEDSTRING 414
+#define ADDRSTRING 415
+#define ADDRRANGE 416
+#define UNITTYPE_BYTE 417
+#define UNITTYPE_KBYTES 418
+#define UNITTYPE_MBYTES 419
+#define UNITTYPE_TBYTES 420
+#define UNITTYPE_SEC 421
+#define UNITTYPE_MIN 422
+#define UNITTYPE_HOUR 423
+#define EOS 424
+#define BOC 425
+#define EOC 426
+#define COMMA 427
+#define YYERRCODE 256
+typedef int YYINT;
+static const YYINT racoonyylhs[] = { -1,
+ 0, 0, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 15, 30, 30,
+ 32, 31, 33, 31, 34, 31, 35, 31, 36, 31,
+ 37, 16, 38, 29, 17, 18, 19, 20, 39, 21,
+ 40, 40, 42, 41, 43, 41, 44, 41, 45, 41,
+ 46, 41, 22, 47, 47, 49, 48, 50, 48, 51,
+ 48, 52, 48, 53, 48, 54, 48, 12, 5, 5,
+ 55, 24, 56, 56, 58, 57, 59, 57, 60, 57,
+ 61, 57, 62, 57, 63, 57, 64, 23, 65, 65,
+ 67, 66, 68, 66, 69, 66, 70, 66, 71, 66,
+ 72, 66, 73, 66, 74, 66, 75, 66, 76, 66,
+ 77, 66, 78, 66, 25, 79, 79, 81, 80, 82,
+ 80, 80, 80, 86, 80, 87, 80, 89, 80, 90,
+ 80, 91, 80, 92, 80, 93, 80, 94, 80, 96,
+ 80, 97, 80, 98, 80, 99, 80, 100, 80, 101,
+ 80, 102, 80, 103, 80, 104, 80, 105, 80, 106,
+ 80, 107, 80, 108, 80, 109, 80, 110, 80, 83,
+ 83, 111, 84, 84, 112, 85, 85, 113, 95, 95,
+ 114, 88, 88, 115, 26, 116, 116, 118, 117, 119,
+ 117, 120, 117, 121, 117, 122, 117, 123, 117, 125,
+ 128, 27, 124, 124, 124, 124, 124, 124, 9, 9,
+ 9, 126, 126, 126, 127, 127, 130, 129, 131, 129,
+ 132, 129, 133, 129, 135, 129, 134, 136, 134, 13,
+ 3, 3, 4, 4, 4, 6, 6, 6, 1, 1,
+ 138, 28, 140, 28, 141, 28, 142, 28, 137, 137,
+ 139, 11, 11, 143, 143, 145, 144, 147, 144, 148,
+ 144, 149, 144, 144, 151, 144, 152, 144, 153, 144,
+ 154, 144, 155, 144, 156, 144, 157, 144, 158, 144,
+ 159, 144, 160, 144, 161, 144, 162, 144, 163, 144,
+ 164, 144, 165, 144, 166, 144, 167, 144, 168, 144,
+ 169, 144, 170, 144, 171, 144, 172, 144, 173, 144,
+ 174, 144, 175, 144, 176, 144, 177, 144, 178, 144,
+ 179, 144, 180, 144, 181, 144, 182, 144, 183, 144,
+ 184, 144, 185, 144, 186, 144, 187, 144, 188, 144,
+ 189, 144, 190, 144, 191, 144, 192, 144, 193, 144,
+ 146, 146, 195, 150, 196, 150, 2, 2, 10, 10,
+ 10, 194, 194, 198, 197, 199, 197, 200, 197, 201,
+ 197, 202, 197, 7, 7, 7, 8, 8, 8, 8,
+};
+static const YYINT racoonyylen[] = { 2,
+ 0, 2, 1, 1, 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, 3, 3, 1, 4,
+ 0, 2, 0, 4, 0, 4, 0, 4, 0, 4,
+ 0, 4, 4, 0, 2, 0, 4, 0, 4, 0,
+ 7, 0, 4, 0, 4, 0, 3, 2, 0, 1,
+ 0, 5, 0, 2, 0, 5, 0, 6, 0, 5,
+ 0, 6, 0, 4, 0, 4, 0, 5, 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, 4, 0, 2, 0, 4, 0,
+ 4, 3, 3, 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, 4, 0,
+ 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
+ 4, 0, 4, 0, 4, 0, 4, 0, 4, 1,
+ 3, 1, 1, 3, 1, 1, 3, 2, 1, 3,
+ 1, 1, 3, 1, 4, 0, 2, 0, 4, 0,
+ 5, 0, 4, 0, 5, 0, 5, 0, 5, 0,
+ 0, 8, 1, 2, 2, 2, 2, 2, 5, 6,
+ 2, 0, 3, 2, 0, 2, 0, 4, 0, 4,
+ 0, 6, 0, 6, 0, 4, 1, 0, 4, 2,
+ 0, 1, 0, 1, 1, 1, 1, 1, 0, 1,
+ 0, 6, 0, 4, 0, 6, 0, 4, 1, 1,
+ 3, 2, 1, 0, 2, 0, 4, 0, 4, 0,
+ 4, 0, 4, 2, 0, 4, 0, 5, 0, 5,
+ 0, 4, 0, 5, 0, 4, 0, 4, 0, 4,
+ 0, 4, 0, 5, 0, 6, 0, 4, 0, 5,
+ 0, 6, 0, 4, 0, 4, 0, 4, 0, 4,
+ 0, 4, 0, 4, 0, 4, 0, 5, 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, 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, 6, 0, 6, 0, 4, 0,
+ 4, 0, 5, 1, 1, 1, 1, 1, 1, 1,
+};
+static const YYINT racoonyydefred[] = { 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 87, 71,
+ 0, 0, 200, 0, 0, 0, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 19, 0, 0, 0, 39, 0, 41, 54,
+ 0, 0, 116, 186, 0, 0, 0, 0, 0, 253,
+ 0, 33, 0, 31, 35, 36, 38, 0, 0, 89,
+ 73, 0, 0, 0, 0, 0, 0, 70, 252, 0,
+ 0, 68, 0, 0, 37, 0, 0, 0, 0, 18,
+ 20, 0, 0, 0, 0, 0, 0, 40, 42, 0,
+ 0, 66, 0, 53, 55, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 115, 117, 0, 0, 0, 0,
+ 0, 0, 185, 187, 204, 205, 211, 0, 206, 207,
+ 208, 0, 0, 0, 241, 254, 244, 245, 248, 34,
+ 23, 21, 27, 25, 29, 32, 43, 45, 47, 49,
+ 51, 56, 58, 0, 64, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 88, 90,
+ 0, 0, 0, 0, 72, 74, 118, 120, 172, 0,
+ 0, 175, 0, 0, 130, 132, 134, 136, 138, 181,
+ 140, 0, 142, 144, 148, 150, 152, 146, 164, 166,
+ 162, 168, 154, 160, 0, 0, 184, 128, 0, 156,
+ 158, 188, 0, 192, 0, 0, 0, 232, 0, 0,
+ 214, 0, 215, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 0,
+ 0, 0, 93, 95, 91, 97, 101, 103, 99, 105,
+ 107, 109, 111, 113, 0, 0, 83, 85, 0, 0,
+ 122, 0, 123, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 176, 0, 0, 0, 0,
+ 0, 0, 374, 375, 376, 190, 0, 194, 196, 198,
+ 0, 234, 235, 0, 361, 360, 213, 0, 250, 242,
+ 249, 0, 258, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 297, 0, 0, 0,
+ 0, 0, 0, 349, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 251, 255, 246,
+ 24, 22, 28, 26, 30, 44, 46, 48, 50, 52,
+ 57, 59, 65, 0, 63, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 75, 0,
+ 79, 0, 0, 119, 121, 171, 174, 131, 133, 135,
+ 137, 139, 141, 180, 143, 145, 149, 151, 153, 147,
+ 165, 167, 163, 169, 155, 161, 178, 0, 0, 0,
+ 129, 183, 157, 159, 189, 0, 193, 0, 0, 0,
+ 0, 237, 238, 236, 209, 225, 0, 0, 0, 0,
+ 216, 256, 351, 260, 262, 0, 0, 264, 271, 0,
+ 0, 265, 0, 275, 277, 279, 281, 0, 0, 293,
+ 295, 0, 299, 323, 327, 325, 345, 319, 317, 321,
+ 0, 329, 331, 333, 335, 341, 287, 315, 339, 337,
+ 303, 301, 305, 313, 0, 0, 0, 60, 94, 96,
+ 92, 98, 102, 104, 100, 106, 108, 110, 112, 114,
+ 77, 0, 81, 0, 84, 86, 177, 125, 127, 191,
+ 195, 197, 199, 210, 0, 357, 358, 217, 0, 0,
+ 219, 202, 0, 0, 0, 0, 0, 355, 0, 267,
+ 269, 0, 273, 0, 0, 0, 0, 0, 283, 0,
+ 289, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 362, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 307, 309,
+ 311, 0, 0, 76, 0, 80, 0, 0, 0, 0,
+ 0, 0, 0, 257, 352, 259, 261, 263, 353, 0,
+ 272, 0, 0, 266, 0, 276, 278, 280, 282, 285,
+ 0, 291, 0, 294, 296, 298, 300, 324, 328, 326,
+ 346, 320, 318, 322, 0, 330, 332, 334, 336, 342,
+ 288, 316, 340, 338, 304, 302, 306, 314, 343, 377,
+ 378, 379, 380, 347, 0, 0, 0, 61, 78, 82,
+ 240, 230, 0, 226, 218, 221, 223, 220, 0, 356,
+ 268, 270, 274, 0, 284, 0, 290, 0, 0, 0,
+ 0, 350, 363, 0, 0, 308, 310, 312, 0, 0,
+ 0, 354, 286, 292, 0, 368, 370, 0, 0, 344,
+ 348, 229, 222, 224, 372, 0, 0, 0, 0, 0,
+ 369, 371, 364, 366, 373, 0, 0, 365, 367,
+};
+static const YYINT racoonyydgoto[] = { 1,
+ 632, 508, 220, 304, 69, 425, 296, 624, 66, 307,
+ 49, 50, 568, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 53,
+ 81, 228, 227, 230, 229, 231, 82, 76, 38, 58,
+ 89, 232, 233, 234, 235, 236, 59, 95, 237, 238,
+ 562, 242, 240, 154, 42, 97, 176, 492, 563, 494,
+ 565, 382, 383, 41, 96, 170, 368, 366, 367, 369,
+ 372, 370, 371, 373, 374, 375, 376, 377, 62, 116,
+ 259, 260, 180, 183, 285, 409, 410, 208, 288, 265,
+ 266, 267, 268, 269, 191, 270, 272, 273, 277, 274,
+ 275, 276, 282, 290, 291, 283, 280, 278, 279, 281,
+ 181, 184, 286, 192, 209, 63, 124, 292, 416, 297,
+ 418, 419, 420, 67, 45, 134, 308, 430, 431, 570,
+ 573, 660, 661, 569, 505, 633, 310, 224, 311, 71,
+ 226, 74, 225, 349, 513, 514, 433, 515, 516, 438,
+ 522, 582, 583, 519, 585, 524, 525, 526, 527, 591,
+ 644, 549, 593, 646, 532, 533, 452, 535, 554, 553,
+ 555, 625, 626, 627, 556, 550, 541, 540, 542, 536,
+ 538, 537, 544, 545, 546, 547, 552, 551, 548, 654,
+ 539, 655, 461, 605, 639, 580, 653, 686, 687, 676,
+ 677, 680,
+};
+static const YYINT racoonyysindex[] = { 0,
+ -193, -348, -174, -292, -306, -130, -266, -246, 0, 0,
+ -244, -234, 0, -268, -217, -216, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -264, -220, -191, 0, -168, 0, 0,
+ -219, -196, 0, 0, -252, -185, -146, -185, -108, 0,
+ -164, 0, -251, 0, 0, 0, 0, -257, -258, 0,
+ 0, -256, -275, -231, -321, -242, -218, 0, 0, -171,
+ -163, 0, -255, -163, 0, -159, -284, -282, -143, 0,
+ 0, -152, -138, -137, -134, -132, -131, 0, 0, -128,
+ -128, 0, -261, 0, 0, -260, -259, -127, -126, -125,
+ -124, -129, -122, -121, -200, -209, -136, -120, -118, -115,
+ -165, -117, -114, -113, 0, 0, -111, -110, -109, -106,
+ -105, -104, 0, 0, 0, 0, 0, -308, 0, 0,
+ 0, -112, -80, -148, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -142, 0, -103, -102, -101, -100, -99,
+ -98, -97, -93, -95, -94, -92, -91, -90, 0, 0,
+ -89, -88, -96, -83, 0, 0, 0, 0, 0, -141,
+ -149, 0, -116, -86, 0, 0, 0, 0, 0, 0,
+ 0, -84, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -85, -85, 0, 0, -82, 0,
+ 0, 0, -201, 0, -201, -201, -201, 0, -79, -195,
+ 0, -199, 0, -172, -140, -172, -78, -77, -76, -75,
+ -74, -73, -72, -71, -70, -69, -67, -66, 0, -65,
+ -81, -64, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -265, -262, 0, 0, -63, -62,
+ 0, -125, 0, -124, -61, -60, -59, -58, -57, -56,
+ -121, -55, -54, -53, -52, -51, -50, -49, -48, -47,
+ -46, -45, -44, -11, -43, 0, -43, -42, -117, -41,
+ -39, -38, 0, 0, 0, 0, -37, 0, 0, 0,
+ -195, 0, 0, -238, 0, 0, 0, -289, 0, 0,
+ 0, -128, 0, -23, -18, -107, -270, -32, -22, -21,
+ -20, -19, -24, -17, -16, -14, 0, -13, -12, -293,
+ -68, -310, -10, 0, -9, -7, -6, -5, -4, -199,
+ -3, -288, -286, -1, 1, -139, -26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3, 0, -31, -30, -27, -8, -2,
+ 2, 4, 5, 6, 7, 8, 9, 10, 0, 11,
+ 0, 12, 13, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -85, 14, 15,
+ 0, 0, 0, 0, 0, 16, 0, 17, 18, 19,
+ -238, 0, 0, 0, 0, 0, -254, -135, 24, -145,
+ 0, 0, 0, 0, 0, 21, 30, 0, 0, 31,
+ 32, 0, 33, 0, 0, 0, 0, -281, -277, 0,
+ 0, -254, 0, 0, 0, 0, 0, 0, 0, 0,
+ -25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 38, 39, -167, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 26, 0, 27, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 75, 0, 0, 0, 42, 43,
+ 0, 0, 34, -303, 35, 36, 40, 0, 37, 0,
+ 0, 41, 0, 44, 45, 46, 47, -199, 0, -199,
+ 0, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 0, 59, 60, 61, 62, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, -201, -181, 0, 0,
+ 0, 73, 74, 0, 76, 0, 77, 0, 78, 79,
+ -201, -181, 80, 0, 0, 0, 0, 0, 0, 81,
+ 0, 82, 83, 0, 84, 0, 0, 0, 0, 0,
+ 85, 0, 86, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -291, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 87, 88, 89, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0, 0, 0, 90, 0,
+ 0, 0, 0, 91, 0, 92, 0, 95, -254, 103,
+ -133, 0, 0, 94, 96, 0, 0, 0, 75, 97,
+ 98, 0, 0, 0, 77, 0, 0, 109, 113, 0,
+ 0, 0, 0, 0, 0, 100, 101, -201, -181, 102,
+ 0, 0, 0, 0, 0, 104, 105, 0, 0,
+};
+static const YYINT racoonyyrindex[] = { 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, 0, 0,
+ 0, 0, 0, 0, 0, -305, -15, -305, 106, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -249, 0, 0, 107, 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -232, 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, 110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 111, 0, 0, 112, 0, 0, 0, 0, 0, 0,
+ 0, 114, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 115, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -232, -213,
+ 0, 108, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 116, 0, 117, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -213, 0, 0, 0, 0, 0, 0, -119, 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, -70,
+ 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, 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, 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, -70, -70, 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, 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, -70, 0, -70,
+ 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, -285, -247, 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, 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -142, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+static const YYINT racoonyygindex[] = { 0,
+ -381, -447, 120, 119, 284, 121, -215, -539, 63, -334,
+ 261, -87, 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, 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, 149, 150, 129, 0, 0, 126, 0, 0,
+ 0, 0, 0, 0, 146, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 93, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -323, 0, 0, 192, 0, 118, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,
+};
+#define YYTABLESIZE 542
+static const YYINT racoonyytable[] = { 298,
+ 299, 300, 152, 153, 534, 467, 77, 78, 79, 203,
+ 83, 84, 85, 86, 87, 90, 91, 155, 92, 93,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 637, 69, 171, 172, 173, 174, 575, 648,
+ 132, 426, 98, 99, 100, 101, 102, 103, 104, 117,
+ 118, 119, 120, 121, 122, 105, 106, 107, 108, 109,
+ 110, 111, 458, 2, 112, 113, 114, 3, 46, 4,
+ 5, 6, 649, 7, 528, 455, 33, 506, 530, 8,
+ 469, 46, 471, 218, 64, 203, 9, 34, 650, 439,
+ 440, 441, 127, 128, 129, 130, 195, 196, 197, 10,
+ 459, 198, 65, 36, 11, 193, 125, 219, 194, 651,
+ 427, 428, 65, 529, 531, 429, 133, 456, 69, 69,
+ 576, 35, 470, 65, 472, 141, 126, 143, 131, 142,
+ 12, 144, 305, 306, 652, 37, 305, 306, 239, 684,
+ 13, 239, 14, 442, 378, 47, 48, 380, 379, 54,
+ 123, 381, 156, 205, 206, 507, 422, 423, 39, 48,
+ 231, 231, 231, 231, 51, 169, 175, 94, 88, 115,
+ 199, 424, 200, 201, 80, 203, 227, 231, 40, 228,
+ 43, 233, 233, 186, 187, 188, 189, 15, 137, 16,
+ 44, 139, 70, 590, 52, 592, 233, 302, 303, 312,
+ 313, 666, 314, 55, 315, 60, 316, 68, 317, 318,
+ 319, 320, 321, 322, 305, 306, 323, 324, 325, 293,
+ 294, 295, 326, 327, 432, 328, 329, 330, 61, 331,
+ 73, 332, 56, 333, 334, 620, 621, 622, 623, 559,
+ 560, 561, 135, 335, 336, 337, 338, 339, 340, 341,
+ 342, 309, 136, 436, 437, 57, 343, 344, 345, 75,
+ 346, 136, 475, 476, 140, 347, 509, 510, 668, 669,
+ 145, 146, 147, 148, 222, 149, 223, 262, 150, 151,
+ 512, 239, 261, 675, 185, 348, 48, 177, 178, 179,
+ 182, 203, 190, 202, 204, 210, 207, 211, 212, 213,
+ 214, 221, 457, 215, 216, 217, 201, 263, 244, 245,
+ 241, 243, 218, 257, 246, 247, 248, 249, 250, 251,
+ 434, 252, 253, 254, 255, 256, 258, 435, 443, 284,
+ 448, 72, 364, 138, 287, 672, 0, 449, 301, 0,
+ 264, 619, 271, 0, 289, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 636, 361, 362, 363, 365,
+ 384, 385, 388, 389, 390, 391, 392, 393, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 411, 413, 408, 414, 415, 417, 477, 444, 445,
+ 446, 447, 479, 480, 450, 451, 481, 453, 454, 543,
+ 460, 462, 463, 464, 465, 466, 567, 468, 473, 243,
+ 386, 474, 478, 387, 412, 482, 394, 350, 0, 421,
+ 0, 483, 0, 491, 493, 484, 665, 485, 486, 487,
+ 488, 489, 490, 511, 517, 495, 496, 498, 499, 500,
+ 501, 502, 503, 518, 520, 521, 523, 557, 558, 564,
+ 566, 571, 572, 579, 659, 0, 0, 574, 577, 578,
+ 581, 0, 683, 0, 584, 0, 0, 586, 587, 588,
+ 589, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 606, 607, 608, 609, 631, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 628, 629, 0, 630,
+ 497, 634, 635, 638, 640, 641, 642, 643, 645, 647,
+ 656, 657, 658, 662, 663, 664, 667, 670, 678, 671,
+ 673, 674, 679, 681, 682, 685, 0, 688, 689, 0,
+ 247, 212, 359, 62, 170, 173, 0, 179, 182, 124,
+ 126, 504,
+};
+static const YYINT racoonyycheck[] = { 215,
+ 216, 217, 90, 91, 452, 340, 258, 259, 260, 259,
+ 268, 269, 270, 271, 272, 274, 275, 279, 277, 278,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 572, 339, 294, 295, 296, 297, 342, 331,
+ 259, 331, 299, 300, 301, 302, 303, 304, 305, 325,
+ 326, 327, 328, 329, 330, 312, 313, 314, 315, 316,
+ 317, 318, 373, 257, 321, 322, 323, 261, 337, 263,
+ 264, 265, 364, 267, 356, 369, 425, 332, 356, 273,
+ 369, 337, 369, 392, 337, 335, 280, 262, 380, 360,
+ 361, 362, 414, 415, 337, 338, 306, 307, 308, 293,
+ 411, 311, 355, 410, 298, 306, 338, 416, 309, 401,
+ 400, 401, 355, 448, 449, 405, 335, 411, 424, 425,
+ 424, 414, 411, 355, 411, 410, 64, 410, 66, 414,
+ 324, 414, 414, 415, 426, 266, 414, 415, 424, 679,
+ 334, 427, 336, 414, 410, 414, 415, 410, 414, 414,
+ 426, 414, 414, 319, 320, 410, 395, 396, 425, 415,
+ 393, 394, 395, 396, 382, 426, 426, 426, 426, 426,
+ 307, 410, 309, 310, 426, 425, 424, 410, 425, 427,
+ 425, 395, 396, 306, 307, 308, 309, 381, 71, 383,
+ 425, 74, 339, 528, 411, 530, 410, 393, 394, 340,
+ 341, 649, 343, 424, 345, 425, 347, 393, 349, 350,
+ 351, 352, 353, 354, 414, 415, 357, 358, 359, 421,
+ 422, 423, 363, 364, 312, 366, 367, 368, 425, 370,
+ 339, 372, 424, 374, 375, 417, 418, 419, 420, 407,
+ 408, 409, 414, 384, 385, 386, 387, 388, 389, 390,
+ 391, 424, 425, 361, 362, 424, 397, 398, 399, 424,
+ 401, 425, 402, 403, 424, 406, 402, 403, 402, 403,
+ 414, 424, 411, 411, 355, 410, 425, 427, 411, 411,
+ 426, 424, 424, 665, 414, 426, 415, 415, 415, 415,
+ 415, 410, 414, 414, 410, 410, 414, 411, 410, 410,
+ 410, 414, 371, 410, 410, 410, 426, 424, 410, 410,
+ 414, 414, 392, 410, 414, 414, 414, 411, 414, 414,
+ 344, 414, 414, 414, 414, 414, 410, 346, 361, 415,
+ 355, 48, 414, 73, 206, 659, -1, 355, 219, -1,
+ 427, 557, 427, -1, 427, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 571, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
+ 392, 424, 424, 427, 424, 424, 424, 414, 411, 411,
+ 411, 411, 424, 424, 411, 410, 424, 411, 411, 425,
+ 411, 411, 410, 410, 410, 410, 332, 411, 410, 425,
+ 262, 411, 410, 264, 289, 424, 271, 226, -1, 301,
+ -1, 424, -1, 414, 414, 424, 332, 424, 424, 424,
+ 424, 424, 424, 410, 414, 424, 424, 424, 424, 424,
+ 424, 424, 424, 414, 414, 414, 414, 410, 410, 424,
+ 424, 410, 410, 414, 427, -1, -1, 424, 424, 424,
+ 424, -1, 678, -1, 424, -1, -1, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 410, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 424, 424, -1, 424,
+ 408, 424, 424, 424, 424, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 424, 424, 414, 424, 410, 424,
+ 424, 424, 410, 424, 424, 424, -1, 424, 424, -1,
+ 425, 425, 425, 424, 424, 424, -1, 424, 424, 424,
+ 424, 421,
+};
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 0
#endif
+#define YYMAXTOKEN 427
+#define YYUNDFTOKEN 632
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
+#if YYDEBUG
+static const char *const racoonyyname[] = {
+
+"end-of-file",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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"PRIVSEP","USER","GROUP","CHROOT",
+"PATH","PATHTYPE","INCLUDE","PFKEY_BUFFER","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","LDAPCFG","LDAP_HOST","LDAP_PORT","LDAP_PVER","LDAP_BASE",
+"LDAP_BIND_DN","LDAP_BIND_PW","LDAP_SUBTREE","LDAP_ATTR_USER","LDAP_ATTR_ADDR",
+"LDAP_ATTR_MASK","LDAP_ATTR_GROUP","LDAP_ATTR_MEMBER","RADCFG","RAD_AUTH",
+"RAD_ACCT","RAD_TIMEOUT","RAD_RETRIES","MODECFG","CFG_NET4","CFG_MASK4",
+"CFG_DNS4","CFG_NBNS4","CFG_DEFAULT_DOMAIN","CFG_AUTH_SOURCE","CFG_AUTH_GROUPS",
+"CFG_SYSTEM","CFG_RADIUS","CFG_PAM","CFG_LDAP","CFG_LOCAL","CFG_NONE",
+"CFG_GROUP_SOURCE","CFG_ACCOUNTING","CFG_CONF_SOURCE","CFG_MOTD",
+"CFG_POOL_SIZE","CFG_AUTH_THROTTLE","CFG_SPLIT_NETWORK","CFG_SPLIT_LOCAL",
+"CFG_SPLIT_INCLUDE","CFG_SPLIT_DNS","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","CLIENTADDR","INHERIT","REMOTE_ADDRESS","EXCHANGE_MODE",
+"EXCHANGETYPE","DOI","DOITYPE","SITUATION","SITUATIONTYPE","CERTIFICATE_TYPE",
+"CERTTYPE","PEERS_CERTFILE","CA_TYPE","VERIFY_CERT","SEND_CERT","SEND_CR",
+"MATCH_EMPTY_CR","IDENTIFIERTYPE","IDENTIFIERQUAL","MY_IDENTIFIER",
+"PEERS_IDENTIFIER","VERIFY_IDENTIFIER","DNSSEC","CERT_X509","CERT_PLAINRSA",
+"NONCE_SIZE","DH_GROUP","KEEPALIVE","PASSIVE","INITIAL_CONTACT","NAT_TRAVERSAL",
+"REMOTE_FORCE_LEVEL","PROPOSAL_CHECK","PROPOSAL_CHECK_LEVEL","GENERATE_POLICY",
+"GENERATE_LEVEL","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","PH1ID",
+"XAUTH_LOGIN","WEAK_PHASE1_CHECK","REKEY","PREFIX","PORT","PORTANY","UL_PROTO",
+"ANY","IKE_FRAG","ESP_FRAG","MODE_CFG","PFS_GROUP","LIFETIME","LIFETYPE_TIME",
+"LIFETYPE_BYTE","STRENGTH","REMOTEID","SCRIPT","PHASE1_UP","PHASE1_DOWN",
+"PHASE1_DEAD","NUMBER","SWITCH","BOOLEAN","HEXSTRING","QUOTEDSTRING",
+"ADDRSTRING","ADDRRANGE","UNITTYPE_BYTE","UNITTYPE_KBYTES","UNITTYPE_MBYTES",
+"UNITTYPE_TBYTES","UNITTYPE_SEC","UNITTYPE_MIN","UNITTYPE_HOUR","EOS","BOC",
+"EOC","COMMA",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,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,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,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,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,0,0,0,0,0,0,0,0,0,"illegal-symbol",
+};
+static const char *const racoonyyrule[] = {
+"$accept : statements",
+"statements :",
+"statements : statements statement",
+"statement : privsep_statement",
+"statement : path_statement",
+"statement : include_statement",
+"statement : pfkey_statement",
+"statement : gssenc_statement",
+"statement : logging_statement",
+"statement : padding_statement",
+"statement : listen_statement",
+"statement : ldapcfg_statement",
+"statement : radcfg_statement",
+"statement : modecfg_statement",
+"statement : timer_statement",
+"statement : sainfo_statement",
+"statement : remote_statement",
+"statement : special_statement",
+"privsep_statement : PRIVSEP BOC privsep_stmts EOC",
+"privsep_stmts :",
+"privsep_stmts : privsep_stmts privsep_stmt",
+"$$1 :",
+"privsep_stmt : USER QUOTEDSTRING $$1 EOS",
+"$$2 :",
+"privsep_stmt : USER NUMBER $$2 EOS",
+"$$3 :",
+"privsep_stmt : GROUP QUOTEDSTRING $$3 EOS",
+"$$4 :",
+"privsep_stmt : GROUP NUMBER $$4 EOS",
+"$$5 :",
+"privsep_stmt : CHROOT QUOTEDSTRING $$5 EOS",
+"$$6 :",
+"path_statement : PATH PATHTYPE QUOTEDSTRING $$6 EOS",
+"$$7 :",
+"special_statement : COMPLEX_BUNDLE SWITCH $$7 EOS",
+"include_statement : INCLUDE QUOTEDSTRING EOS",
+"pfkey_statement : PFKEY_BUFFER NUMBER EOS",
+"gssenc_statement : GSS_ID_ENC GSS_ID_ENCTYPE EOS",
+"logging_statement : LOGGING log_level EOS",
+"log_level : LOGLEV",
+"padding_statement : PADDING BOC padding_stmts EOC",
+"padding_stmts :",
+"padding_stmts : padding_stmts padding_stmt",
+"$$8 :",
+"padding_stmt : PAD_RANDOMIZE SWITCH $$8 EOS",
+"$$9 :",
+"padding_stmt : PAD_RANDOMIZELEN SWITCH $$9 EOS",
+"$$10 :",
+"padding_stmt : PAD_MAXLEN NUMBER $$10 EOS",
+"$$11 :",
+"padding_stmt : PAD_STRICT SWITCH $$11 EOS",
+"$$12 :",
+"padding_stmt : PAD_EXCLTAIL SWITCH $$12 EOS",
+"listen_statement : LISTEN BOC listen_stmts EOC",
+"listen_stmts :",
+"listen_stmts : listen_stmts listen_stmt",
+"$$13 :",
+"listen_stmt : X_ISAKMP ike_addrinfo_port $$13 EOS",
+"$$14 :",
+"listen_stmt : X_ISAKMP_NATT ike_addrinfo_port $$14 EOS",
+"$$15 :",
+"listen_stmt : ADMINSOCK QUOTEDSTRING QUOTEDSTRING QUOTEDSTRING NUMBER $$15 EOS",
+"$$16 :",
+"listen_stmt : ADMINSOCK QUOTEDSTRING $$16 EOS",
+"$$17 :",
+"listen_stmt : ADMINSOCK DISABLED $$17 EOS",
+"$$18 :",
+"listen_stmt : STRICT_ADDRESS $$18 EOS",
+"ike_addrinfo_port : ADDRSTRING ike_port",
+"ike_port :",
+"ike_port : PORT",
+"$$19 :",
+"radcfg_statement : RADCFG $$19 BOC radcfg_stmts EOC",
+"radcfg_stmts :",
+"radcfg_stmts : radcfg_stmts radcfg_stmt",
+"$$20 :",
+"radcfg_stmt : RAD_AUTH QUOTEDSTRING QUOTEDSTRING $$20 EOS",
+"$$21 :",
+"radcfg_stmt : RAD_AUTH QUOTEDSTRING NUMBER QUOTEDSTRING $$21 EOS",
+"$$22 :",
+"radcfg_stmt : RAD_ACCT QUOTEDSTRING QUOTEDSTRING $$22 EOS",
+"$$23 :",
+"radcfg_stmt : RAD_ACCT QUOTEDSTRING NUMBER QUOTEDSTRING $$23 EOS",
+"$$24 :",
+"radcfg_stmt : RAD_TIMEOUT NUMBER $$24 EOS",
+"$$25 :",
+"radcfg_stmt : RAD_RETRIES NUMBER $$25 EOS",
+"$$26 :",
+"ldapcfg_statement : LDAPCFG $$26 BOC ldapcfg_stmts EOC",
+"ldapcfg_stmts :",
+"ldapcfg_stmts : ldapcfg_stmts ldapcfg_stmt",
+"$$27 :",
+"ldapcfg_stmt : LDAP_PVER NUMBER $$27 EOS",
+"$$28 :",
+"ldapcfg_stmt : LDAP_HOST QUOTEDSTRING $$28 EOS",
+"$$29 :",
+"ldapcfg_stmt : LDAP_PORT NUMBER $$29 EOS",
+"$$30 :",
+"ldapcfg_stmt : LDAP_BASE QUOTEDSTRING $$30 EOS",
+"$$31 :",
+"ldapcfg_stmt : LDAP_SUBTREE SWITCH $$31 EOS",
+"$$32 :",
+"ldapcfg_stmt : LDAP_BIND_DN QUOTEDSTRING $$32 EOS",
+"$$33 :",
+"ldapcfg_stmt : LDAP_BIND_PW QUOTEDSTRING $$33 EOS",
+"$$34 :",
+"ldapcfg_stmt : LDAP_ATTR_USER QUOTEDSTRING $$34 EOS",
+"$$35 :",
+"ldapcfg_stmt : LDAP_ATTR_ADDR QUOTEDSTRING $$35 EOS",
+"$$36 :",
+"ldapcfg_stmt : LDAP_ATTR_MASK QUOTEDSTRING $$36 EOS",
+"$$37 :",
+"ldapcfg_stmt : LDAP_ATTR_GROUP QUOTEDSTRING $$37 EOS",
+"$$38 :",
+"ldapcfg_stmt : LDAP_ATTR_MEMBER QUOTEDSTRING $$38 EOS",
+"modecfg_statement : MODECFG BOC modecfg_stmts EOC",
+"modecfg_stmts :",
+"modecfg_stmts : modecfg_stmts modecfg_stmt",
+"$$39 :",
+"modecfg_stmt : CFG_NET4 ADDRSTRING $$39 EOS",
+"$$40 :",
+"modecfg_stmt : CFG_MASK4 ADDRSTRING $$40 EOS",
+"modecfg_stmt : CFG_DNS4 addrdnslist EOS",
+"modecfg_stmt : CFG_NBNS4 addrwinslist EOS",
+"$$41 :",
+"modecfg_stmt : CFG_SPLIT_NETWORK CFG_SPLIT_LOCAL splitnetlist $$41 EOS",
+"$$42 :",
+"modecfg_stmt : CFG_SPLIT_NETWORK CFG_SPLIT_INCLUDE splitnetlist $$42 EOS",
+"$$43 :",
+"modecfg_stmt : CFG_SPLIT_DNS splitdnslist $$43 EOS",
+"$$44 :",
+"modecfg_stmt : CFG_DEFAULT_DOMAIN QUOTEDSTRING $$44 EOS",
+"$$45 :",
+"modecfg_stmt : CFG_AUTH_SOURCE CFG_SYSTEM $$45 EOS",
+"$$46 :",
+"modecfg_stmt : CFG_AUTH_SOURCE CFG_RADIUS $$46 EOS",
+"$$47 :",
+"modecfg_stmt : CFG_AUTH_SOURCE CFG_PAM $$47 EOS",
+"$$48 :",
+"modecfg_stmt : CFG_AUTH_SOURCE CFG_LDAP $$48 EOS",
+"$$49 :",
+"modecfg_stmt : CFG_AUTH_GROUPS authgrouplist $$49 EOS",
+"$$50 :",
+"modecfg_stmt : CFG_GROUP_SOURCE CFG_SYSTEM $$50 EOS",
+"$$51 :",
+"modecfg_stmt : CFG_GROUP_SOURCE CFG_LDAP $$51 EOS",
+"$$52 :",
+"modecfg_stmt : CFG_ACCOUNTING CFG_NONE $$52 EOS",
+"$$53 :",
+"modecfg_stmt : CFG_ACCOUNTING CFG_SYSTEM $$53 EOS",
+"$$54 :",
+"modecfg_stmt : CFG_ACCOUNTING CFG_RADIUS $$54 EOS",
+"$$55 :",
+"modecfg_stmt : CFG_ACCOUNTING CFG_PAM $$55 EOS",
+"$$56 :",
+"modecfg_stmt : CFG_POOL_SIZE NUMBER $$56 EOS",
+"$$57 :",
+"modecfg_stmt : CFG_PFS_GROUP NUMBER $$57 EOS",
+"$$58 :",
+"modecfg_stmt : CFG_SAVE_PASSWD SWITCH $$58 EOS",
+"$$59 :",
+"modecfg_stmt : CFG_AUTH_THROTTLE NUMBER $$59 EOS",
+"$$60 :",
+"modecfg_stmt : CFG_CONF_SOURCE CFG_LOCAL $$60 EOS",
+"$$61 :",
+"modecfg_stmt : CFG_CONF_SOURCE CFG_RADIUS $$61 EOS",
+"$$62 :",
+"modecfg_stmt : CFG_CONF_SOURCE CFG_LDAP $$62 EOS",
+"$$63 :",
+"modecfg_stmt : CFG_MOTD QUOTEDSTRING $$63 EOS",
+"addrdnslist : addrdns",
+"addrdnslist : addrdns COMMA addrdnslist",
+"addrdns : ADDRSTRING",
+"addrwinslist : addrwins",
+"addrwinslist : addrwins COMMA addrwinslist",
+"addrwins : ADDRSTRING",
+"splitnetlist : splitnet",
+"splitnetlist : splitnetlist COMMA splitnet",
+"splitnet : ADDRSTRING PREFIX",
+"authgrouplist : authgroup",
+"authgrouplist : authgroup COMMA authgrouplist",
+"authgroup : QUOTEDSTRING",
+"splitdnslist : splitdns",
+"splitdnslist : splitdns COMMA splitdnslist",
+"splitdns : QUOTEDSTRING",
+"timer_statement : RETRY BOC timer_stmts EOC",
+"timer_stmts :",
+"timer_stmts : timer_stmts timer_stmt",
+"$$64 :",
+"timer_stmt : RETRY_COUNTER NUMBER $$64 EOS",
+"$$65 :",
+"timer_stmt : RETRY_INTERVAL NUMBER unittype_time $$65 EOS",
+"$$66 :",
+"timer_stmt : RETRY_PERSEND NUMBER $$66 EOS",
+"$$67 :",
+"timer_stmt : RETRY_PHASE1 NUMBER unittype_time $$67 EOS",
+"$$68 :",
+"timer_stmt : RETRY_PHASE2 NUMBER unittype_time $$68 EOS",
+"$$69 :",
+"timer_stmt : NATT_KA NUMBER unittype_time $$69 EOS",
+"$$70 :",
+"$$71 :",
+"sainfo_statement : SAINFO $$70 sainfo_name sainfo_param BOC sainfo_specs $$71 EOC",
+"sainfo_name : ANONYMOUS",
+"sainfo_name : ANONYMOUS CLIENTADDR",
+"sainfo_name : ANONYMOUS sainfo_id",
+"sainfo_name : sainfo_id ANONYMOUS",
+"sainfo_name : sainfo_id CLIENTADDR",
+"sainfo_name : sainfo_id sainfo_id",
+"sainfo_id : IDENTIFIERTYPE ADDRSTRING prefix port ul_proto",
+"sainfo_id : IDENTIFIERTYPE ADDRSTRING ADDRRANGE prefix port ul_proto",
+"sainfo_id : IDENTIFIERTYPE QUOTEDSTRING",
+"sainfo_param :",
+"sainfo_param : FROM IDENTIFIERTYPE identifierstring",
+"sainfo_param : GROUP QUOTEDSTRING",
+"sainfo_specs :",
+"sainfo_specs : sainfo_specs sainfo_spec",
+"$$72 :",
+"sainfo_spec : PFS_GROUP dh_group_num $$72 EOS",
+"$$73 :",
+"sainfo_spec : REMOTEID NUMBER $$73 EOS",
+"$$74 :",
+"sainfo_spec : LIFETIME LIFETYPE_TIME NUMBER unittype_time $$74 EOS",
+"$$75 :",
+"sainfo_spec : LIFETIME LIFETYPE_BYTE NUMBER unittype_byte $$75 EOS",
+"$$76 :",
+"sainfo_spec : ALGORITHM_CLASS $$76 algorithms EOS",
+"algorithms : algorithm",
+"$$77 :",
+"algorithms : algorithm $$77 COMMA algorithms",
+"algorithm : ALGORITHMTYPE keylength",
+"prefix :",
+"prefix : PREFIX",
+"port :",
+"port : PORT",
+"port : PORTANY",
+"ul_proto : NUMBER",
+"ul_proto : UL_PROTO",
+"ul_proto : ANY",
+"keylength :",
+"keylength : NUMBER",
+"$$78 :",
+"remote_statement : REMOTE QUOTEDSTRING INHERIT QUOTEDSTRING $$78 remote_specs_inherit_block",
+"$$79 :",
+"remote_statement : REMOTE QUOTEDSTRING $$79 remote_specs_block",
+"$$80 :",
+"remote_statement : REMOTE remote_index INHERIT remote_index $$80 remote_specs_inherit_block",
+"$$81 :",
+"remote_statement : REMOTE remote_index $$81 remote_specs_block",
+"remote_specs_inherit_block : remote_specs_block",
+"remote_specs_inherit_block : EOS",
+"remote_specs_block : BOC remote_specs EOC",
+"remote_index : ANONYMOUS ike_port",
+"remote_index : ike_addrinfo_port",
+"remote_specs :",
+"remote_specs : remote_specs remote_spec",
+"$$82 :",
+"remote_spec : REMOTE_ADDRESS ike_addrinfo_port $$82 EOS",
+"$$83 :",
+"remote_spec : EXCHANGE_MODE $$83 exchange_types EOS",
+"$$84 :",
+"remote_spec : DOI DOITYPE $$84 EOS",
+"$$85 :",
+"remote_spec : SITUATION SITUATIONTYPE $$85 EOS",
+"remote_spec : CERTIFICATE_TYPE cert_spec",
+"$$86 :",
+"remote_spec : PEERS_CERTFILE QUOTEDSTRING $$86 EOS",
+"$$87 :",
+"remote_spec : PEERS_CERTFILE CERT_X509 QUOTEDSTRING $$87 EOS",
+"$$88 :",
+"remote_spec : PEERS_CERTFILE CERT_PLAINRSA QUOTEDSTRING $$88 EOS",
+"$$89 :",
+"remote_spec : PEERS_CERTFILE DNSSEC $$89 EOS",
+"$$90 :",
+"remote_spec : CA_TYPE CERT_X509 QUOTEDSTRING $$90 EOS",
+"$$91 :",
+"remote_spec : VERIFY_CERT SWITCH $$91 EOS",
+"$$92 :",
+"remote_spec : SEND_CERT SWITCH $$92 EOS",
+"$$93 :",
+"remote_spec : SEND_CR SWITCH $$93 EOS",
+"$$94 :",
+"remote_spec : MATCH_EMPTY_CR SWITCH $$94 EOS",
+"$$95 :",
+"remote_spec : MY_IDENTIFIER IDENTIFIERTYPE identifierstring $$95 EOS",
+"$$96 :",
+"remote_spec : MY_IDENTIFIER IDENTIFIERTYPE IDENTIFIERQUAL identifierstring $$96 EOS",
+"$$97 :",
+"remote_spec : XAUTH_LOGIN identifierstring $$97 EOS",
+"$$98 :",
+"remote_spec : PEERS_IDENTIFIER IDENTIFIERTYPE identifierstring $$98 EOS",
+"$$99 :",
+"remote_spec : PEERS_IDENTIFIER IDENTIFIERTYPE IDENTIFIERQUAL identifierstring $$99 EOS",
+"$$100 :",
+"remote_spec : VERIFY_IDENTIFIER SWITCH $$100 EOS",
+"$$101 :",
+"remote_spec : NONCE_SIZE NUMBER $$101 EOS",
+"$$102 :",
+"remote_spec : DH_GROUP $$102 dh_group_num EOS",
+"$$103 :",
+"remote_spec : PASSIVE SWITCH $$103 EOS",
+"$$104 :",
+"remote_spec : IKE_FRAG SWITCH $$104 EOS",
+"$$105 :",
+"remote_spec : IKE_FRAG REMOTE_FORCE_LEVEL $$105 EOS",
+"$$106 :",
+"remote_spec : ESP_FRAG NUMBER $$106 EOS",
+"$$107 :",
+"remote_spec : SCRIPT QUOTEDSTRING PHASE1_UP $$107 EOS",
+"$$108 :",
+"remote_spec : SCRIPT QUOTEDSTRING PHASE1_DOWN $$108 EOS",
+"$$109 :",
+"remote_spec : SCRIPT QUOTEDSTRING PHASE1_DEAD $$109 EOS",
+"$$110 :",
+"remote_spec : MODE_CFG SWITCH $$110 EOS",
+"$$111 :",
+"remote_spec : WEAK_PHASE1_CHECK SWITCH $$111 EOS",
+"$$112 :",
+"remote_spec : GENERATE_POLICY SWITCH $$112 EOS",
+"$$113 :",
+"remote_spec : GENERATE_POLICY GENERATE_LEVEL $$113 EOS",
+"$$114 :",
+"remote_spec : SUPPORT_PROXY SWITCH $$114 EOS",
+"$$115 :",
+"remote_spec : INITIAL_CONTACT SWITCH $$115 EOS",
+"$$116 :",
+"remote_spec : NAT_TRAVERSAL SWITCH $$116 EOS",
+"$$117 :",
+"remote_spec : NAT_TRAVERSAL REMOTE_FORCE_LEVEL $$117 EOS",
+"$$118 :",
+"remote_spec : DPD SWITCH $$118 EOS",
+"$$119 :",
+"remote_spec : DPD_DELAY NUMBER $$119 EOS",
+"$$120 :",
+"remote_spec : DPD_RETRY NUMBER $$120 EOS",
+"$$121 :",
+"remote_spec : DPD_MAXFAIL NUMBER $$121 EOS",
+"$$122 :",
+"remote_spec : REKEY SWITCH $$122 EOS",
+"$$123 :",
+"remote_spec : REKEY REMOTE_FORCE_LEVEL $$123 EOS",
+"$$124 :",
+"remote_spec : PH1ID NUMBER $$124 EOS",
+"$$125 :",
+"remote_spec : LIFETIME LIFETYPE_TIME NUMBER unittype_time $$125 EOS",
+"$$126 :",
+"remote_spec : PROPOSAL_CHECK PROPOSAL_CHECK_LEVEL $$126 EOS",
+"$$127 :",
+"remote_spec : LIFETIME LIFETYPE_BYTE NUMBER unittype_byte $$127 EOS",
+"$$128 :",
+"remote_spec : PROPOSAL $$128 BOC isakmpproposal_specs EOC",
+"exchange_types :",
+"exchange_types : exchange_types EXCHANGETYPE",
+"$$129 :",
+"cert_spec : CERT_X509 QUOTEDSTRING QUOTEDSTRING $$129 EOS",
+"$$130 :",
+"cert_spec : CERT_PLAINRSA QUOTEDSTRING $$130 EOS",
+"dh_group_num : ALGORITHMTYPE",
+"dh_group_num : NUMBER",
+"identifierstring :",
+"identifierstring : ADDRSTRING",
+"identifierstring : QUOTEDSTRING",
+"isakmpproposal_specs :",
+"isakmpproposal_specs : isakmpproposal_specs isakmpproposal_spec",
+"$$131 :",
+"isakmpproposal_spec : LIFETIME LIFETYPE_TIME NUMBER unittype_time $$131 EOS",
+"$$132 :",
+"isakmpproposal_spec : LIFETIME LIFETYPE_BYTE NUMBER unittype_byte $$132 EOS",
+"$$133 :",
+"isakmpproposal_spec : DH_GROUP dh_group_num $$133 EOS",
+"$$134 :",
+"isakmpproposal_spec : GSS_ID QUOTEDSTRING $$134 EOS",
+"$$135 :",
+"isakmpproposal_spec : ALGORITHM_CLASS ALGORITHMTYPE keylength $$135 EOS",
+"unittype_time : UNITTYPE_SEC",
+"unittype_time : UNITTYPE_MIN",
+"unittype_time : UNITTYPE_HOUR",
+"unittype_byte : UNITTYPE_BYTE",
+"unittype_byte : UNITTYPE_KBYTES",
+"unittype_byte : UNITTYPE_MBYTES",
+"unittype_byte : UNITTYPE_TBYTES",
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
-# endif
+};
#endif
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+int yydebug;
+int yynerrs;
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
+int yyerrflag;
+int yychar;
+YYSTYPE yyval;
+YYSTYPE yylval;
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
+/* define the initial stack-sizes */
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
#else
-static int
-YYID (yyi)
- int yyi;
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
-{
- return yyi;
-}
#endif
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
+#define YYINITSTACKSIZE 200
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+typedef struct {
+ unsigned stacksize;
+ YYINT *s_base;
+ YYINT *s_mark;
+ YYINT *s_last;
+ YYSTYPE *l_base;
+ YYSTYPE *l_mark;
+} YYSTACKDATA;
+/* variables for the parser stack */
+static YYSTACKDATA yystack;
+#line 2399 "../../ipsec-tools/src/racoon/cfparse.y"
-/* A type that is properly aligned for any stack member. */
-union yyalloc
+static struct secprotospec *
+newspspec()
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
+ struct secprotospec *new;
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+ new = racoon_calloc(1, sizeof(*new));
+ if (new == NULL) {
+ yyerror("failed to allocate spproto");
+ return NULL;
+ }
-#endif
+ new->encklen = 0; /*XXX*/
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 2
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 534
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 174
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 204
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 381
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 691
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 428
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 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, 2, 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, 138, 139, 140, 141, 142, 143, 144,
- 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
- 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, 172, 173
-};
+ /*
+ * 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;
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 4, 7, 9, 11, 13, 15, 17,
- 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
- 42, 43, 46, 47, 52, 53, 58, 59, 64, 65,
- 70, 71, 76, 77, 83, 84, 89, 93, 97, 101,
- 105, 107, 112, 113, 116, 117, 122, 123, 128, 129,
- 134, 135, 140, 141, 146, 151, 152, 155, 156, 161,
- 162, 167, 168, 176, 177, 182, 183, 188, 189, 193,
- 196, 197, 199, 200, 206, 207, 210, 211, 217, 218,
- 225, 226, 232, 233, 240, 241, 246, 247, 252, 253,
- 259, 260, 263, 264, 269, 270, 275, 276, 281, 282,
- 287, 288, 293, 294, 299, 300, 305, 306, 311, 312,
- 317, 318, 323, 324, 329, 330, 335, 340, 341, 344,
- 345, 350, 351, 356, 360, 364, 365, 371, 372, 378,
- 379, 384, 385, 390, 391, 396, 397, 402, 403, 408,
- 409, 414, 415, 420, 421, 426, 427, 432, 433, 438,
- 439, 444, 445, 450, 451, 456, 457, 462, 463, 468,
- 469, 474, 475, 480, 481, 486, 487, 492, 493, 498,
- 499, 504, 506, 510, 512, 514, 518, 520, 522, 526,
- 529, 531, 535, 537, 539, 543, 545, 550, 551, 554,
- 555, 560, 561, 567, 568, 573, 574, 580, 581, 587,
- 588, 594, 595, 596, 605, 607, 610, 613, 616, 619,
- 622, 628, 635, 638, 639, 643, 646, 647, 650, 651,
- 656, 657, 662, 663, 670, 671, 678, 679, 684, 686,
- 687, 692, 695, 696, 698, 699, 701, 703, 705, 707,
- 709, 710, 712, 713, 720, 721, 726, 727, 734, 735,
- 740, 742, 744, 748, 751, 753, 754, 757, 758, 763,
- 764, 769, 770, 775, 776, 781, 784, 785, 790, 791,
- 797, 798, 804, 805, 810, 811, 817, 818, 823, 824,
- 829, 830, 835, 836, 841, 842, 848, 849, 856, 857,
- 862, 863, 869, 870, 877, 878, 883, 884, 889, 890,
- 895, 896, 901, 902, 907, 908, 913, 914, 919, 920,
- 926, 927, 933, 934, 940, 941, 946, 947, 952, 953,
- 958, 959, 964, 965, 970, 971, 976, 977, 982, 983,
- 988, 989, 994, 995, 1000, 1001, 1006, 1007, 1012, 1013,
- 1018, 1019, 1024, 1025, 1030, 1031, 1038, 1039, 1044, 1045,
- 1052, 1053, 1059, 1060, 1063, 1064, 1070, 1071, 1076, 1078,
- 1080, 1081, 1083, 1085, 1086, 1089, 1090, 1097, 1098, 1105,
- 1106, 1111, 1112, 1117, 1118, 1124, 1126, 1128, 1130, 1132,
- 1134, 1136
-};
+ return new;
+}
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int16 yyrhs[] =
+/*
+ * insert into head of list.
+ */
+static void
+insspspec(rmconf, spspec)
+ struct remoteconf *rmconf;
+ struct secprotospec *spspec;
{
- 175, 0, -1, -1, 175, 176, -1, 177, -1, 185,
- -1, 189, -1, 190, -1, 191, -1, 192, -1, 194,
- -1, 202, -1, 223, -1, 213, -1, 239, -1, 277,
- -1, 286, -1, 306, -1, 187, -1, 3, 171, 178,
- 172, -1, -1, 178, 179, -1, -1, 4, 160, 180,
- 170, -1, -1, 4, 156, 181, 170, -1, -1, 5,
- 160, 182, 170, -1, -1, 5, 156, 183, 170, -1,
- -1, 6, 160, 184, 170, -1, -1, 7, 8, 160,
- 186, 170, -1, -1, 129, 157, 188, 170, -1, 9,
- 160, 170, -1, 10, 156, 170, -1, 127, 128, 170,
- -1, 11, 193, 170, -1, 12, -1, 13, 171, 195,
- 172, -1, -1, 195, 196, -1, -1, 14, 157, 197,
- 170, -1, -1, 15, 157, 198, 170, -1, -1, 16,
- 156, 199, 170, -1, -1, 17, 157, 200, 170, -1,
- -1, 18, 157, 201, 170, -1, 19, 171, 203, 172,
- -1, -1, 203, 204, -1, -1, 20, 211, 205, 170,
- -1, -1, 21, 211, 206, 170, -1, -1, 24, 160,
- 160, 160, 156, 207, 170, -1, -1, 24, 160, 208,
- 170, -1, -1, 24, 25, 209, 170, -1, -1, 23,
- 210, 170, -1, 161, 212, -1, -1, 139, -1, -1,
- 39, 214, 171, 215, 172, -1, -1, 215, 216, -1,
- -1, 40, 160, 160, 217, 170, -1, -1, 40, 160,
- 156, 160, 218, 170, -1, -1, 41, 160, 160, 219,
- 170, -1, -1, 41, 160, 156, 160, 220, 170, -1,
- -1, 42, 156, 221, 170, -1, -1, 43, 156, 222,
- 170, -1, -1, 26, 224, 171, 225, 172, -1, -1,
- 225, 226, -1, -1, 29, 156, 227, 170, -1, -1,
- 27, 160, 228, 170, -1, -1, 28, 156, 229, 170,
- -1, -1, 30, 160, 230, 170, -1, -1, 33, 157,
- 231, 170, -1, -1, 31, 160, 232, 170, -1, -1,
- 32, 160, 233, 170, -1, -1, 34, 160, 234, 170,
- -1, -1, 35, 160, 235, 170, -1, -1, 36, 160,
- 236, 170, -1, -1, 37, 160, 237, 170, -1, -1,
- 38, 160, 238, 170, -1, 44, 171, 240, 172, -1,
- -1, 240, 241, -1, -1, 45, 161, 242, 170, -1,
- -1, 46, 161, 243, 170, -1, 47, 267, 170, -1,
- 48, 269, 170, -1, -1, 64, 65, 271, 244, 170,
- -1, -1, 64, 66, 271, 245, 170, -1, -1, 67,
- 275, 246, 170, -1, -1, 49, 160, 247, 170, -1,
- -1, 50, 52, 248, 170, -1, -1, 50, 53, 249,
- 170, -1, -1, 50, 54, 250, 170, -1, -1, 50,
- 55, 251, 170, -1, -1, 51, 273, 252, 170, -1,
- -1, 58, 52, 253, 170, -1, -1, 58, 55, 254,
- 170, -1, -1, 59, 57, 255, 170, -1, -1, 59,
- 52, 256, 170, -1, -1, 59, 53, 257, 170, -1,
- -1, 59, 54, 258, 170, -1, -1, 62, 156, 259,
- 170, -1, -1, 68, 156, 260, 170, -1, -1, 69,
- 157, 261, 170, -1, -1, 63, 156, 262, 170, -1,
- -1, 60, 56, 263, 170, -1, -1, 60, 53, 264,
- 170, -1, -1, 60, 55, 265, 170, -1, -1, 61,
- 160, 266, 170, -1, 268, -1, 268, 173, 267, -1,
- 161, -1, 270, -1, 270, 173, 269, -1, 161, -1,
- 272, -1, 271, 173, 272, -1, 161, 138, -1, 274,
- -1, 274, 173, 273, -1, 160, -1, 276, -1, 276,
- 173, 275, -1, 160, -1, 70, 171, 278, 172, -1,
- -1, 278, 279, -1, -1, 71, 156, 280, 170, -1,
- -1, 72, 156, 376, 281, 170, -1, -1, 73, 156,
- 282, 170, -1, -1, 74, 156, 376, 283, 170, -1,
- -1, 75, 156, 376, 284, 170, -1, -1, 76, 156,
- 376, 285, 170, -1, -1, -1, 80, 287, 289, 291,
- 171, 292, 288, 172, -1, 83, -1, 83, 84, -1,
- 83, 290, -1, 290, 83, -1, 290, 84, -1, 290,
- 290, -1, 101, 161, 302, 303, 304, -1, 101, 161,
- 162, 302, 303, 304, -1, 101, 160, -1, -1, 81,
- 101, 368, -1, 5, 160, -1, -1, 292, 293, -1,
- -1, 146, 367, 294, 170, -1, -1, 151, 156, 295,
- 170, -1, -1, 147, 148, 156, 376, 296, 170, -1,
- -1, 147, 149, 156, 377, 297, 170, -1, -1, 77,
- 298, 299, 170, -1, 301, -1, -1, 301, 300, 173,
- 299, -1, 78, 305, -1, -1, 138, -1, -1, 139,
- -1, 140, -1, 156, -1, 141, -1, 142, -1, -1,
- 156, -1, -1, 82, 160, 85, 160, 307, 311, -1,
- -1, 82, 160, 308, 312, -1, -1, 82, 313, 85,
- 313, 309, 311, -1, -1, 82, 313, 310, 312, -1,
- 312, -1, 170, -1, 171, 314, 172, -1, 83, 212,
- -1, 211, -1, -1, 314, 315, -1, -1, 86, 211,
- 316, 170, -1, -1, 87, 317, 363, 170, -1, -1,
- 89, 90, 318, 170, -1, -1, 91, 92, 319, 170,
- -1, 93, 364, -1, -1, 95, 160, 320, 170, -1,
- -1, 95, 107, 160, 321, 170, -1, -1, 95, 108,
- 160, 322, 170, -1, -1, 95, 106, 323, 170, -1,
- -1, 96, 107, 160, 324, 170, -1, -1, 97, 157,
- 325, 170, -1, -1, 98, 157, 326, 170, -1, -1,
- 99, 157, 327, 170, -1, -1, 100, 157, 328, 170,
- -1, -1, 103, 101, 368, 329, 170, -1, -1, 103,
- 101, 102, 368, 330, 170, -1, -1, 135, 368, 331,
- 170, -1, -1, 104, 101, 368, 332, 170, -1, -1,
- 104, 101, 102, 368, 333, 170, -1, -1, 105, 157,
- 334, 170, -1, -1, 109, 156, 335, 170, -1, -1,
- 110, 336, 367, 170, -1, -1, 112, 157, 337, 170,
- -1, -1, 143, 157, 338, 170, -1, -1, 143, 115,
- 339, 170, -1, -1, 144, 156, 340, 170, -1, -1,
- 152, 160, 153, 341, 170, -1, -1, 152, 160, 154,
- 342, 170, -1, -1, 152, 160, 155, 343, 170, -1,
- -1, 145, 157, 344, 170, -1, -1, 136, 157, 345,
- 170, -1, -1, 118, 157, 346, 170, -1, -1, 118,
- 119, 347, 170, -1, -1, 120, 157, 348, 170, -1,
- -1, 113, 157, 349, 170, -1, -1, 114, 157, 350,
- 170, -1, -1, 114, 115, 351, 170, -1, -1, 130,
- 157, 352, 170, -1, -1, 131, 156, 353, 170, -1,
- -1, 132, 156, 354, 170, -1, -1, 133, 156, 355,
- 170, -1, -1, 137, 157, 356, 170, -1, -1, 137,
- 115, 357, 170, -1, -1, 134, 156, 358, 170, -1,
- -1, 147, 148, 156, 376, 359, 170, -1, -1, 116,
- 117, 360, 170, -1, -1, 147, 149, 156, 377, 361,
- 170, -1, -1, 121, 362, 171, 369, 172, -1, -1,
- 363, 88, -1, -1, 107, 160, 160, 365, 170, -1,
- -1, 108, 160, 366, 170, -1, 78, -1, 156, -1,
- -1, 161, -1, 160, -1, -1, 369, 370, -1, -1,
- 147, 148, 156, 376, 371, 170, -1, -1, 147, 149,
- 156, 377, 372, 170, -1, -1, 110, 367, 373, 170,
- -1, -1, 126, 160, 374, 170, -1, -1, 77, 78,
- 305, 375, 170, -1, 167, -1, 168, -1, 169, -1,
- 163, -1, 164, -1, 165, -1, 166, -1
-};
+ if (rmconf->spspec != NULL)
+ rmconf->spspec->prev = spspec;
+ spspec->next = rmconf->spspec;
+ rmconf->spspec = spspec;
+}
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
+static struct secprotospec *
+dupspspec(spspec)
+ struct secprotospec *spspec;
{
- 0, 336, 336, 338, 341, 342, 343, 344, 345, 346,
- 347, 348, 349, 350, 351, 352, 353, 354, 355, 360,
- 362, 364, 368, 367, 378, 378, 380, 379, 390, 390,
- 391, 391, 397, 396, 417, 417, 422, 436, 443, 455,
- 458, 472, 474, 476, 479, 479, 480, 480, 481, 481,
- 482, 482, 483, 483, 488, 490, 492, 496, 495, 502,
- 501, 513, 512, 522, 521, 531, 530, 539, 539, 542,
- 554, 555, 560, 560, 577, 579, 583, 582, 601, 600,
- 619, 618, 637, 636, 655, 654, 664, 663, 676, 676,
- 687, 689, 693, 692, 704, 703, 715, 714, 724, 723,
- 735, 734, 744, 743, 755, 754, 766, 765, 777, 776,
- 788, 787, 799, 798, 810, 809, 824, 826, 828, 832,
- 831, 843, 842, 853, 855, 858, 857, 867, 866, 876,
- 875, 883, 882, 895, 894, 904, 903, 917, 916, 930,
- 929, 943, 942, 950, 949, 959, 958, 972, 971, 981,
- 980, 990, 989, 1003, 1002, 1016, 1015, 1026, 1025, 1035,
- 1034, 1044, 1043, 1053, 1052, 1062, 1061, 1075, 1074, 1088,
- 1087, 1101, 1102, 1105, 1122, 1123, 1126, 1143, 1144, 1147,
- 1170, 1171, 1174, 1208, 1209, 1212, 1249, 1251, 1253, 1257,
- 1256, 1262, 1261, 1267, 1266, 1272, 1271, 1277, 1276, 1282,
- 1281, 1298, 1306, 1297, 1345, 1350, 1355, 1360, 1365, 1370,
- 1377, 1426, 1491, 1520, 1523, 1548, 1561, 1563, 1567, 1566,
- 1572, 1571, 1577, 1576, 1582, 1581, 1593, 1593, 1600, 1605,
- 1604, 1611, 1667, 1668, 1671, 1672, 1673, 1676, 1677, 1678,
- 1681, 1682, 1688, 1687, 1718, 1717, 1738, 1737, 1761, 1760,
- 1777, 1778, 1786, 1793, 1799, 1808, 1810, 1814, 1813, 1823,
- 1822, 1827, 1827, 1828, 1828, 1829, 1831, 1830, 1851, 1850,
- 1868, 1867, 1898, 1897, 1912, 1911, 1928, 1928, 1929, 1929,
- 1930, 1930, 1931, 1931, 1933, 1932, 1942, 1941, 1951, 1950,
- 1968, 1967, 1985, 1984, 2001, 2001, 2002, 2002, 2004, 2003,
- 2009, 2009, 2010, 2010, 2011, 2011, 2012, 2012, 2022, 2022,
- 2029, 2029, 2036, 2036, 2043, 2043, 2044, 2044, 2047, 2047,
- 2048, 2048, 2049, 2049, 2050, 2050, 2052, 2051, 2063, 2062,
- 2074, 2073, 2082, 2081, 2091, 2090, 2100, 2099, 2108, 2108,
- 2109, 2109, 2111, 2110, 2116, 2115, 2120, 2120, 2122, 2121,
- 2136, 2135, 2146, 2148, 2172, 2171, 2193, 2192, 2226, 2234,
- 2246, 2247, 2248, 2250, 2252, 2256, 2255, 2261, 2260, 2273,
- 2272, 2278, 2277, 2291, 2290, 2388, 2389, 2390, 2393, 2394,
- 2395, 2396
-};
-#endif
+ struct secprotospec *new;
-#if YYDEBUG || YYERROR_VERBOSE || 0
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "PRIVSEP", "USER", "GROUP", "CHROOT",
- "PATH", "PATHTYPE", "INCLUDE", "PFKEY_BUFFER", "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", "LDAPCFG",
- "LDAP_HOST", "LDAP_PORT", "LDAP_PVER", "LDAP_BASE", "LDAP_BIND_DN",
- "LDAP_BIND_PW", "LDAP_SUBTREE", "LDAP_ATTR_USER", "LDAP_ATTR_ADDR",
- "LDAP_ATTR_MASK", "LDAP_ATTR_GROUP", "LDAP_ATTR_MEMBER", "RADCFG",
- "RAD_AUTH", "RAD_ACCT", "RAD_TIMEOUT", "RAD_RETRIES", "MODECFG",
- "CFG_NET4", "CFG_MASK4", "CFG_DNS4", "CFG_NBNS4", "CFG_DEFAULT_DOMAIN",
- "CFG_AUTH_SOURCE", "CFG_AUTH_GROUPS", "CFG_SYSTEM", "CFG_RADIUS",
- "CFG_PAM", "CFG_LDAP", "CFG_LOCAL", "CFG_NONE", "CFG_GROUP_SOURCE",
- "CFG_ACCOUNTING", "CFG_CONF_SOURCE", "CFG_MOTD", "CFG_POOL_SIZE",
- "CFG_AUTH_THROTTLE", "CFG_SPLIT_NETWORK", "CFG_SPLIT_LOCAL",
- "CFG_SPLIT_INCLUDE", "CFG_SPLIT_DNS", "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",
- "CLIENTADDR", "INHERIT", "REMOTE_ADDRESS", "EXCHANGE_MODE",
- "EXCHANGETYPE", "DOI", "DOITYPE", "SITUATION", "SITUATIONTYPE",
- "CERTIFICATE_TYPE", "CERTTYPE", "PEERS_CERTFILE", "CA_TYPE",
- "VERIFY_CERT", "SEND_CERT", "SEND_CR", "MATCH_EMPTY_CR",
- "IDENTIFIERTYPE", "IDENTIFIERQUAL", "MY_IDENTIFIER", "PEERS_IDENTIFIER",
- "VERIFY_IDENTIFIER", "DNSSEC", "CERT_X509", "CERT_PLAINRSA",
- "NONCE_SIZE", "DH_GROUP", "KEEPALIVE", "PASSIVE", "INITIAL_CONTACT",
- "NAT_TRAVERSAL", "REMOTE_FORCE_LEVEL", "PROPOSAL_CHECK",
- "PROPOSAL_CHECK_LEVEL", "GENERATE_POLICY", "GENERATE_LEVEL",
- "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",
- "PH1ID", "XAUTH_LOGIN", "WEAK_PHASE1_CHECK", "REKEY", "PREFIX", "PORT",
- "PORTANY", "UL_PROTO", "ANY", "IKE_FRAG", "ESP_FRAG", "MODE_CFG",
- "PFS_GROUP", "LIFETIME", "LIFETYPE_TIME", "LIFETYPE_BYTE", "STRENGTH",
- "REMOTEID", "SCRIPT", "PHASE1_UP", "PHASE1_DOWN", "PHASE1_DEAD",
- "NUMBER", "SWITCH", "BOOLEAN", "HEXSTRING", "QUOTEDSTRING", "ADDRSTRING",
- "ADDRRANGE", "UNITTYPE_BYTE", "UNITTYPE_KBYTES", "UNITTYPE_MBYTES",
- "UNITTYPE_TBYTES", "UNITTYPE_SEC", "UNITTYPE_MIN", "UNITTYPE_HOUR",
- "EOS", "BOC", "EOC", "COMMA", "$accept", "statements", "statement",
- "privsep_statement", "privsep_stmts", "privsep_stmt", "$@1", "$@2",
- "$@3", "$@4", "$@5", "path_statement", "$@6", "special_statement", "$@7",
- "include_statement", "pfkey_statement", "gssenc_statement",
- "logging_statement", "log_level", "padding_statement", "padding_stmts",
- "padding_stmt", "$@8", "$@9", "$@10", "$@11", "$@12", "listen_statement",
- "listen_stmts", "listen_stmt", "$@13", "$@14", "$@15", "$@16", "$@17",
- "$@18", "ike_addrinfo_port", "ike_port", "radcfg_statement", "$@19",
- "radcfg_stmts", "radcfg_stmt", "$@20", "$@21", "$@22", "$@23", "$@24",
- "$@25", "ldapcfg_statement", "$@26", "ldapcfg_stmts", "ldapcfg_stmt",
- "$@27", "$@28", "$@29", "$@30", "$@31", "$@32", "$@33", "$@34", "$@35",
- "$@36", "$@37", "$@38", "modecfg_statement", "modecfg_stmts",
- "modecfg_stmt", "$@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",
- "addrdnslist", "addrdns", "addrwinslist", "addrwins", "splitnetlist",
- "splitnet", "authgrouplist", "authgroup", "splitdnslist", "splitdns",
- "timer_statement", "timer_stmts", "timer_stmt", "$@64", "$@65", "$@66",
- "$@67", "$@68", "$@69", "sainfo_statement", "$@70", "$@71",
- "sainfo_name", "sainfo_id", "sainfo_param", "sainfo_specs",
- "sainfo_spec", "$@72", "$@73", "$@74", "$@75", "$@76", "algorithms",
- "$@77", "algorithm", "prefix", "port", "ul_proto", "keylength",
- "remote_statement", "$@78", "$@79", "$@80", "$@81",
- "remote_specs_inherit_block", "remote_specs_block", "remote_index",
- "remote_specs", "remote_spec", "$@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", "exchange_types", "cert_spec", "$@129", "$@130", "dh_group_num",
- "identifierstring", "isakmpproposal_specs", "isakmpproposal_spec",
- "$@131", "$@132", "$@133", "$@134", "$@135", "unittype_time",
- "unittype_byte", YY_NULL
-};
-#endif
+ new = newspspec();
+ if (new == NULL) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "dupspspec: malloc failed\n");
+ return NULL;
+ }
+ memcpy(new, spspec, sizeof(*new));
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
- 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
- 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
- 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
- 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
- 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
- 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
- 425, 426, 427, 428
-};
-# endif
+ if (spspec->gssid) {
+ new->gssid = racoon_strdup(spspec->gssid);
+ STRDUP_FATAL(new->gssid);
+ }
+ if (spspec->remote) {
+ new->remote = racoon_malloc(sizeof(*new->remote));
+ if (new->remote == NULL) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "dupspspec: malloc failed (remote)\n");
+ return NULL;
+ }
+ memcpy(new->remote, spspec->remote, sizeof(*new->remote));
+ }
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint16 yyr1[] =
-{
- 0, 174, 175, 175, 176, 176, 176, 176, 176, 176,
- 176, 176, 176, 176, 176, 176, 176, 176, 176, 177,
- 178, 178, 180, 179, 181, 179, 182, 179, 183, 179,
- 184, 179, 186, 185, 188, 187, 189, 190, 191, 192,
- 193, 194, 195, 195, 197, 196, 198, 196, 199, 196,
- 200, 196, 201, 196, 202, 203, 203, 205, 204, 206,
- 204, 207, 204, 208, 204, 209, 204, 210, 204, 211,
- 212, 212, 214, 213, 215, 215, 217, 216, 218, 216,
- 219, 216, 220, 216, 221, 216, 222, 216, 224, 223,
- 225, 225, 227, 226, 228, 226, 229, 226, 230, 226,
- 231, 226, 232, 226, 233, 226, 234, 226, 235, 226,
- 236, 226, 237, 226, 238, 226, 239, 240, 240, 242,
- 241, 243, 241, 241, 241, 244, 241, 245, 241, 246,
- 241, 247, 241, 248, 241, 249, 241, 250, 241, 251,
- 241, 252, 241, 253, 241, 254, 241, 255, 241, 256,
- 241, 257, 241, 258, 241, 259, 241, 260, 241, 261,
- 241, 262, 241, 263, 241, 264, 241, 265, 241, 266,
- 241, 267, 267, 268, 269, 269, 270, 271, 271, 272,
- 273, 273, 274, 275, 275, 276, 277, 278, 278, 280,
- 279, 281, 279, 282, 279, 283, 279, 284, 279, 285,
- 279, 287, 288, 286, 289, 289, 289, 289, 289, 289,
- 290, 290, 290, 291, 291, 291, 292, 292, 294, 293,
- 295, 293, 296, 293, 297, 293, 298, 293, 299, 300,
- 299, 301, 302, 302, 303, 303, 303, 304, 304, 304,
- 305, 305, 307, 306, 308, 306, 309, 306, 310, 306,
- 311, 311, 312, 313, 313, 314, 314, 316, 315, 317,
- 315, 318, 315, 319, 315, 315, 320, 315, 321, 315,
- 322, 315, 323, 315, 324, 315, 325, 315, 326, 315,
- 327, 315, 328, 315, 329, 315, 330, 315, 331, 315,
- 332, 315, 333, 315, 334, 315, 335, 315, 336, 315,
- 337, 315, 338, 315, 339, 315, 340, 315, 341, 315,
- 342, 315, 343, 315, 344, 315, 345, 315, 346, 315,
- 347, 315, 348, 315, 349, 315, 350, 315, 351, 315,
- 352, 315, 353, 315, 354, 315, 355, 315, 356, 315,
- 357, 315, 358, 315, 359, 315, 360, 315, 361, 315,
- 362, 315, 363, 363, 365, 364, 366, 364, 367, 367,
- 368, 368, 368, 369, 369, 371, 370, 372, 370, 373,
- 370, 374, 370, 375, 370, 376, 376, 376, 377, 377,
- 377, 377
-};
+ return new;
+}
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
+/*
+ * copy the whole list
+ */
+void
+dupspspec_list(dst, src)
+ struct remoteconf *dst, *src;
{
- 0, 2, 0, 2, 1, 1, 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, 3, 3,
- 1, 4, 0, 2, 0, 4, 0, 4, 0, 4,
- 0, 4, 0, 4, 4, 0, 2, 0, 4, 0,
- 4, 0, 7, 0, 4, 0, 4, 0, 3, 2,
- 0, 1, 0, 5, 0, 2, 0, 5, 0, 6,
- 0, 5, 0, 6, 0, 4, 0, 4, 0, 5,
- 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, 4, 0, 2, 0,
- 4, 0, 4, 3, 3, 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,
- 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
- 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
- 4, 1, 3, 1, 1, 3, 1, 1, 3, 2,
- 1, 3, 1, 1, 3, 1, 4, 0, 2, 0,
- 4, 0, 5, 0, 4, 0, 5, 0, 5, 0,
- 5, 0, 0, 8, 1, 2, 2, 2, 2, 2,
- 5, 6, 2, 0, 3, 2, 0, 2, 0, 4,
- 0, 4, 0, 6, 0, 6, 0, 4, 1, 0,
- 4, 2, 0, 1, 0, 1, 1, 1, 1, 1,
- 0, 1, 0, 6, 0, 4, 0, 6, 0, 4,
- 1, 1, 3, 2, 1, 0, 2, 0, 4, 0,
- 4, 0, 4, 0, 4, 2, 0, 4, 0, 5,
- 0, 5, 0, 4, 0, 5, 0, 4, 0, 4,
- 0, 4, 0, 4, 0, 5, 0, 6, 0, 4,
- 0, 5, 0, 6, 0, 4, 0, 4, 0, 4,
- 0, 4, 0, 4, 0, 4, 0, 4, 0, 5,
- 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, 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, 6, 0, 6, 0,
- 4, 0, 4, 0, 5, 1, 1, 1, 1, 1,
- 1, 1
-};
+ struct secprotospec *p, *new, *last;
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint16 yydefact[] =
-{
- 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 88, 72, 0, 0, 201, 0, 0, 0, 3, 4,
- 5, 18, 6, 7, 8, 9, 10, 11, 13, 12,
- 14, 15, 16, 17, 20, 0, 0, 0, 40, 0,
- 42, 55, 0, 0, 117, 187, 0, 70, 244, 70,
- 254, 248, 0, 34, 0, 32, 36, 37, 39, 0,
- 0, 90, 74, 0, 0, 204, 0, 213, 0, 71,
- 253, 0, 0, 69, 0, 0, 38, 0, 0, 0,
- 0, 19, 21, 0, 0, 0, 0, 0, 0, 41,
- 43, 0, 0, 67, 0, 54, 56, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 116, 118, 0, 0,
- 0, 0, 0, 0, 186, 188, 205, 206, 212, 232,
- 0, 0, 0, 207, 208, 209, 242, 255, 245, 246,
- 249, 35, 24, 22, 28, 26, 30, 33, 44, 46,
- 48, 50, 52, 57, 59, 0, 65, 63, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 89, 91, 0, 0, 0, 0, 73, 75, 119, 121,
- 173, 0, 171, 176, 0, 174, 131, 133, 135, 137,
- 139, 182, 141, 180, 143, 145, 149, 151, 153, 147,
- 165, 167, 163, 169, 155, 161, 0, 0, 185, 129,
- 183, 157, 159, 189, 0, 193, 0, 0, 0, 233,
- 232, 234, 215, 360, 216, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 0, 0, 0, 94, 96, 92, 98, 102, 104,
- 100, 106, 108, 110, 112, 114, 0, 0, 84, 86,
- 0, 0, 123, 0, 124, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 125, 177, 127, 0,
- 0, 0, 0, 0, 375, 376, 377, 191, 0, 195,
- 197, 199, 234, 235, 236, 0, 362, 361, 214, 202,
- 251, 243, 250, 0, 259, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 298, 0,
- 0, 0, 0, 0, 0, 350, 0, 0, 0, 0,
- 0, 360, 0, 0, 0, 0, 0, 0, 0, 252,
- 256, 247, 25, 23, 29, 27, 31, 45, 47, 49,
- 51, 53, 58, 60, 66, 0, 64, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 0, 80, 0, 0, 120, 122, 172, 175, 132,
- 134, 136, 138, 140, 142, 181, 144, 146, 150, 152,
- 154, 148, 166, 168, 164, 170, 156, 162, 179, 0,
- 0, 0, 130, 184, 158, 160, 190, 0, 194, 0,
- 0, 0, 0, 238, 239, 237, 210, 226, 0, 0,
- 0, 0, 217, 257, 352, 261, 263, 0, 0, 265,
- 272, 0, 0, 266, 0, 276, 278, 280, 282, 360,
- 360, 294, 296, 0, 300, 324, 328, 326, 346, 320,
- 318, 322, 0, 330, 332, 334, 336, 342, 288, 316,
- 340, 338, 304, 302, 306, 314, 0, 0, 0, 61,
- 95, 97, 93, 99, 103, 105, 101, 107, 109, 111,
- 113, 115, 78, 0, 82, 0, 85, 87, 178, 126,
- 128, 192, 196, 198, 200, 211, 0, 358, 359, 218,
- 0, 0, 220, 203, 0, 0, 0, 0, 0, 356,
- 0, 268, 270, 0, 274, 0, 0, 0, 0, 360,
- 284, 360, 290, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 363, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 308, 310, 312, 0, 0, 77, 0, 81, 240, 0,
- 228, 0, 0, 0, 0, 258, 353, 260, 262, 264,
- 354, 0, 273, 0, 0, 267, 0, 277, 279, 281,
- 283, 286, 0, 292, 0, 295, 297, 299, 301, 325,
- 329, 327, 347, 321, 319, 323, 0, 331, 333, 335,
- 337, 343, 289, 317, 341, 339, 305, 303, 307, 315,
- 344, 378, 379, 380, 381, 348, 0, 0, 0, 62,
- 79, 83, 241, 231, 227, 0, 219, 222, 224, 221,
- 0, 357, 269, 271, 275, 0, 285, 0, 291, 0,
- 0, 0, 0, 351, 364, 0, 0, 309, 311, 313,
- 0, 0, 0, 355, 287, 293, 240, 369, 371, 0,
- 0, 345, 349, 230, 223, 225, 373, 0, 0, 0,
- 0, 0, 370, 372, 365, 367, 374, 0, 0, 366,
- 368
-};
+ for(p = src->spspec, last = NULL; p; p = p->next, last = new) {
+ new = dupspspec(p);
+ if (new == NULL)
+ exit(1);
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 1, 18, 19, 54, 82, 229, 228, 231, 230,
- 232, 20, 83, 21, 77, 22, 23, 24, 25, 39,
- 26, 59, 90, 233, 234, 235, 236, 237, 27, 60,
- 96, 238, 239, 563, 243, 241, 155, 50, 70, 28,
- 43, 98, 177, 493, 564, 495, 566, 383, 384, 29,
- 42, 97, 171, 369, 367, 368, 370, 373, 371, 372,
- 374, 375, 376, 377, 378, 30, 63, 117, 260, 261,
- 410, 411, 289, 266, 267, 268, 269, 270, 271, 273,
- 274, 278, 275, 276, 277, 283, 291, 292, 284, 281,
- 279, 280, 282, 181, 182, 184, 185, 286, 287, 192,
- 193, 209, 210, 31, 64, 125, 293, 417, 298, 419,
- 420, 421, 32, 46, 431, 67, 68, 132, 309, 432,
- 571, 574, 661, 662, 506, 569, 635, 570, 221, 305,
- 426, 633, 33, 225, 72, 227, 75, 311, 312, 51,
- 226, 350, 514, 434, 516, 517, 523, 583, 584, 520,
- 586, 525, 526, 527, 528, 592, 645, 550, 594, 647,
- 533, 534, 453, 536, 555, 554, 556, 626, 627, 628,
- 557, 551, 542, 541, 543, 537, 539, 538, 545, 546,
- 547, 548, 553, 552, 549, 655, 540, 656, 462, 515,
- 439, 640, 581, 509, 308, 606, 654, 687, 688, 677,
- 678, 681, 297, 625
-};
+ new->prev = last;
+ new->next = NULL; /* not necessary but clean */
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -542
-static const yytype_int16 yypact[] =
-{
- -542, 42, -542, -124, 46, -87, -72, 82, -63, -39,
- -542, -542, -29, -15, -542, -50, 34, 7, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, 12, 10, 21, -542, 25,
- -542, -542, 38, 40, -542, -542, 30, 66, 89, 66,
- -542, 143, 37, -542, 3, -542, -542, -542, -542, -4,
- -5, -542, -542, 29, -9, 35, -11, 36, 45, -542,
- -542, 72, 63, -542, -45, 63, -542, 71, -53, -13,
- 76, -542, -542, 73, 85, 87, 90, 88, 99, -542,
- -542, 94, 94, -542, -8, -542, -542, -7, -6, 96,
- 97, 102, 104, 107, 106, 108, 54, 81, 4, 110,
- 103, 115, 122, 112, 118, 109, -542, -542, 119, 120,
- 121, 123, 124, 125, -542, -542, -542, -542, -542, -90,
- 113, 177, 111, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, 114, -542, 126, 127, 129,
- 132, 130, 131, 133, 135, 134, 136, 137, 138, 139,
- -542, -542, 140, 141, 146, 147, -542, -542, -542, -542,
- -542, 142, 144, -542, 145, 148, -542, -542, -542, -542,
- -542, -542, -542, 149, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, 150, 150, -542, -542,
- 151, -542, -542, -542, 14, -542, 14, 14, 14, -542,
- 157, 50, -542, 32, -542, 27, 117, 27, 153, 155,
- 156, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- -542, 167, 154, 168, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -12, -3, -542, -542,
- 169, 170, -542, 102, -542, 104, 171, 173, 174, 175,
- 176, 178, 108, 179, 180, 181, 182, 183, 184, 185,
- 187, 188, 189, 190, 191, 172, 192, -542, 192, 193,
- 112, 194, 196, 197, -542, -542, -542, -542, 198, -542,
- -542, -542, 50, -542, -542, -1, -542, -542, -542, -21,
- -542, -542, -542, 94, -542, 214, 213, 92, -37, 199,
- 152, 205, 212, 215, 206, 207, 216, 218, -542, 219,
- 220, -57, 201, -75, 221, -542, 222, 224, 225, 226,
- 227, 32, 228, -30, -20, 230, 231, 70, 210, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, 233, -542, 217, 223, 229,
- 232, 234, 235, 236, 237, 238, 239, 240, 241, 211,
- -542, 243, -542, 242, 244, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, 150,
- 245, 246, -542, -542, -542, -542, -542, 247, -542, 248,
- 249, 250, -1, -542, -542, -542, -542, -542, -38, 75,
- 257, 203, -542, -542, -542, -542, -542, 261, 262, -542,
- -542, 263, 264, -542, 265, -542, -542, -542, -542, -59,
- -56, -542, -542, -38, -542, -542, -542, -542, -542, -542,
- -542, -542, 255, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, 271, 272, 31, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, 259, -542, 260, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, 269, -542, -542, -542,
- 275, 276, -542, -542, 266, -49, 267, 268, 273, -542,
- 270, -542, -542, 274, -542, 277, 278, 279, 280, 32,
- -542, 32, -542, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 291, -542, 292, 294, 295, 296, 297,
- 298, 299, 300, 301, 302, 303, 304, 305, 14, 13,
- -542, -542, -542, 306, 307, -542, 308, -542, 323, 310,
- 309, 311, 14, 13, 313, -542, -542, -542, -542, -542,
- -542, 314, -542, 315, 316, -542, 317, -542, -542, -542,
- -542, -542, 318, -542, 319, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -27, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, 320, 321, 322, -542,
- -542, -542, -542, -542, -542, 324, -542, -542, -542, -542,
- 325, -542, -542, -542, -542, 326, -542, 328, -542, 312,
- -38, 333, 91, -542, -542, 329, 330, -542, -542, -542,
- 269, 331, 332, -542, -542, -542, 323, -542, -542, 338,
- 347, -542, -542, -542, -542, -542, -542, 334, 335, 14,
- 13, 336, -542, -542, -542, -542, -542, 337, 339, -542,
- -542
-};
+ if (last)
+ last->next = new;
+ else /* first element */
+ dst->spspec = new;
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
-{
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -88, 342, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, 20, -542, 48, -542, 327, -93, 47,
- -542, 105, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, 86, -542, -542, -542,
- -542, -542, -542, -542, -542, -340, -542, -542, 293, 95,
- -95, -282, -542, -542, -542, -542, -542, 208, 98, 360,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -542, -542, -542, -542, -542, -542, -542,
- -542, -542, -542, -448, -335, -542, -542, -542, -542, -542,
- -542, -542, -216, -541
-};
+ }
+}
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -230
-static const yytype_int16 yytable[] =
+/*
+ * delete the whole list
+ */
+void
+flushspspec(rmconf)
+ struct remoteconf *rmconf;
{
- 299, 300, 301, 153, 154, 535, 468, 78, 79, 80,
- 84, 85, 86, 87, 88, 91, 92, 156, 93, 94,
- 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 638, 47, 172, 173, 174, 175, 47, 576,
- 507, 130, 2, 529, 459, 3, 531, 34, 219, 4,
- 649, 5, 6, 7, 35, 8, 427, 200, 456, 201,
- 202, 9, 118, 119, 120, 121, 122, 123, 10, 440,
- 441, 442, 220, 36, 99, 100, 101, 102, 103, 104,
- 105, 11, 460, 650, 37, 470, 12, 106, 107, 108,
- 109, 110, 111, 112, 38, 472, 113, 114, 115, 651,
- 457, 306, 307, 142, 306, 307, 194, 143, 40, 195,
- 48, 49, 13, 65, 530, 532, 49, 131, 508, 126,
- 652, 577, 14, 443, 15, 428, 429, 471, 133, 134,
- 430, 66, 41, 196, 197, 198, 66, 473, 199, 685,
- 423, 424, 44, 144, 379, 653, 66, 145, 380, 128,
- 129, 127, 157, 381, 135, 425, 45, 382, 187, 188,
- 189, 190, 52, 124, 53, 170, 176, 95, 89, 16,
- 138, 17, 55, 140, 71, 81, 621, 622, 623, 624,
- 56, 294, 295, 296, 560, 561, 562, 206, 207, 303,
- 304, 57, 306, 307, 591, 58, 593, 310, 137, 437,
- 438, 116, 667, 313, 314, 69, 315, 76, 316, 61,
- 317, 62, 318, 319, 320, 321, 322, 323, 476, 477,
- 324, 325, 326, 510, 511, 433, 327, 328, 74, 329,
- 330, 331, 136, 332, 137, 333, 146, 334, 335, 669,
- 670, 141, 148, 147, 149, 151, 150, 336, 337, 338,
- 339, 340, 341, 342, 343, 49, 152, 178, 179, 204,
- 344, 345, 346, 180, 347, 183, 212, 186, 191, 348,
- 203, 205, 208, 222, 211, 213, 214, 215, 223, 216,
- 217, 218, 224, 387, 240, 245, 242, 244, 246, 349,
- 247, 248, 250, 249, 251, 219, 252, 253, 254, 255,
- 256, 257, 258, 259, 435, 436, 444, 449, 450, 445,
- 408, 285, 262, 388, 365, 264, 498, 263, 458, 395,
- 673, 265, 272, 352, 290, 353, 354, 505, 355, 356,
- 357, 358, 359, 360, 361, 362, 363, 364, 366, 385,
- 386, 389, 620, 390, 391, 392, 393, 568, 394, 396,
- 397, 398, 399, 400, 401, 402, 637, 403, 404, 405,
- 406, 407, 446, 412, 414, 409, 415, 416, 418, 447,
- 478, 492, 448, 451, 452, 513, 454, 455, 461, 463,
- 464, 465, 466, 467, 676, 469, 474, 480, 475, 479,
- 666, 73, 0, 481, 0, 413, 0, 422, 0, 482,
- 0, 0, 483, 494, 484, 485, 486, 487, 488, 489,
- 490, 491, 496, 512, 497, 499, 500, 501, 502, 503,
- 504, 518, 519, 521, 522, 524, 544, 558, 559, 565,
- 567, 572, 573, 580, 139, 351, 575, 578, 579, 0,
- 582, 0, 0, 0, 585, 0, 0, 587, 588, 589,
- 590, 595, 596, 597, 598, 599, 600, 601, 602, 603,
- 604, 605, 607, 684, 608, 609, 610, 611, 612, 613,
- 614, 615, 616, 617, 618, 619, 629, 630, 631, 632,
- 634, 636, -229, 639, 641, 642, 643, 644, 646, 648,
- 657, 658, 659, 668, 679, 663, 664, 660, 665, 671,
- 672, 674, 675, 680, 682, 683, 686, 689, 0, 690,
- 0, 0, 0, 302, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 288
-};
-
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-542))
+ struct secprotospec *p;
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
+ while(rmconf->spspec != NULL) {
+ p = rmconf->spspec;
+ rmconf->spspec = p->next;
+ if (p->next != NULL)
+ p->next->prev = NULL; /* not necessary but clean */
-static const yytype_int16 yycheck[] =
-{
- 216, 217, 218, 91, 92, 453, 341, 4, 5, 6,
- 14, 15, 16, 17, 18, 20, 21, 25, 23, 24,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 573, 83, 40, 41, 42, 43, 83, 88,
- 78, 5, 0, 102, 119, 3, 102, 171, 138, 7,
- 77, 9, 10, 11, 8, 13, 77, 53, 115, 55,
- 56, 19, 71, 72, 73, 74, 75, 76, 26, 106,
- 107, 108, 162, 160, 45, 46, 47, 48, 49, 50,
- 51, 39, 157, 110, 156, 115, 44, 58, 59, 60,
- 61, 62, 63, 64, 12, 115, 67, 68, 69, 126,
- 157, 160, 161, 156, 160, 161, 52, 160, 171, 55,
- 160, 161, 70, 83, 449, 450, 161, 81, 156, 84,
- 147, 170, 80, 160, 82, 146, 147, 157, 83, 84,
- 151, 101, 171, 52, 53, 54, 101, 157, 57, 680,
- 141, 142, 171, 156, 156, 172, 101, 160, 160, 160,
- 161, 65, 160, 156, 68, 156, 171, 160, 52, 53,
- 54, 55, 128, 172, 157, 172, 172, 172, 172, 127,
- 72, 129, 160, 75, 85, 172, 163, 164, 165, 166,
- 170, 167, 168, 169, 153, 154, 155, 65, 66, 139,
- 140, 170, 160, 161, 529, 170, 531, 170, 171, 107,
- 108, 172, 650, 86, 87, 139, 89, 170, 91, 171,
- 93, 171, 95, 96, 97, 98, 99, 100, 148, 149,
- 103, 104, 105, 148, 149, 313, 109, 110, 85, 112,
- 113, 114, 160, 116, 171, 118, 160, 120, 121, 148,
- 149, 170, 157, 170, 157, 157, 156, 130, 131, 132,
- 133, 134, 135, 136, 137, 161, 157, 161, 161, 156,
- 143, 144, 145, 161, 147, 161, 157, 160, 160, 152,
- 160, 156, 160, 160, 156, 156, 156, 156, 101, 156,
- 156, 156, 171, 263, 170, 156, 160, 160, 156, 172,
- 160, 160, 157, 160, 160, 138, 160, 160, 160, 160,
- 160, 160, 156, 156, 90, 92, 107, 101, 101, 157,
- 138, 161, 170, 265, 160, 170, 409, 173, 117, 272,
- 660, 173, 173, 170, 173, 170, 170, 422, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 558, 170, 170, 170, 170, 78, 170, 170,
- 170, 170, 170, 170, 170, 170, 572, 170, 170, 170,
- 170, 170, 157, 170, 170, 173, 170, 170, 170, 157,
- 160, 160, 157, 157, 156, 172, 157, 157, 157, 157,
- 156, 156, 156, 156, 666, 157, 156, 170, 157, 156,
- 78, 49, -1, 170, -1, 290, -1, 302, -1, 170,
- -1, -1, 170, 160, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 156, 170, 170, 170, 170, 170, 170,
- 170, 160, 160, 160, 160, 160, 171, 156, 156, 170,
- 170, 156, 156, 160, 74, 227, 170, 170, 170, -1,
- 170, -1, -1, -1, 170, -1, -1, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 679, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 156,
- 170, 170, 173, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 160, 156, 170, 170, 173, 170, 170,
- 170, 170, 170, 156, 170, 170, 170, 170, -1, 170,
- -1, -1, -1, 220, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 207
-};
+ if (p->gssid)
+ racoon_free(p->gssid);
+ if (p->remote)
+ racoon_free(p->remote);
+ racoon_free(p);
+ }
+ rmconf->spspec = NULL;
+}
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint16 yystos[] =
+/* set final acceptable proposal */
+static int
+set_isakmp_proposal(rmconf)
+ struct remoteconf *rmconf;
{
- 0, 175, 0, 3, 7, 9, 10, 11, 13, 19,
- 26, 39, 44, 70, 80, 82, 127, 129, 176, 177,
- 185, 187, 189, 190, 191, 192, 194, 202, 213, 223,
- 239, 277, 286, 306, 171, 8, 160, 156, 12, 193,
- 171, 171, 224, 214, 171, 171, 287, 83, 160, 161,
- 211, 313, 128, 157, 178, 160, 170, 170, 170, 195,
- 203, 171, 171, 240, 278, 83, 101, 289, 290, 139,
- 212, 85, 308, 212, 85, 310, 170, 188, 4, 5,
- 6, 172, 179, 186, 14, 15, 16, 17, 18, 172,
- 196, 20, 21, 23, 24, 172, 204, 225, 215, 45,
- 46, 47, 48, 49, 50, 51, 58, 59, 60, 61,
- 62, 63, 64, 67, 68, 69, 172, 241, 71, 72,
- 73, 74, 75, 76, 172, 279, 84, 290, 160, 161,
- 5, 81, 291, 83, 84, 290, 160, 171, 312, 313,
- 312, 170, 156, 160, 156, 160, 160, 170, 157, 157,
- 156, 157, 157, 211, 211, 210, 25, 160, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 172, 226, 40, 41, 42, 43, 172, 216, 161, 161,
- 161, 267, 268, 161, 269, 270, 160, 52, 53, 54,
- 55, 160, 273, 274, 52, 55, 52, 53, 54, 57,
- 53, 55, 56, 160, 156, 156, 65, 66, 160, 275,
- 276, 156, 157, 156, 156, 156, 156, 156, 156, 138,
- 162, 302, 160, 101, 171, 307, 314, 309, 181, 180,
- 183, 182, 184, 197, 198, 199, 200, 201, 205, 206,
- 170, 209, 160, 208, 160, 156, 156, 160, 160, 160,
- 157, 160, 160, 160, 160, 160, 160, 160, 156, 156,
- 242, 243, 170, 173, 170, 173, 247, 248, 249, 250,
- 251, 252, 173, 253, 254, 256, 257, 258, 255, 264,
- 265, 263, 266, 259, 262, 161, 271, 272, 271, 246,
- 173, 260, 261, 280, 167, 168, 169, 376, 282, 376,
- 376, 376, 302, 139, 140, 303, 160, 161, 368, 292,
- 170, 311, 312, 86, 87, 89, 91, 93, 95, 96,
- 97, 98, 99, 100, 103, 104, 105, 109, 110, 112,
- 113, 114, 116, 118, 120, 121, 130, 131, 132, 133,
- 134, 135, 136, 137, 143, 144, 145, 147, 152, 172,
- 315, 311, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 160, 170, 228, 229, 227,
- 230, 232, 233, 231, 234, 235, 236, 237, 238, 156,
- 160, 156, 160, 221, 222, 170, 170, 267, 269, 170,
- 170, 170, 170, 170, 170, 273, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 138, 173,
- 244, 245, 170, 275, 170, 170, 170, 281, 170, 283,
- 284, 285, 303, 141, 142, 156, 304, 77, 146, 147,
- 151, 288, 293, 211, 317, 90, 92, 107, 108, 364,
- 106, 107, 108, 160, 107, 157, 157, 157, 157, 101,
- 101, 157, 156, 336, 157, 157, 115, 157, 117, 119,
- 157, 157, 362, 157, 156, 156, 156, 156, 368, 157,
- 115, 157, 115, 157, 156, 157, 148, 149, 160, 156,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 160, 217, 160, 219, 170, 170, 272, 170,
- 170, 170, 170, 170, 170, 304, 298, 78, 156, 367,
- 148, 149, 156, 172, 316, 363, 318, 319, 160, 160,
- 323, 160, 160, 320, 160, 325, 326, 327, 328, 102,
- 368, 102, 368, 334, 335, 367, 337, 349, 351, 350,
- 360, 347, 346, 348, 171, 352, 353, 354, 355, 358,
- 331, 345, 357, 356, 339, 338, 340, 344, 156, 156,
- 153, 154, 155, 207, 218, 170, 220, 170, 78, 299,
- 301, 294, 156, 156, 295, 170, 88, 170, 170, 170,
- 160, 366, 170, 321, 322, 170, 324, 170, 170, 170,
- 170, 368, 329, 368, 332, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 369, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 376, 163, 164, 165, 166, 377, 341, 342, 343, 170,
- 170, 170, 156, 305, 170, 300, 170, 376, 377, 170,
- 365, 170, 170, 170, 170, 330, 170, 333, 170, 77,
- 110, 126, 147, 172, 370, 359, 361, 170, 170, 170,
- 173, 296, 297, 170, 170, 170, 78, 367, 160, 148,
- 149, 170, 170, 299, 170, 170, 305, 373, 374, 156,
- 156, 375, 170, 170, 376, 377, 170, 371, 372, 170,
- 170
-};
-
-#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 yyerrorlab
-
-
-/* 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. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
+ struct secprotospec *s;
+ int prop_no = 1;
+ int trns_no = 1;
+ int32_t types[MAXALGCLASS];
-/* This macro is provided for backward compatibility. */
+ /* mandatory check */
+ if (rmconf->spspec == NULL) {
+ yyerror("no remote specification found: %s.\n",
+ saddr2str(rmconf->remote));
+ return -1;
+ }
+ for (s = rmconf->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;
+ }
+ }
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+ /* skip to last part */
+ for (s = rmconf->spspec; s->next != NULL; s = s->next)
+ ;
+ while (s != NULL) {
+ plog(LLV_DEBUG2, LOCATION, NULL,
+ "lifetime = %ld\n", (long)
+ (s->lifetime ? s->lifetime : rmconf->lifetime));
+ plog(LLV_DEBUG2, LOCATION, NULL,
+ "lifebyte = %d\n",
+ s->lifebyte ? s->lifebyte : rmconf->lifebyte);
+ plog(LLV_DEBUG2, LOCATION, NULL,
+ "encklen=%d\n", s->encklen);
-/* YYLEX -- calling `yylex' with the right arguments. */
+ 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];
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
+ /* expanding spspec */
+ clean_tmpalgtype();
+ trns_no = expand_isakmpspec(prop_no, trns_no, types,
+ algclass_isakmp_enc, algclass_isakmp_ameth + 1,
+ s->lifetime ? s->lifetime : rmconf->lifetime,
+ s->lifebyte ? s->lifebyte : rmconf->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;
+ }
-/* Enable debugging if requested. */
-#if YYDEBUG
+ s = s->prev;
+ }
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
+ if (rmconf->proposal == NULL) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "no proposal found.\n");
+ return -1;
+ }
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
+ return 0;
}
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
+clean_tmpalgtype()
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
+ int i;
+ for (i = 0; i < MAXALGCLASS; i++)
+ tmpalgtype[i] = 0; /* means algorithm undefined. */
}
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
+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;
{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
+ struct isakmpsa *new;
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
+ /* debugging */
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
+ 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 YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
+#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
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
+ /* 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) {
+ if ((new->gssid = vmalloc(strlen(gssid))) == NULL) {
+ racoon_free(new);
+ yyerror("failed to allocate gssid");
+ return -1;
+ }
+ 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);
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
+ return trns_no;
}
-# endif
-# endif
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
+#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;
{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
+ if (t < 1024) {
+ yyerror("byte size should be more than 1024B.");
+ return 0;
+ }
- return yyd - 1;
+ return(t / 1024);
}
-# endif
-# endif
+#endif
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
+int
+cfparse()
{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
+ int error;
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
+ yyerrorcount = 0;
+ yycf_init_buffer();
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
+ if (yycf_switch_buffer(lcconf->racoon_conf) != 0) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "could not read configuration file \"%s\"\n",
+ lcconf->racoon_conf);
+ return -1;
+ }
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
+ 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;
+ }
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
+ if (error == 0 && yyerrorcount) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "parse error is nothing, but yyerrorcount is %d.\n",
+ yyerrorcount);
+ exit(1);
+ }
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ yycf_clean_buffer();
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
+ plog(LLV_DEBUG2, LOCATION, NULL, "parse successed.\n");
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
+ return 0;
}
-#endif /* YYERROR_VERBOSE */
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
+int
+cfreparse()
+{
+ flushph2();
+ flushph1();
+ flushrmconf();
+ flushsainfo();
+ clean_tmpalgtype();
+ return(cfparse());
+}
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
+#ifdef ENABLE_ADMINPORT
static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+adminsock_conf(path, owner, group, mode_dec)
+ vchar_t *path;
+ vchar_t *owner;
+ vchar_t *group;
+ int mode_dec;
{
- YYUSE (yyvaluep);
+ struct passwd *pw = NULL;
+ struct group *gr = NULL;
+ mode_t mode = 0;
+ uid_t uid;
+ gid_t gid;
+ int isnum;
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ adminsock_path = path->v;
- switch (yytype)
- {
+ if (owner == NULL)
+ return;
- default:
- break;
- }
-}
+ 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);
-/* The lookahead symbol. */
-int yychar;
+ if (gr)
+ adminsock_group = gr->gr_gid;
+ else
+ adminsock_group = gid;
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
+ if (mode_dec == -1)
+ return;
-/* Number of syntax errors so far. */
-int yynerrs;
+ 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; }
-/*----------.
-| yyparse. |
-`----------*/
+ 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;
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
+ return;
+}
#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
+#line 1933 "racoonyy.tab.c"
+#if YYDEBUG
+#include <stdio.h> /* needed for printf */
#endif
-#endif
-{
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
+#include <stdlib.h> /* needed for malloc, etc */
+#include <string.h> /* needed for memset */
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+/* allocate initial stack or double stack size, up to YYMAXDEPTH */
+static int yygrowstack(YYSTACKDATA *data)
+{
+ int i;
+ unsigned newsize;
+ YYINT *newss;
+ YYSTYPE *newvs;
+
+ if ((newsize = data->stacksize) == 0)
+ newsize = YYINITSTACKSIZE;
+ else if (newsize >= YYMAXDEPTH)
+ return YYENOMEM;
+ else if ((newsize *= 2) > YYMAXDEPTH)
+ newsize = YYMAXDEPTH;
+
+ i = (int) (data->s_mark - data->s_base);
+ newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
+ if (newss == 0)
+ return YYENOMEM;
+
+ data->s_base = newss;
+ data->s_mark = newss + i;
+
+ newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
+ if (newvs == 0)
+ return YYENOMEM;
+
+ data->l_base = newvs;
+ data->l_mark = newvs + i;
+
+ data->stacksize = newsize;
+ data->s_last = data->s_base + newsize - 1;
+ return 0;
+}
- /* 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;
- yyvsp = yyvs;
- goto yysetstate;
+#if YYPURE || defined(YY_NO_LEAKS)
+static void yyfreestack(YYSTACKDATA *data)
+{
+ free(data->s_base);
+ free(data->l_base);
+ memset(data, 0, sizeof(*data));
+}
+#else
+#define yyfreestack(data) /* nothing */
+#endif
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
- yysetstate:
- *yyssp = yystate;
+int
+YYPARSE_DECL()
+{
+ int yym, yyn, yystate;
+#if YYDEBUG
+ const char *yys;
- if (yyss + yystacksize - 1 <= yyssp)
+ if ((yys = getenv("YYDEBUG")) != 0)
{
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* 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;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
}
+#endif
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
+ yym = 0;
+ yyn = 0;
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = YYEMPTY;
+ yystate = 0;
- /* Not known => get a lookahead token if don't already have one. */
+#if YYPURE
+ memset(&yystack, 0, sizeof(yystack));
+#endif
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
+ if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystack.s_mark = yystack.s_base;
+ yystack.l_mark = yystack.l_base;
+ yystate = 0;
+ *yystack.s_mark = 0;
- if (yychar <= YYEOF)
+yyloop:
+ if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
+ if (yychar < 0)
{
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
}
- else
+ if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
{
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ yychar = YYEMPTY;
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
}
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
+ if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
{
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
+ yyn = yytable[yyn];
+ goto yyreduce;
}
+ if (yyerrflag != 0) goto yyinrecovery;
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
+ YYERROR_CALL("syntax error");
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
+ goto yyerrlab; /* redundant goto avoids 'unused label' warning */
+yyerrlab:
+ ++yynerrs;
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yystack.s_mark);
+#endif
+ if (yystack.s_mark <= yystack.s_base) goto yyabort;
+ --yystack.s_mark;
+ --yystack.l_mark;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == YYEOF) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = YYEMPTY;
+ goto yyloop;
+ }
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ if (yym > 0)
+ yyval = yystack.l_mark[1-yym];
+ else
+ memset(&yyval, 0, sizeof yyval);
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 22:
-/* Line 1787 of yacc.c */
-#line 368 "cfparse.y"
+ switch (yyn)
{
+case 21:
+#line 368 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct passwd *pw;
- if ((pw = getpwnam((yyvsp[(2) - (2)].val)->v)) == NULL) {
- yyerror("unknown user \"%s\"", (yyvsp[(2) - (2)].val)->v);
+ if ((pw = getpwnam(yystack.l_mark[0].val->v)) == NULL) {
+ yyerror("unknown user \"%s\"", yystack.l_mark[0].val->v);
return -1;
}
lcconf->uid = pw->pw_uid;
}
- break;
-
- case 24:
-/* Line 1787 of yacc.c */
-#line 378 "cfparse.y"
- { lcconf->uid = (yyvsp[(2) - (2)].num); }
- break;
-
- case 26:
-/* Line 1787 of yacc.c */
-#line 380 "cfparse.y"
- {
+break;
+case 23:
+#line 378 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->uid = yystack.l_mark[0].num; }
+break;
+case 25:
+#line 380 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct group *gr;
- if ((gr = getgrnam((yyvsp[(2) - (2)].val)->v)) == NULL) {
- yyerror("unknown group \"%s\"", (yyvsp[(2) - (2)].val)->v);
+ if ((gr = getgrnam(yystack.l_mark[0].val->v)) == NULL) {
+ yyerror("unknown group \"%s\"", yystack.l_mark[0].val->v);
return -1;
}
lcconf->gid = gr->gr_gid;
}
- break;
-
- case 28:
-/* Line 1787 of yacc.c */
-#line 390 "cfparse.y"
- { lcconf->gid = (yyvsp[(2) - (2)].num); }
- break;
-
- case 30:
-/* Line 1787 of yacc.c */
-#line 391 "cfparse.y"
- { lcconf->chroot = (yyvsp[(2) - (2)].val)->v; }
- break;
-
- case 32:
-/* Line 1787 of yacc.c */
-#line 397 "cfparse.y"
- {
- if ((yyvsp[(2) - (3)].num) >= LC_PATHTYPE_MAX) {
- yyerror("invalid path type %d", (yyvsp[(2) - (3)].num));
+break;
+case 27:
+#line 390 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->gid = yystack.l_mark[0].num; }
+break;
+case 29:
+#line 391 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->chroot = yystack.l_mark[0].val->v; }
+break;
+case 31:
+#line 397 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ if (yystack.l_mark[-1].num >= LC_PATHTYPE_MAX) {
+ yyerror("invalid path type %d", yystack.l_mark[-1].num);
return -1;
}
/* free old pathinfo */
- if (lcconf->pathinfo[(yyvsp[(2) - (3)].num)])
- racoon_free(lcconf->pathinfo[(yyvsp[(2) - (3)].num)]);
+ if (lcconf->pathinfo[yystack.l_mark[-1].num])
+ racoon_free(lcconf->pathinfo[yystack.l_mark[-1].num]);
/* set new pathinfo */
- lcconf->pathinfo[(yyvsp[(2) - (3)].num)] = racoon_strdup((yyvsp[(3) - (3)].val)->v);
- STRDUP_FATAL(lcconf->pathinfo[(yyvsp[(2) - (3)].num)]);
- vfree((yyvsp[(3) - (3)].val));
- }
- break;
-
- case 34:
-/* Line 1787 of yacc.c */
-#line 417 "cfparse.y"
- { lcconf->complex_bundle = (yyvsp[(2) - (2)].num); }
- break;
-
- case 36:
-/* Line 1787 of yacc.c */
-#line 423 "cfparse.y"
- {
+ lcconf->pathinfo[yystack.l_mark[-1].num] = racoon_strdup(yystack.l_mark[0].val->v);
+ STRDUP_FATAL(lcconf->pathinfo[yystack.l_mark[-1].num]);
+ vfree(yystack.l_mark[0].val);
+ }
+break;
+case 33:
+#line 417 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->complex_bundle = yystack.l_mark[0].num; }
+break;
+case 35:
+#line 423 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
char path[MAXPATHLEN];
getpathname(path, sizeof(path),
- LC_PATHTYPE_INCLUDE, (yyvsp[(2) - (3)].val)->v);
- vfree((yyvsp[(2) - (3)].val));
+ LC_PATHTYPE_INCLUDE, yystack.l_mark[-1].val->v);
+ vfree(yystack.l_mark[-1].val);
if (yycf_switch_buffer(path) != 0)
return -1;
}
- break;
-
- case 37:
-/* Line 1787 of yacc.c */
-#line 437 "cfparse.y"
- {
- lcconf->pfkey_buffer_size = (yyvsp[(2) - (3)].num);
+break;
+case 36:
+#line 437 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ lcconf->pfkey_buffer_size = yystack.l_mark[-1].num;
}
- break;
-
- case 38:
-/* Line 1787 of yacc.c */
-#line 444 "cfparse.y"
- {
- if ((yyvsp[(2) - (3)].num) >= LC_GSSENC_MAX) {
- yyerror("invalid GSS ID encoding %d", (yyvsp[(2) - (3)].num));
+break;
+case 37:
+#line 444 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ if (yystack.l_mark[-1].num >= LC_GSSENC_MAX) {
+ yyerror("invalid GSS ID encoding %d", yystack.l_mark[-1].num);
return -1;
}
- lcconf->gss_id_enc = (yyvsp[(2) - (3)].num);
+ lcconf->gss_id_enc = yystack.l_mark[-1].num;
}
- break;
-
- case 40:
-/* Line 1787 of yacc.c */
-#line 459 "cfparse.y"
- {
+break;
+case 39:
+#line 459 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
/*
* set the loglevel to the value specified
* in the configuration file plus the number
* of -d options specified on the command line
*/
- loglevel += (yyvsp[(1) - (1)].num) - oldloglevel;
- oldloglevel = (yyvsp[(1) - (1)].num);
- }
- break;
-
- case 44:
-/* Line 1787 of yacc.c */
-#line 479 "cfparse.y"
- { lcconf->pad_random = (yyvsp[(2) - (2)].num); }
- break;
-
- case 46:
-/* Line 1787 of yacc.c */
-#line 480 "cfparse.y"
- { lcconf->pad_randomlen = (yyvsp[(2) - (2)].num); }
- break;
-
- case 48:
-/* Line 1787 of yacc.c */
-#line 481 "cfparse.y"
- { lcconf->pad_maxsize = (yyvsp[(2) - (2)].num); }
- break;
-
- case 50:
-/* Line 1787 of yacc.c */
-#line 482 "cfparse.y"
- { lcconf->pad_strict = (yyvsp[(2) - (2)].num); }
- break;
-
- case 52:
-/* Line 1787 of yacc.c */
-#line 483 "cfparse.y"
- { lcconf->pad_excltail = (yyvsp[(2) - (2)].num); }
- break;
-
- case 57:
-/* Line 1787 of yacc.c */
-#line 496 "cfparse.y"
- {
- myaddr_listen((yyvsp[(2) - (2)].saddr), FALSE);
- racoon_free((yyvsp[(2) - (2)].saddr));
+ loglevel += yystack.l_mark[0].num - oldloglevel;
+ oldloglevel = yystack.l_mark[0].num;
+ }
+break;
+case 43:
+#line 479 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->pad_random = yystack.l_mark[0].num; }
+break;
+case 45:
+#line 480 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->pad_randomlen = yystack.l_mark[0].num; }
+break;
+case 47:
+#line 481 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->pad_maxsize = yystack.l_mark[0].num; }
+break;
+case 49:
+#line 482 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->pad_strict = yystack.l_mark[0].num; }
+break;
+case 51:
+#line 483 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->pad_excltail = yystack.l_mark[0].num; }
+break;
+case 56:
+#line 496 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ myaddr_listen(yystack.l_mark[0].saddr, FALSE);
+ racoon_free(yystack.l_mark[0].saddr);
}
- break;
-
- case 59:
-/* Line 1787 of yacc.c */
-#line 502 "cfparse.y"
- {
+break;
+case 58:
+#line 502 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_NATT
- myaddr_listen((yyvsp[(2) - (2)].saddr), TRUE);
- racoon_free((yyvsp[(2) - (2)].saddr));
+ myaddr_listen(yystack.l_mark[0].saddr, TRUE);
+ racoon_free(yystack.l_mark[0].saddr);
#else
- racoon_free((yyvsp[(2) - (2)].saddr));
+ racoon_free(yystack.l_mark[0].saddr);
yyerror("NAT-T support not compiled in.");
#endif
}
- break;
-
- case 61:
-/* Line 1787 of yacc.c */
-#line 513 "cfparse.y"
- {
+break;
+case 60:
+#line 513 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_ADMINPORT
- adminsock_conf((yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].num));
+ adminsock_conf(yystack.l_mark[-3].val, yystack.l_mark[-2].val, yystack.l_mark[-1].val, yystack.l_mark[0].num);
#else
yywarn("admin port support not compiled in");
#endif
}
- break;
-
- case 63:
-/* Line 1787 of yacc.c */
-#line 522 "cfparse.y"
- {
+break;
+case 62:
+#line 522 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_ADMINPORT
- adminsock_conf((yyvsp[(2) - (2)].val), NULL, NULL, -1);
+ adminsock_conf(yystack.l_mark[0].val, NULL, NULL, -1);
#else
yywarn("admin port support not compiled in");
#endif
}
- break;
-
- case 65:
-/* Line 1787 of yacc.c */
-#line 531 "cfparse.y"
- {
+break;
+case 64:
+#line 531 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_ADMINPORT
adminsock_path = NULL;
#else
yywarn("admin port support not compiled in");
#endif
}
- break;
-
- case 67:
-/* Line 1787 of yacc.c */
-#line 539 "cfparse.y"
- { lcconf->strict_address = TRUE; }
- break;
-
- case 69:
-/* Line 1787 of yacc.c */
-#line 543 "cfparse.y"
- {
+break;
+case 66:
+#line 539 "../../ipsec-tools/src/racoon/cfparse.y"
+ { lcconf->strict_address = TRUE; }
+break;
+case 68:
+#line 543 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
char portbuf[10];
- snprintf(portbuf, sizeof(portbuf), "%ld", (yyvsp[(2) - (2)].num));
- (yyval.saddr) = str2saddr((yyvsp[(1) - (2)].val)->v, portbuf);
- vfree((yyvsp[(1) - (2)].val));
- if (!(yyval.saddr))
+ snprintf(portbuf, sizeof(portbuf), "%ld", yystack.l_mark[0].num);
+ yyval.saddr = str2saddr(yystack.l_mark[-1].val->v, portbuf);
+ vfree(yystack.l_mark[-1].val);
+ if (!yyval.saddr)
return -1;
}
- break;
-
- case 70:
-/* Line 1787 of yacc.c */
-#line 554 "cfparse.y"
- { (yyval.num) = PORT_ISAKMP; }
- break;
-
- case 71:
-/* Line 1787 of yacc.c */
-#line 555 "cfparse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].num); }
- break;
-
- case 72:
-/* Line 1787 of yacc.c */
-#line 560 "cfparse.y"
- {
+break;
+case 69:
+#line 554 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = PORT_ISAKMP; }
+break;
+case 70:
+#line 555 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 71:
+#line 560 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifndef ENABLE_HYBRID
yyerror("racoon not configured with --enable-hybrid");
return -1;
@@ -2909,12 +2337,10 @@ yyreduce:
#endif
#endif
}
- break;
-
- case 76:
-/* Line 1787 of yacc.c */
-#line 583 "cfparse.y"
- {
+break;
+case 75:
+#line 583 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
int i = xauth_rad_config.auth_server_count;
@@ -2923,19 +2349,17 @@ yyreduce:
return -1;
}
- xauth_rad_config.auth_server_list[i].host = vdup((yyvsp[(2) - (3)].val));
- xauth_rad_config.auth_server_list[i].secret = vdup((yyvsp[(3) - (3)].val));
- xauth_rad_config.auth_server_list[i].port = 0; // default port
+ xauth_rad_config.auth_server_list[i].host = vdup(yystack.l_mark[-1].val);
+ xauth_rad_config.auth_server_list[i].secret = vdup(yystack.l_mark[0].val);
+ xauth_rad_config.auth_server_list[i].port = 0; /* default port*/
xauth_rad_config.auth_server_count++;
#endif
#endif
}
- break;
-
- case 78:
-/* Line 1787 of yacc.c */
-#line 601 "cfparse.y"
- {
+break;
+case 77:
+#line 601 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
int i = xauth_rad_config.auth_server_count;
@@ -2944,19 +2368,17 @@ yyreduce:
return -1;
}
- xauth_rad_config.auth_server_list[i].host = vdup((yyvsp[(2) - (4)].val));
- xauth_rad_config.auth_server_list[i].secret = vdup((yyvsp[(4) - (4)].val));
- xauth_rad_config.auth_server_list[i].port = (yyvsp[(3) - (4)].num);
+ xauth_rad_config.auth_server_list[i].host = vdup(yystack.l_mark[-2].val);
+ xauth_rad_config.auth_server_list[i].secret = vdup(yystack.l_mark[0].val);
+ xauth_rad_config.auth_server_list[i].port = yystack.l_mark[-1].num;
xauth_rad_config.auth_server_count++;
#endif
#endif
}
- break;
-
- case 80:
-/* Line 1787 of yacc.c */
-#line 619 "cfparse.y"
- {
+break;
+case 79:
+#line 619 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
int i = xauth_rad_config.acct_server_count;
@@ -2965,19 +2387,17 @@ yyreduce:
return -1;
}
- xauth_rad_config.acct_server_list[i].host = vdup((yyvsp[(2) - (3)].val));
- xauth_rad_config.acct_server_list[i].secret = vdup((yyvsp[(3) - (3)].val));
- xauth_rad_config.acct_server_list[i].port = 0; // default port
+ xauth_rad_config.acct_server_list[i].host = vdup(yystack.l_mark[-1].val);
+ xauth_rad_config.acct_server_list[i].secret = vdup(yystack.l_mark[0].val);
+ xauth_rad_config.acct_server_list[i].port = 0; /* default port*/
xauth_rad_config.acct_server_count++;
#endif
#endif
}
- break;
-
- case 82:
-/* Line 1787 of yacc.c */
-#line 637 "cfparse.y"
- {
+break;
+case 81:
+#line 637 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
int i = xauth_rad_config.acct_server_count;
@@ -2986,43 +2406,37 @@ yyreduce:
return -1;
}
- xauth_rad_config.acct_server_list[i].host = vdup((yyvsp[(2) - (4)].val));
- xauth_rad_config.acct_server_list[i].secret = vdup((yyvsp[(4) - (4)].val));
- xauth_rad_config.acct_server_list[i].port = (yyvsp[(3) - (4)].num);
+ xauth_rad_config.acct_server_list[i].host = vdup(yystack.l_mark[-2].val);
+ xauth_rad_config.acct_server_list[i].secret = vdup(yystack.l_mark[0].val);
+ xauth_rad_config.acct_server_list[i].port = yystack.l_mark[-1].num;
xauth_rad_config.acct_server_count++;
#endif
#endif
}
- break;
-
- case 84:
-/* Line 1787 of yacc.c */
-#line 655 "cfparse.y"
- {
+break;
+case 83:
+#line 655 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
- xauth_rad_config.timeout = (yyvsp[(2) - (2)].num);
+ xauth_rad_config.timeout = yystack.l_mark[0].num;
#endif
#endif
}
- break;
-
- case 86:
-/* Line 1787 of yacc.c */
-#line 664 "cfparse.y"
- {
+break;
+case 85:
+#line 664 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
- xauth_rad_config.retries = (yyvsp[(2) - (2)].num);
+ xauth_rad_config.retries = yystack.l_mark[0].num;
#endif
#endif
}
- break;
-
- case 88:
-/* Line 1787 of yacc.c */
-#line 676 "cfparse.y"
- {
+break;
+case 87:
+#line 676 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifndef ENABLE_HYBRID
yyerror("racoon not configured with --enable-hybrid");
return -1;
@@ -3032,265 +2446,225 @@ yyreduce:
return -1;
#endif
}
- break;
-
- case 92:
-/* Line 1787 of yacc.c */
-#line 693 "cfparse.y"
- {
+break;
+case 91:
+#line 693 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
- if (((yyvsp[(2) - (2)].num)<2)||((yyvsp[(2) - (2)].num)>3))
+ if ((yystack.l_mark[0].num<2)||(yystack.l_mark[0].num>3))
yyerror("invalid ldap protocol version (2|3)");
- xauth_ldap_config.pver = (yyvsp[(2) - (2)].num);
+ xauth_ldap_config.pver = yystack.l_mark[0].num;
#endif
#endif
}
- break;
-
- case 94:
-/* Line 1787 of yacc.c */
-#line 704 "cfparse.y"
- {
+break;
+case 93:
+#line 704 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.host != NULL)
vfree(xauth_ldap_config.host);
- xauth_ldap_config.host = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.host = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 96:
-/* Line 1787 of yacc.c */
-#line 715 "cfparse.y"
- {
+break;
+case 95:
+#line 715 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
- xauth_ldap_config.port = (yyvsp[(2) - (2)].num);
+ xauth_ldap_config.port = yystack.l_mark[0].num;
#endif
#endif
}
- break;
-
- case 98:
-/* Line 1787 of yacc.c */
-#line 724 "cfparse.y"
- {
+break;
+case 97:
+#line 724 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.base != NULL)
vfree(xauth_ldap_config.base);
- xauth_ldap_config.base = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.base = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 100:
-/* Line 1787 of yacc.c */
-#line 735 "cfparse.y"
- {
+break;
+case 99:
+#line 735 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
- xauth_ldap_config.subtree = (yyvsp[(2) - (2)].num);
+ xauth_ldap_config.subtree = yystack.l_mark[0].num;
#endif
#endif
}
- break;
-
- case 102:
-/* Line 1787 of yacc.c */
-#line 744 "cfparse.y"
- {
+break;
+case 101:
+#line 744 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.bind_dn != NULL)
vfree(xauth_ldap_config.bind_dn);
- xauth_ldap_config.bind_dn = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.bind_dn = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 104:
-/* Line 1787 of yacc.c */
-#line 755 "cfparse.y"
- {
+break;
+case 103:
+#line 755 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.bind_pw != NULL)
vfree(xauth_ldap_config.bind_pw);
- xauth_ldap_config.bind_pw = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.bind_pw = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 106:
-/* Line 1787 of yacc.c */
-#line 766 "cfparse.y"
- {
+break;
+case 105:
+#line 766 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.attr_user != NULL)
vfree(xauth_ldap_config.attr_user);
- xauth_ldap_config.attr_user = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.attr_user = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 108:
-/* Line 1787 of yacc.c */
-#line 777 "cfparse.y"
- {
+break;
+case 107:
+#line 777 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.attr_addr != NULL)
vfree(xauth_ldap_config.attr_addr);
- xauth_ldap_config.attr_addr = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.attr_addr = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 110:
-/* Line 1787 of yacc.c */
-#line 788 "cfparse.y"
- {
+break;
+case 109:
+#line 788 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.attr_mask != NULL)
vfree(xauth_ldap_config.attr_mask);
- xauth_ldap_config.attr_mask = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.attr_mask = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 112:
-/* Line 1787 of yacc.c */
-#line 799 "cfparse.y"
- {
+break;
+case 111:
+#line 799 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.attr_group != NULL)
vfree(xauth_ldap_config.attr_group);
- xauth_ldap_config.attr_group = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.attr_group = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 114:
-/* Line 1787 of yacc.c */
-#line 810 "cfparse.y"
- {
+break;
+case 113:
+#line 810 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
if (xauth_ldap_config.attr_member != NULL)
vfree(xauth_ldap_config.attr_member);
- xauth_ldap_config.attr_member = vdup((yyvsp[(2) - (2)].val));
+ xauth_ldap_config.attr_member = vdup(yystack.l_mark[0].val);
#endif
#endif
}
- break;
-
- case 119:
-/* Line 1787 of yacc.c */
-#line 832 "cfparse.y"
- {
+break;
+case 118:
+#line 832 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- if (inet_pton(AF_INET, (yyvsp[(2) - (2)].val)->v,
+ if (inet_pton(AF_INET, yystack.l_mark[0].val->v,
&isakmp_cfg_config.network4) != 1)
yyerror("bad IPv4 network address.");
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 121:
-/* Line 1787 of yacc.c */
-#line 843 "cfparse.y"
- {
+break;
+case 120:
+#line 843 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- if (inet_pton(AF_INET, (yyvsp[(2) - (2)].val)->v,
+ if (inet_pton(AF_INET, yystack.l_mark[0].val->v,
&isakmp_cfg_config.netmask4) != 1)
yyerror("bad IPv4 netmask address.");
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 125:
-/* Line 1787 of yacc.c */
-#line 858 "cfparse.y"
- {
+break;
+case 124:
+#line 858 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
isakmp_cfg_config.splitnet_type = UNITY_LOCAL_LAN;
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 127:
-/* Line 1787 of yacc.c */
-#line 867 "cfparse.y"
- {
+break;
+case 126:
+#line 867 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
isakmp_cfg_config.splitnet_type = UNITY_SPLIT_INCLUDE;
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 129:
-/* Line 1787 of yacc.c */
-#line 876 "cfparse.y"
- {
+break;
+case 128:
+#line 876 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifndef ENABLE_HYBRID
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 131:
-/* Line 1787 of yacc.c */
-#line 883 "cfparse.y"
- {
+break;
+case 130:
+#line 883 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
strncpy(&isakmp_cfg_config.default_domain[0],
- (yyvsp[(2) - (2)].val)->v, MAXPATHLEN);
+ yystack.l_mark[0].val->v, MAXPATHLEN);
isakmp_cfg_config.default_domain[MAXPATHLEN] = '\0';
- vfree((yyvsp[(2) - (2)].val));
+ vfree(yystack.l_mark[0].val);
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 133:
-/* Line 1787 of yacc.c */
-#line 895 "cfparse.y"
- {
+break;
+case 132:
+#line 895 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_SYSTEM;
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 135:
-/* Line 1787 of yacc.c */
-#line 904 "cfparse.y"
- {
+break;
+case 134:
+#line 904 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_RADIUS;
@@ -3301,12 +2675,10 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 137:
-/* Line 1787 of yacc.c */
-#line 917 "cfparse.y"
- {
+break;
+case 136:
+#line 917 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBPAM
isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_PAM;
@@ -3317,12 +2689,10 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 139:
-/* Line 1787 of yacc.c */
-#line 930 "cfparse.y"
- {
+break;
+case 138:
+#line 930 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_LDAP;
@@ -3333,34 +2703,28 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 141:
-/* Line 1787 of yacc.c */
-#line 943 "cfparse.y"
- {
+break;
+case 140:
+#line 943 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifndef ENABLE_HYBRID
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 143:
-/* Line 1787 of yacc.c */
-#line 950 "cfparse.y"
- {
+break;
+case 142:
+#line 950 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
isakmp_cfg_config.groupsource = ISAKMP_CFG_GROUP_SYSTEM;
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 145:
-/* Line 1787 of yacc.c */
-#line 959 "cfparse.y"
- {
+break;
+case 144:
+#line 959 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
isakmp_cfg_config.groupsource = ISAKMP_CFG_GROUP_LDAP;
@@ -3371,36 +2735,30 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 147:
-/* Line 1787 of yacc.c */
-#line 972 "cfparse.y"
- {
+break;
+case 146:
+#line 972 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_NONE;
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 149:
-/* Line 1787 of yacc.c */
-#line 981 "cfparse.y"
- {
+break;
+case 148:
+#line 981 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_SYSTEM;
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 151:
-/* Line 1787 of yacc.c */
-#line 990 "cfparse.y"
- {
+break;
+case 150:
+#line 990 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_RADIUS;
@@ -3411,12 +2769,10 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 153:
-/* Line 1787 of yacc.c */
-#line 1003 "cfparse.y"
- {
+break;
+case 152:
+#line 1003 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBPAM
isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_PAM;
@@ -3427,73 +2783,61 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 155:
-/* Line 1787 of yacc.c */
-#line 1016 "cfparse.y"
- {
+break;
+case 154:
+#line 1016 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- if (isakmp_cfg_resize_pool((yyvsp[(2) - (2)].num)) != 0)
+ if (isakmp_cfg_resize_pool(yystack.l_mark[0].num) != 0)
yyerror("cannot allocate memory for pool");
#else /* ENABLE_HYBRID */
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 157:
-/* Line 1787 of yacc.c */
-#line 1026 "cfparse.y"
- {
+break;
+case 156:
+#line 1026 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- isakmp_cfg_config.pfs_group = (yyvsp[(2) - (2)].num);
+ isakmp_cfg_config.pfs_group = yystack.l_mark[0].num;
#else /* ENABLE_HYBRID */
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 159:
-/* Line 1787 of yacc.c */
-#line 1035 "cfparse.y"
- {
+break;
+case 158:
+#line 1035 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- isakmp_cfg_config.save_passwd = (yyvsp[(2) - (2)].num);
+ isakmp_cfg_config.save_passwd = yystack.l_mark[0].num;
#else /* ENABLE_HYBRID */
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 161:
-/* Line 1787 of yacc.c */
-#line 1044 "cfparse.y"
- {
+break;
+case 160:
+#line 1044 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- isakmp_cfg_config.auth_throttle = (yyvsp[(2) - (2)].num);
+ isakmp_cfg_config.auth_throttle = yystack.l_mark[0].num;
#else /* ENABLE_HYBRID */
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 163:
-/* Line 1787 of yacc.c */
-#line 1053 "cfparse.y"
- {
+break;
+case 162:
+#line 1053 "../../ipsec-tools/src/racoon/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 165:
-/* Line 1787 of yacc.c */
-#line 1062 "cfparse.y"
- {
+break;
+case 164:
+#line 1062 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBRADIUS
isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_RADIUS;
@@ -3504,12 +2848,10 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 167:
-/* Line 1787 of yacc.c */
-#line 1075 "cfparse.y"
- {
+break;
+case 166:
+#line 1075 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
#ifdef HAVE_LIBLDAP
isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_LDAP;
@@ -3520,72 +2862,64 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif /* ENABLE_HYBRID */
}
- break;
-
- case 169:
-/* Line 1787 of yacc.c */
-#line 1088 "cfparse.y"
- {
+break;
+case 168:
+#line 1088 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- strncpy(&isakmp_cfg_config.motd[0], (yyvsp[(2) - (2)].val)->v, MAXPATHLEN);
+ strncpy(&isakmp_cfg_config.motd[0], yystack.l_mark[0].val->v, MAXPATHLEN);
isakmp_cfg_config.motd[MAXPATHLEN] = '\0';
- vfree((yyvsp[(2) - (2)].val));
+ vfree(yystack.l_mark[0].val);
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 173:
-/* Line 1787 of yacc.c */
-#line 1106 "cfparse.y"
- {
+break;
+case 172:
+#line 1106 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
struct isakmp_cfg_config *icc = &isakmp_cfg_config;
if (icc->dns4_index > MAXNS)
yyerror("No more than %d DNS", MAXNS);
- if (inet_pton(AF_INET, (yyvsp[(1) - (1)].val)->v,
+ if (inet_pton(AF_INET, yystack.l_mark[0].val->v,
&icc->dns4[icc->dns4_index++]) != 1)
yyerror("bad IPv4 DNS address.");
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 176:
-/* Line 1787 of yacc.c */
-#line 1127 "cfparse.y"
- {
+break;
+case 175:
+#line 1127 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
struct isakmp_cfg_config *icc = &isakmp_cfg_config;
if (icc->nbns4_index > MAXWINS)
yyerror("No more than %d WINS", MAXWINS);
- if (inet_pton(AF_INET, (yyvsp[(1) - (1)].val)->v,
+ if (inet_pton(AF_INET, yystack.l_mark[0].val->v,
&icc->nbns4[icc->nbns4_index++]) != 1)
yyerror("bad IPv4 WINS address.");
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 179:
-/* Line 1787 of yacc.c */
-#line 1148 "cfparse.y"
- {
+break;
+case 178:
+#line 1148 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
struct isakmp_cfg_config *icc = &isakmp_cfg_config;
struct unity_network network;
memset(&network,0,sizeof(network));
- if (inet_pton(AF_INET, (yyvsp[(1) - (2)].val)->v, &network.addr4) != 1)
+ if (inet_pton(AF_INET, yystack.l_mark[-1].val->v, &network.addr4) != 1)
yyerror("bad IPv4 SPLIT address.");
/* Turn $2 (the prefix) into a subnet mask */
- network.mask4.s_addr = ((yyvsp[(2) - (2)].num)) ? htonl(~((1 << (32 - (yyvsp[(2) - (2)].num))) - 1)) : 0;
+ network.mask4.s_addr = (yystack.l_mark[0].num) ? htonl(~((1 << (32 - yystack.l_mark[0].num)) - 1)) : 0;
/* add the network to our list */
if (splitnet_list_add(&icc->splitnet_list, &network,&icc->splitnet_count))
@@ -3594,12 +2928,10 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 182:
-/* Line 1787 of yacc.c */
-#line 1175 "cfparse.y"
- {
+break;
+case 181:
+#line 1175 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
char * groupname = NULL;
char ** grouplist = NULL;
@@ -3612,132 +2944,114 @@ yyreduce:
return -1;
}
- groupname = racoon_malloc((yyvsp[(1) - (1)].val)->l+1);
+ groupname = racoon_malloc(yystack.l_mark[0].val->l+1);
if (groupname == NULL) {
yyerror("unable to allocate auth group name");
return -1;
}
- memcpy(groupname,(yyvsp[(1) - (1)].val)->v,(yyvsp[(1) - (1)].val)->l);
- groupname[(yyvsp[(1) - (1)].val)->l]=0;
+ memcpy(groupname,yystack.l_mark[0].val->v,yystack.l_mark[0].val->l);
+ groupname[yystack.l_mark[0].val->l]=0;
grouplist[icc->groupcount]=groupname;
icc->grouplist = grouplist;
icc->groupcount++;
- vfree((yyvsp[(1) - (1)].val));
+ vfree(yystack.l_mark[0].val);
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 185:
-/* Line 1787 of yacc.c */
-#line 1213 "cfparse.y"
- {
+break;
+case 184:
+#line 1213 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
struct isakmp_cfg_config *icc = &isakmp_cfg_config;
if (!icc->splitdns_len)
{
- icc->splitdns_list = racoon_malloc((yyvsp[(1) - (1)].val)->l);
+ icc->splitdns_list = racoon_malloc(yystack.l_mark[0].val->l);
if(icc->splitdns_list == NULL) {
yyerror("error allocating splitdns list buffer");
return -1;
}
- memcpy(icc->splitdns_list,(yyvsp[(1) - (1)].val)->v,(yyvsp[(1) - (1)].val)->l);
- icc->splitdns_len = (yyvsp[(1) - (1)].val)->l;
+ memcpy(icc->splitdns_list,yystack.l_mark[0].val->v,yystack.l_mark[0].val->l);
+ icc->splitdns_len = yystack.l_mark[0].val->l;
}
else
{
- int len = icc->splitdns_len + (yyvsp[(1) - (1)].val)->l + 1;
+ int len = icc->splitdns_len + yystack.l_mark[0].val->l + 1;
icc->splitdns_list = racoon_realloc(icc->splitdns_list,len);
if(icc->splitdns_list == NULL) {
yyerror("error allocating splitdns list buffer");
return -1;
}
icc->splitdns_list[icc->splitdns_len] = ',';
- memcpy(icc->splitdns_list + icc->splitdns_len + 1, (yyvsp[(1) - (1)].val)->v, (yyvsp[(1) - (1)].val)->l);
+ memcpy(icc->splitdns_list + icc->splitdns_len + 1, yystack.l_mark[0].val->v, yystack.l_mark[0].val->l);
icc->splitdns_len = len;
}
- vfree((yyvsp[(1) - (1)].val));
+ vfree(yystack.l_mark[0].val);
#else
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 189:
-/* Line 1787 of yacc.c */
-#line 1257 "cfparse.y"
- {
- lcconf->retry_counter = (yyvsp[(2) - (2)].num);
+break;
+case 188:
+#line 1257 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ lcconf->retry_counter = yystack.l_mark[0].num;
}
- break;
-
- case 191:
-/* Line 1787 of yacc.c */
-#line 1262 "cfparse.y"
- {
- lcconf->retry_interval = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
+break;
+case 190:
+#line 1262 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ lcconf->retry_interval = yystack.l_mark[-1].num * yystack.l_mark[0].num;
}
- break;
-
- case 193:
-/* Line 1787 of yacc.c */
-#line 1267 "cfparse.y"
- {
- lcconf->count_persend = (yyvsp[(2) - (2)].num);
+break;
+case 192:
+#line 1267 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ lcconf->count_persend = yystack.l_mark[0].num;
}
- break;
-
- case 195:
-/* Line 1787 of yacc.c */
-#line 1272 "cfparse.y"
- {
- lcconf->retry_checkph1 = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
+break;
+case 194:
+#line 1272 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ lcconf->retry_checkph1 = yystack.l_mark[-1].num * yystack.l_mark[0].num;
}
- break;
-
- case 197:
-/* Line 1787 of yacc.c */
-#line 1277 "cfparse.y"
- {
- lcconf->wait_ph2complete = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
+break;
+case 196:
+#line 1277 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ lcconf->wait_ph2complete = yystack.l_mark[-1].num * yystack.l_mark[0].num;
}
- break;
-
- case 199:
-/* Line 1787 of yacc.c */
-#line 1282 "cfparse.y"
- {
+break;
+case 198:
+#line 1282 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_NATT
if (libipsec_opt & LIBIPSEC_OPT_NATT)
- lcconf->natt_ka_interval = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
+ lcconf->natt_ka_interval = yystack.l_mark[-1].num * yystack.l_mark[0].num;
else
yyerror("libipsec lacks NAT-T support");
#else
yyerror("NAT-T support not compiled in.");
#endif
}
- break;
-
- case 201:
-/* Line 1787 of yacc.c */
-#line 1298 "cfparse.y"
- {
+break;
+case 200:
+#line 1298 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
cur_sainfo = newsainfo();
if (cur_sainfo == NULL) {
yyerror("failed to allocate sainfo");
return -1;
}
}
- break;
-
- case 202:
-/* Line 1787 of yacc.c */
-#line 1306 "cfparse.y"
- {
+break;
+case 201:
+#line 1306 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct sainfo *check;
/* default */
@@ -3773,146 +3087,130 @@ yyreduce:
inssainfo(cur_sainfo);
}
- break;
-
- case 204:
-/* Line 1787 of yacc.c */
-#line 1346 "cfparse.y"
- {
+break;
+case 203:
+#line 1346 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
cur_sainfo->idsrc = SAINFO_ANONYMOUS;
cur_sainfo->iddst = SAINFO_ANONYMOUS;
}
- break;
-
- case 205:
-/* Line 1787 of yacc.c */
-#line 1351 "cfparse.y"
- {
+break;
+case 204:
+#line 1351 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
cur_sainfo->idsrc = SAINFO_ANONYMOUS;
cur_sainfo->iddst = SAINFO_CLIENTADDR;
}
- break;
-
- case 206:
-/* Line 1787 of yacc.c */
-#line 1356 "cfparse.y"
- {
+break;
+case 205:
+#line 1356 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
cur_sainfo->idsrc = SAINFO_ANONYMOUS;
- cur_sainfo->iddst = (yyvsp[(2) - (2)].val);
+ cur_sainfo->iddst = yystack.l_mark[0].val;
}
- break;
-
- case 207:
-/* Line 1787 of yacc.c */
-#line 1361 "cfparse.y"
- {
- cur_sainfo->idsrc = (yyvsp[(1) - (2)].val);
+break;
+case 206:
+#line 1361 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_sainfo->idsrc = yystack.l_mark[-1].val;
cur_sainfo->iddst = SAINFO_ANONYMOUS;
}
- break;
-
- case 208:
-/* Line 1787 of yacc.c */
-#line 1366 "cfparse.y"
- {
- cur_sainfo->idsrc = (yyvsp[(1) - (2)].val);
+break;
+case 207:
+#line 1366 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_sainfo->idsrc = yystack.l_mark[-1].val;
cur_sainfo->iddst = SAINFO_CLIENTADDR;
}
- break;
-
- case 209:
-/* Line 1787 of yacc.c */
-#line 1371 "cfparse.y"
- {
- cur_sainfo->idsrc = (yyvsp[(1) - (2)].val);
- cur_sainfo->iddst = (yyvsp[(2) - (2)].val);
+break;
+case 208:
+#line 1371 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_sainfo->idsrc = yystack.l_mark[-1].val;
+ cur_sainfo->iddst = yystack.l_mark[0].val;
}
- break;
-
- case 210:
-/* Line 1787 of yacc.c */
-#line 1378 "cfparse.y"
- {
+break;
+case 209:
+#line 1378 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
char portbuf[10];
struct sockaddr *saddr;
- if (((yyvsp[(5) - (5)].num) == IPPROTO_ICMP || (yyvsp[(5) - (5)].num) == IPPROTO_ICMPV6)
- && ((yyvsp[(4) - (5)].num) != IPSEC_PORT_ANY || (yyvsp[(4) - (5)].num) != IPSEC_PORT_ANY)) {
+ if ((yystack.l_mark[0].num == IPPROTO_ICMP || yystack.l_mark[0].num == IPPROTO_ICMPV6)
+ && (yystack.l_mark[-1].num != IPSEC_PORT_ANY || yystack.l_mark[-1].num != IPSEC_PORT_ANY)) {
yyerror("port number must be \"any\".");
return -1;
}
- snprintf(portbuf, sizeof(portbuf), "%lu", (yyvsp[(4) - (5)].num));
- saddr = str2saddr((yyvsp[(2) - (5)].val)->v, portbuf);
- vfree((yyvsp[(2) - (5)].val));
+ snprintf(portbuf, sizeof(portbuf), "%lu", yystack.l_mark[-1].num);
+ saddr = str2saddr(yystack.l_mark[-3].val->v, portbuf);
+ vfree(yystack.l_mark[-3].val);
if (saddr == NULL)
return -1;
switch (saddr->sa_family) {
case AF_INET:
- if ((yyvsp[(5) - (5)].num) == IPPROTO_ICMPV6) {
+ if (yystack.l_mark[0].num == IPPROTO_ICMPV6) {
yyerror("upper layer protocol mismatched.\n");
racoon_free(saddr);
return -1;
}
- (yyval.val) = ipsecdoi_sockaddr2id(saddr,
- (yyvsp[(3) - (5)].num) == ~0 ? (sizeof(struct in_addr) << 3): (yyvsp[(3) - (5)].num),
- (yyvsp[(5) - (5)].num));
+ yyval.val = ipsecdoi_sockaddr2id(saddr,
+ yystack.l_mark[-2].num == ~0 ? (sizeof(struct in_addr) << 3): yystack.l_mark[-2].num,
+ yystack.l_mark[0].num);
break;
#ifdef INET6
case AF_INET6:
- if ((yyvsp[(5) - (5)].num) == IPPROTO_ICMP) {
+ if (yystack.l_mark[0].num == IPPROTO_ICMP) {
yyerror("upper layer protocol mismatched.\n");
racoon_free(saddr);
return -1;
}
- (yyval.val) = ipsecdoi_sockaddr2id(saddr,
- (yyvsp[(3) - (5)].num) == ~0 ? (sizeof(struct in6_addr) << 3): (yyvsp[(3) - (5)].num),
- (yyvsp[(5) - (5)].num));
+ yyval.val = ipsecdoi_sockaddr2id(saddr,
+ yystack.l_mark[-2].num == ~0 ? (sizeof(struct in6_addr) << 3): yystack.l_mark[-2].num,
+ yystack.l_mark[0].num);
break;
#endif
default:
yyerror("invalid family: %d", saddr->sa_family);
- (yyval.val) = NULL;
+ yyval.val = NULL;
break;
}
racoon_free(saddr);
- if ((yyval.val) == NULL)
+ if (yyval.val == NULL)
return -1;
}
- break;
-
- case 211:
-/* Line 1787 of yacc.c */
-#line 1427 "cfparse.y"
- {
+break;
+case 210:
+#line 1427 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
char portbuf[10];
struct sockaddr *laddr = NULL, *haddr = NULL;
char *cur = NULL;
- if (((yyvsp[(6) - (6)].num) == IPPROTO_ICMP || (yyvsp[(6) - (6)].num) == IPPROTO_ICMPV6)
- && ((yyvsp[(5) - (6)].num) != IPSEC_PORT_ANY || (yyvsp[(5) - (6)].num) != IPSEC_PORT_ANY)) {
+ if ((yystack.l_mark[0].num == IPPROTO_ICMP || yystack.l_mark[0].num == IPPROTO_ICMPV6)
+ && (yystack.l_mark[-1].num != IPSEC_PORT_ANY || yystack.l_mark[-1].num != IPSEC_PORT_ANY)) {
yyerror("port number must be \"any\".");
return -1;
}
- snprintf(portbuf, sizeof(portbuf), "%lu", (yyvsp[(5) - (6)].num));
+ snprintf(portbuf, sizeof(portbuf), "%lu", yystack.l_mark[-1].num);
- laddr = str2saddr((yyvsp[(2) - (6)].val)->v, portbuf);
+ laddr = str2saddr(yystack.l_mark[-4].val->v, portbuf);
if (laddr == NULL) {
return -1;
}
- vfree((yyvsp[(2) - (6)].val));
- haddr = str2saddr((yyvsp[(3) - (6)].val)->v, portbuf);
+ vfree(yystack.l_mark[-4].val);
+ haddr = str2saddr(yystack.l_mark[-3].val->v, portbuf);
if (haddr == NULL) {
racoon_free(laddr);
return -1;
}
- vfree((yyvsp[(3) - (6)].val));
+ vfree(yystack.l_mark[-3].val);
switch (laddr->sa_family) {
case AF_INET:
- if ((yyvsp[(6) - (6)].num) == IPPROTO_ICMPV6) {
+ if (yystack.l_mark[0].num == IPPROTO_ICMPV6) {
yyerror("upper layer protocol mismatched.\n");
if (laddr)
racoon_free(laddr);
@@ -3920,12 +3218,12 @@ yyreduce:
racoon_free(haddr);
return -1;
}
- (yyval.val) = ipsecdoi_sockrange2id(laddr, haddr,
- (yyvsp[(6) - (6)].num));
+ yyval.val = ipsecdoi_sockrange2id(laddr, haddr,
+ yystack.l_mark[0].num);
break;
#ifdef INET6
case AF_INET6:
- if ((yyvsp[(6) - (6)].num) == IPPROTO_ICMP) {
+ if (yystack.l_mark[0].num == IPPROTO_ICMP) {
yyerror("upper layer protocol mismatched.\n");
if (laddr)
racoon_free(laddr);
@@ -3933,70 +3231,64 @@ yyreduce:
racoon_free(haddr);
return -1;
}
- (yyval.val) = ipsecdoi_sockrange2id(laddr, haddr,
- (yyvsp[(6) - (6)].num));
+ yyval.val = ipsecdoi_sockrange2id(laddr, haddr,
+ yystack.l_mark[0].num);
break;
#endif
default:
yyerror("invalid family: %d", laddr->sa_family);
- (yyval.val) = NULL;
+ yyval.val = NULL;
break;
}
if (laddr)
racoon_free(laddr);
if (haddr)
racoon_free(haddr);
- if ((yyval.val) == NULL)
+ if (yyval.val == NULL)
return -1;
}
- break;
-
- case 212:
-/* Line 1787 of yacc.c */
-#line 1492 "cfparse.y"
- {
+break;
+case 211:
+#line 1492 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct ipsecdoi_id_b *id_b;
- if ((yyvsp[(1) - (2)].num) == IDTYPE_ASN1DN) {
- yyerror("id type forbidden: %d", (yyvsp[(1) - (2)].num));
- (yyval.val) = NULL;
+ if (yystack.l_mark[-1].num == IDTYPE_ASN1DN) {
+ yyerror("id type forbidden: %d", yystack.l_mark[-1].num);
+ yyval.val = NULL;
return -1;
}
- (yyvsp[(2) - (2)].val)->l--;
+ yystack.l_mark[0].val->l--;
- (yyval.val) = vmalloc(sizeof(*id_b) + (yyvsp[(2) - (2)].val)->l);
- if ((yyval.val) == NULL) {
+ yyval.val = vmalloc(sizeof(*id_b) + yystack.l_mark[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) - (2)].num));
+ id_b = (struct ipsecdoi_id_b *)yyval.val->v;
+ id_b->type = idtype2doi(yystack.l_mark[-1].num);
id_b->proto_id = 0;
id_b->port = 0;
- memcpy((yyval.val)->v + sizeof(*id_b), (yyvsp[(2) - (2)].val)->v, (yyvsp[(2) - (2)].val)->l);
+ memcpy(yyval.val->v + sizeof(*id_b), yystack.l_mark[0].val->v, yystack.l_mark[0].val->l);
}
- break;
-
- case 213:
-/* Line 1787 of yacc.c */
-#line 1520 "cfparse.y"
- {
+break;
+case 212:
+#line 1520 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
cur_sainfo->id_i = NULL;
}
- break;
-
- case 214:
-/* Line 1787 of yacc.c */
-#line 1524 "cfparse.y"
- {
+break;
+case 213:
+#line 1524 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct ipsecdoi_id_b *id_b;
vchar_t *idv;
- if (set_identifier(&idv, (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].val)) != 0) {
+ if (set_identifier(&idv, yystack.l_mark[-1].num, yystack.l_mark[0].val) != 0) {
yyerror("failed to set identifer.\n");
return -1;
}
@@ -4007,7 +3299,7 @@ yyreduce:
}
id_b = (struct ipsecdoi_id_b *)cur_sainfo->id_i->v;
- id_b->type = idtype2doi((yyvsp[(2) - (3)].num));
+ id_b->type = idtype2doi(yystack.l_mark[-1].num);
id_b->proto_id = 0;
id_b->port = 0;
@@ -4016,14 +3308,12 @@ yyreduce:
idv->v, idv->l);
vfree(idv);
}
- break;
-
- case 215:
-/* Line 1787 of yacc.c */
-#line 1549 "cfparse.y"
- {
+break;
+case 214:
+#line 1549 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
- if ((cur_sainfo->group = vdup((yyvsp[(2) - (2)].val))) == NULL) {
+ if ((cur_sainfo->group = vdup(yystack.l_mark[0].val)) == NULL) {
yyerror("failed to set sainfo xauth group.\n");
return -1;
}
@@ -4032,229 +3322,189 @@ yyreduce:
return -1;
#endif
}
- break;
-
- case 218:
-/* Line 1787 of yacc.c */
-#line 1567 "cfparse.y"
- {
- cur_sainfo->pfs_group = (yyvsp[(2) - (2)].num);
+break;
+case 217:
+#line 1567 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_sainfo->pfs_group = yystack.l_mark[0].num;
}
- break;
-
- case 220:
-/* Line 1787 of yacc.c */
-#line 1572 "cfparse.y"
- {
- cur_sainfo->remoteid = (yyvsp[(2) - (2)].num);
+break;
+case 219:
+#line 1572 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_sainfo->remoteid = yystack.l_mark[0].num;
}
- break;
-
- case 222:
-/* Line 1787 of yacc.c */
-#line 1577 "cfparse.y"
- {
- cur_sainfo->lifetime = (yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num);
+break;
+case 221:
+#line 1577 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_sainfo->lifetime = yystack.l_mark[-1].num * yystack.l_mark[0].num;
}
- break;
-
- case 224:
-/* Line 1787 of yacc.c */
-#line 1582 "cfparse.y"
- {
+break;
+case 223:
+#line 1582 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#if 1
yyerror("byte lifetime support is deprecated");
return -1;
#else
- cur_sainfo->lifebyte = fix_lifebyte((yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num));
+ cur_sainfo->lifebyte = fix_lifebyte(yystack.l_mark[-1].num * yystack.l_mark[0].num);
if (cur_sainfo->lifebyte == 0)
return -1;
#endif
}
- break;
-
- case 226:
-/* Line 1787 of yacc.c */
-#line 1593 "cfparse.y"
- {
- cur_algclass = (yyvsp[(1) - (1)].num);
+break;
+case 225:
+#line 1593 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_algclass = yystack.l_mark[0].num;
}
- break;
-
- case 228:
-/* Line 1787 of yacc.c */
-#line 1601 "cfparse.y"
- {
- inssainfoalg(&cur_sainfo->algs[cur_algclass], (yyvsp[(1) - (1)].alg));
+break;
+case 227:
+#line 1601 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ inssainfoalg(&cur_sainfo->algs[cur_algclass], yystack.l_mark[0].alg);
}
- break;
-
- case 229:
-/* Line 1787 of yacc.c */
-#line 1605 "cfparse.y"
- {
- inssainfoalg(&cur_sainfo->algs[cur_algclass], (yyvsp[(1) - (1)].alg));
+break;
+case 228:
+#line 1605 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ inssainfoalg(&cur_sainfo->algs[cur_algclass], yystack.l_mark[0].alg);
}
- break;
-
- case 231:
-/* Line 1787 of yacc.c */
-#line 1612 "cfparse.y"
- {
+break;
+case 230:
+#line 1612 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
int defklen;
- (yyval.alg) = newsainfoalg();
- if ((yyval.alg) == NULL) {
+ yyval.alg = newsainfoalg();
+ if (yyval.alg == NULL) {
yyerror("failed to get algorithm allocation");
return -1;
}
- (yyval.alg)->alg = algtype2doi(cur_algclass, (yyvsp[(1) - (2)].num));
- if ((yyval.alg)->alg == -1) {
+ yyval.alg->alg = algtype2doi(cur_algclass, yystack.l_mark[-1].num);
+ if (yyval.alg->alg == -1) {
yyerror("algorithm mismatched");
- racoon_free((yyval.alg));
- (yyval.alg) = NULL;
+ racoon_free(yyval.alg);
+ yyval.alg = NULL;
return -1;
}
- defklen = default_keylen(cur_algclass, (yyvsp[(1) - (2)].num));
+ defklen = default_keylen(cur_algclass, yystack.l_mark[-1].num);
if (defklen == 0) {
- if ((yyvsp[(2) - (2)].num)) {
+ if (yystack.l_mark[0].num) {
yyerror("keylen not allowed");
- racoon_free((yyval.alg));
- (yyval.alg) = NULL;
+ racoon_free(yyval.alg);
+ yyval.alg = NULL;
return -1;
}
} else {
- if ((yyvsp[(2) - (2)].num) && check_keylen(cur_algclass, (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].num)) < 0) {
- yyerror("invalid keylen %d", (yyvsp[(2) - (2)].num));
- racoon_free((yyval.alg));
- (yyval.alg) = NULL;
+ if (yystack.l_mark[0].num && check_keylen(cur_algclass, yystack.l_mark[-1].num, yystack.l_mark[0].num) < 0) {
+ yyerror("invalid keylen %d", yystack.l_mark[0].num);
+ racoon_free(yyval.alg);
+ yyval.alg = NULL;
return -1;
}
}
- if ((yyvsp[(2) - (2)].num))
- (yyval.alg)->encklen = (yyvsp[(2) - (2)].num);
+ if (yystack.l_mark[0].num)
+ yyval.alg->encklen = yystack.l_mark[0].num;
else
- (yyval.alg)->encklen = defklen;
+ yyval.alg->encklen = defklen;
/* check if it's supported algorithm by kernel */
- if (!(cur_algclass == algclass_ipsec_auth && (yyvsp[(1) - (2)].num) == algtype_non_auth)
- && pk_checkalg(cur_algclass, (yyvsp[(1) - (2)].num), (yyval.alg)->encklen)) {
+ if (!(cur_algclass == algclass_ipsec_auth && yystack.l_mark[-1].num == algtype_non_auth)
+ && pk_checkalg(cur_algclass, yystack.l_mark[-1].num, yyval.alg->encklen)) {
int a = algclass2doi(cur_algclass);
- int b = algtype2doi(cur_algclass, (yyvsp[(1) - (2)].num));
+ int b = algtype2doi(cur_algclass, yystack.l_mark[-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;
+ racoon_free(yyval.alg);
+ yyval.alg = NULL;
return -1;
}
}
- break;
-
- case 232:
-/* Line 1787 of yacc.c */
-#line 1667 "cfparse.y"
- { (yyval.num) = ~0; }
- break;
-
- case 233:
-/* Line 1787 of yacc.c */
-#line 1668 "cfparse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].num); }
- break;
-
- case 234:
-/* Line 1787 of yacc.c */
-#line 1671 "cfparse.y"
- { (yyval.num) = IPSEC_PORT_ANY; }
- break;
-
- case 235:
-/* Line 1787 of yacc.c */
-#line 1672 "cfparse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].num); }
- break;
-
- case 236:
-/* Line 1787 of yacc.c */
-#line 1673 "cfparse.y"
- { (yyval.num) = IPSEC_PORT_ANY; }
- break;
-
- case 237:
-/* Line 1787 of yacc.c */
-#line 1676 "cfparse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].num); }
- break;
-
- case 238:
-/* Line 1787 of yacc.c */
-#line 1677 "cfparse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].num); }
- break;
-
- case 239:
-/* Line 1787 of yacc.c */
-#line 1678 "cfparse.y"
- { (yyval.num) = IPSEC_ULPROTO_ANY; }
- break;
-
- case 240:
-/* Line 1787 of yacc.c */
-#line 1681 "cfparse.y"
- { (yyval.num) = 0; }
- break;
-
- case 241:
-/* Line 1787 of yacc.c */
-#line 1682 "cfparse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].num); }
- break;
-
- case 242:
-/* Line 1787 of yacc.c */
-#line 1688 "cfparse.y"
- {
+break;
+case 231:
+#line 1667 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = ~0; }
+break;
+case 232:
+#line 1668 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 233:
+#line 1671 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = IPSEC_PORT_ANY; }
+break;
+case 234:
+#line 1672 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 235:
+#line 1673 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = IPSEC_PORT_ANY; }
+break;
+case 236:
+#line 1676 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 237:
+#line 1677 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 238:
+#line 1678 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = IPSEC_ULPROTO_ANY; }
+break;
+case 239:
+#line 1681 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = 0; }
+break;
+case 240:
+#line 1682 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 241:
+#line 1688 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct remoteconf *from, *new;
- if (getrmconf_by_name((yyvsp[(2) - (4)].val)->v) != NULL) {
+ if (getrmconf_by_name(yystack.l_mark[-2].val->v) != NULL) {
yyerror("named remoteconf \"%s\" already exists.");
return -1;
}
- from = getrmconf_by_name((yyvsp[(4) - (4)].val)->v);
+ from = getrmconf_by_name(yystack.l_mark[0].val->v);
if (from == NULL) {
yyerror("named parent remoteconf \"%s\" does not exist.",
- (yyvsp[(4) - (4)].val)->v);
+ yystack.l_mark[0].val->v);
return -1;
}
new = duprmconf_shallow(from);
if (new == NULL) {
yyerror("failed to duplicate remoteconf from \"%s\".",
- (yyvsp[(4) - (4)].val)->v);
+ yystack.l_mark[0].val->v);
return -1;
}
- new->name = racoon_strdup((yyvsp[(2) - (4)].val)->v);
+ new->name = racoon_strdup(yystack.l_mark[-2].val->v);
cur_rmconf = new;
- vfree((yyvsp[(2) - (4)].val));
- vfree((yyvsp[(4) - (4)].val));
+ vfree(yystack.l_mark[-2].val);
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 244:
-/* Line 1787 of yacc.c */
-#line 1718 "cfparse.y"
- {
+break;
+case 243:
+#line 1718 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct remoteconf *new;
- if (getrmconf_by_name((yyvsp[(2) - (2)].val)->v) != NULL) {
+ if (getrmconf_by_name(yystack.l_mark[0].val->v) != NULL) {
yyerror("Named remoteconf \"%s\" already exists.");
return -1;
}
@@ -4264,43 +3514,39 @@ yyreduce:
yyerror("failed to get new remoteconf.");
return -1;
}
- new->name = racoon_strdup((yyvsp[(2) - (2)].val)->v);
+ new->name = racoon_strdup(yystack.l_mark[0].val->v);
cur_rmconf = new;
- vfree((yyvsp[(2) - (2)].val));
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 246:
-/* Line 1787 of yacc.c */
-#line 1738 "cfparse.y"
- {
+break;
+case 245:
+#line 1738 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct remoteconf *from, *new;
- from = getrmconf((yyvsp[(4) - (4)].saddr), GETRMCONF_F_NO_ANONYMOUS);
+ from = getrmconf(yystack.l_mark[0].saddr, GETRMCONF_F_NO_ANONYMOUS);
if (from == NULL) {
yyerror("failed to get remoteconf for %s.",
- saddr2str((yyvsp[(4) - (4)].saddr)));
+ saddr2str(yystack.l_mark[0].saddr));
return -1;
}
new = duprmconf_shallow(from);
if (new == NULL) {
yyerror("failed to duplicate remoteconf from %s.",
- saddr2str((yyvsp[(4) - (4)].saddr)));
+ saddr2str(yystack.l_mark[0].saddr));
return -1;
}
- racoon_free((yyvsp[(4) - (4)].saddr));
- new->remote = (yyvsp[(2) - (4)].saddr);
+ racoon_free(yystack.l_mark[0].saddr);
+ new->remote = yystack.l_mark[-2].saddr;
cur_rmconf = new;
}
- break;
-
- case 248:
-/* Line 1787 of yacc.c */
-#line 1761 "cfparse.y"
- {
+break;
+case 247:
+#line 1761 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct remoteconf *new;
new = newrmconf();
@@ -4309,130 +3555,108 @@ yyreduce:
return -1;
}
- new->remote = (yyvsp[(2) - (2)].saddr);
+ new->remote = yystack.l_mark[0].saddr;
cur_rmconf = new;
}
- break;
-
- case 251:
-/* Line 1787 of yacc.c */
-#line 1779 "cfparse.y"
- {
+break;
+case 250:
+#line 1779 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (process_rmconf() != 0)
return -1;
}
- break;
-
- case 252:
-/* Line 1787 of yacc.c */
-#line 1787 "cfparse.y"
- {
+break;
+case 251:
+#line 1787 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (process_rmconf() != 0)
return -1;
}
- break;
-
- case 253:
-/* Line 1787 of yacc.c */
-#line 1794 "cfparse.y"
- {
- (yyval.saddr) = newsaddr(sizeof(struct sockaddr));
- (yyval.saddr)->sa_family = AF_UNSPEC;
- ((struct sockaddr_in *)(yyval.saddr))->sin_port = htons((yyvsp[(2) - (2)].num));
+break;
+case 252:
+#line 1794 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ yyval.saddr = newsaddr(sizeof(struct sockaddr));
+ yyval.saddr->sa_family = AF_UNSPEC;
+ ((struct sockaddr_in *)yyval.saddr)->sin_port = htons(yystack.l_mark[0].num);
}
- break;
-
- case 254:
-/* Line 1787 of yacc.c */
-#line 1800 "cfparse.y"
- {
- (yyval.saddr) = (yyvsp[(1) - (1)].saddr);
- if ((yyval.saddr) == NULL) {
+break;
+case 253:
+#line 1800 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ yyval.saddr = yystack.l_mark[0].saddr;
+ if (yyval.saddr == NULL) {
yyerror("failed to allocate sockaddr");
return -1;
}
}
- break;
-
- case 257:
-/* Line 1787 of yacc.c */
-#line 1814 "cfparse.y"
- {
+break;
+case 256:
+#line 1814 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->remote != NULL) {
yyerror("remote_address already specified");
return -1;
}
- cur_rmconf->remote = (yyvsp[(2) - (2)].saddr);
+ cur_rmconf->remote = yystack.l_mark[0].saddr;
}
- break;
-
- case 259:
-/* Line 1787 of yacc.c */
-#line 1823 "cfparse.y"
- {
+break;
+case 258:
+#line 1823 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
cur_rmconf->etypes = NULL;
}
- break;
-
- case 261:
-/* Line 1787 of yacc.c */
-#line 1827 "cfparse.y"
- { cur_rmconf->doitype = (yyvsp[(2) - (2)].num); }
- break;
-
- case 263:
-/* Line 1787 of yacc.c */
-#line 1828 "cfparse.y"
- { cur_rmconf->sittype = (yyvsp[(2) - (2)].num); }
- break;
-
- case 266:
-/* Line 1787 of yacc.c */
-#line 1831 "cfparse.y"
- {
+break;
+case 260:
+#line 1827 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->doitype = yystack.l_mark[0].num; }
+break;
+case 262:
+#line 1828 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->sittype = yystack.l_mark[0].num; }
+break;
+case 265:
+#line 1831 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
yywarn("This directive without certtype will be removed!\n");
- yywarn("Please use 'peers_certfile x509 \"%s\";' instead\n", (yyvsp[(2) - (2)].val)->v);
+ yywarn("Please use 'peers_certfile x509 \"%s\";' instead\n", yystack.l_mark[0].val->v);
if (cur_rmconf->peerscert != NULL) {
yyerror("peers_certfile already defined\n");
return -1;
}
- if (load_x509((yyvsp[(2) - (2)].val)->v, &cur_rmconf->peerscertfile,
+ if (load_x509(yystack.l_mark[0].val->v, &cur_rmconf->peerscertfile,
&cur_rmconf->peerscert)) {
yyerror("failed to load certificate \"%s\"\n",
- (yyvsp[(2) - (2)].val)->v);
+ yystack.l_mark[0].val->v);
return -1;
}
- vfree((yyvsp[(2) - (2)].val));
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 268:
-/* Line 1787 of yacc.c */
-#line 1851 "cfparse.y"
- {
+break;
+case 267:
+#line 1851 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->peerscert != NULL) {
yyerror("peers_certfile already defined\n");
return -1;
}
- if (load_x509((yyvsp[(3) - (3)].val)->v, &cur_rmconf->peerscertfile,
+ if (load_x509(yystack.l_mark[0].val->v, &cur_rmconf->peerscertfile,
&cur_rmconf->peerscert)) {
yyerror("failed to load certificate \"%s\"\n",
- (yyvsp[(3) - (3)].val)->v);
+ yystack.l_mark[0].val->v);
return -1;
}
- vfree((yyvsp[(3) - (3)].val));
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 270:
-/* Line 1787 of yacc.c */
-#line 1868 "cfparse.y"
- {
+break;
+case 269:
+#line 1868 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
char path[MAXPATHLEN];
int ret = 0;
@@ -4449,7 +3673,7 @@ yyreduce:
cur_rmconf->peerscert->v[0] = ISAKMP_CERT_PLAINRSA;
getpathname(path, sizeof(path),
- LC_PATHTYPE_CERT, (yyvsp[(3) - (3)].val)->v);
+ LC_PATHTYPE_CERT, yystack.l_mark[0].val->v);
if (rsa_parse_file(cur_rmconf->rsa_public, path,
RSA_TYPE_PUBLIC)) {
yyerror("Couldn't parse keyfile.\n", path);
@@ -4458,14 +3682,12 @@ yyreduce:
plog(LLV_DEBUG, LOCATION, NULL,
"Public PlainRSA keyfile parsed: %s\n", path);
- vfree((yyvsp[(3) - (3)].val));
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 272:
-/* Line 1787 of yacc.c */
-#line 1898 "cfparse.y"
- {
+break;
+case 271:
+#line 1898 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->peerscert != NULL) {
yyerror("peers_certfile already defined\n");
return -1;
@@ -4477,87 +3699,71 @@ yyreduce:
}
cur_rmconf->peerscert->v[0] = ISAKMP_CERT_DNS;
}
- break;
-
- case 274:
-/* Line 1787 of yacc.c */
-#line 1912 "cfparse.y"
- {
+break;
+case 273:
+#line 1912 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->cacert != NULL) {
yyerror("ca_type already defined\n");
return -1;
}
- if (load_x509((yyvsp[(3) - (3)].val)->v, &cur_rmconf->cacertfile,
+ if (load_x509(yystack.l_mark[0].val->v, &cur_rmconf->cacertfile,
&cur_rmconf->cacert)) {
yyerror("failed to load certificate \"%s\"\n",
- (yyvsp[(3) - (3)].val)->v);
+ yystack.l_mark[0].val->v);
return -1;
}
- vfree((yyvsp[(3) - (3)].val));
- }
- break;
-
- case 276:
-/* Line 1787 of yacc.c */
-#line 1928 "cfparse.y"
- { cur_rmconf->verify_cert = (yyvsp[(2) - (2)].num); }
- break;
-
- case 278:
-/* Line 1787 of yacc.c */
-#line 1929 "cfparse.y"
- { cur_rmconf->send_cert = (yyvsp[(2) - (2)].num); }
- break;
-
- case 280:
-/* Line 1787 of yacc.c */
-#line 1930 "cfparse.y"
- { cur_rmconf->send_cr = (yyvsp[(2) - (2)].num); }
- break;
-
- case 282:
-/* Line 1787 of yacc.c */
-#line 1931 "cfparse.y"
- { cur_rmconf->match_empty_cr = (yyvsp[(2) - (2)].num); }
- break;
-
- case 284:
-/* Line 1787 of yacc.c */
-#line 1933 "cfparse.y"
- {
- if (set_identifier(&cur_rmconf->idv, (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].val)) != 0) {
+ vfree(yystack.l_mark[0].val);
+ }
+break;
+case 275:
+#line 1928 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->verify_cert = yystack.l_mark[0].num; }
+break;
+case 277:
+#line 1929 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->send_cert = yystack.l_mark[0].num; }
+break;
+case 279:
+#line 1930 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->send_cr = yystack.l_mark[0].num; }
+break;
+case 281:
+#line 1931 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->match_empty_cr = yystack.l_mark[0].num; }
+break;
+case 283:
+#line 1933 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ if (set_identifier(&cur_rmconf->idv, yystack.l_mark[-1].num, yystack.l_mark[0].val) != 0) {
yyerror("failed to set identifer.\n");
return -1;
}
- cur_rmconf->idvtype = (yyvsp[(2) - (3)].num);
+ cur_rmconf->idvtype = yystack.l_mark[-1].num;
}
- break;
-
- case 286:
-/* Line 1787 of yacc.c */
-#line 1942 "cfparse.y"
- {
- if (set_identifier_qual(&cur_rmconf->idv, (yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].val), (yyvsp[(3) - (4)].num)) != 0) {
+break;
+case 285:
+#line 1942 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ if (set_identifier_qual(&cur_rmconf->idv, yystack.l_mark[-2].num, yystack.l_mark[0].val, yystack.l_mark[-1].num) != 0) {
yyerror("failed to set identifer.\n");
return -1;
}
- cur_rmconf->idvtype = (yyvsp[(2) - (4)].num);
+ cur_rmconf->idvtype = yystack.l_mark[-2].num;
}
- break;
-
- case 288:
-/* Line 1787 of yacc.c */
-#line 1951 "cfparse.y"
- {
+break;
+case 287:
+#line 1951 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_HYBRID
/* formerly identifier type login */
if (xauth_rmconf_used(&cur_rmconf->xauth) == -1) {
yyerror("failed to allocate xauth state\n");
return -1;
}
- if ((cur_rmconf->xauth->login = vdup((yyvsp[(2) - (2)].val))) == NULL) {
+ if ((cur_rmconf->xauth->login = vdup(yystack.l_mark[0].val)) == NULL) {
yyerror("failed to set identifer.\n");
return -1;
}
@@ -4565,195 +3771,155 @@ yyreduce:
yyerror("racoon not configured with --enable-hybrid");
#endif
}
- break;
-
- case 290:
-/* Line 1787 of yacc.c */
-#line 1968 "cfparse.y"
- {
+break;
+case 289:
+#line 1968 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct idspec *id;
id = newidspec();
if (id == NULL) {
yyerror("failed to allocate idspec");
return -1;
}
- if (set_identifier(&id->id, (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].val)) != 0) {
+ if (set_identifier(&id->id, yystack.l_mark[-1].num, yystack.l_mark[0].val) != 0) {
yyerror("failed to set identifer.\n");
racoon_free(id);
return -1;
}
- id->idtype = (yyvsp[(2) - (3)].num);
+ id->idtype = yystack.l_mark[-1].num;
genlist_append (cur_rmconf->idvl_p, id);
}
- break;
-
- case 292:
-/* Line 1787 of yacc.c */
-#line 1985 "cfparse.y"
- {
+break;
+case 291:
+#line 1985 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct idspec *id;
id = newidspec();
if (id == NULL) {
yyerror("failed to allocate idspec");
return -1;
}
- if (set_identifier_qual(&id->id, (yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].val), (yyvsp[(3) - (4)].num)) != 0) {
+ if (set_identifier_qual(&id->id, yystack.l_mark[-2].num, yystack.l_mark[0].val, yystack.l_mark[-1].num) != 0) {
yyerror("failed to set identifer.\n");
racoon_free(id);
return -1;
}
- id->idtype = (yyvsp[(2) - (4)].num);
+ id->idtype = yystack.l_mark[-2].num;
genlist_append (cur_rmconf->idvl_p, id);
}
- break;
-
- case 294:
-/* Line 1787 of yacc.c */
-#line 2001 "cfparse.y"
- { cur_rmconf->verify_identifier = (yyvsp[(2) - (2)].num); }
- break;
-
- case 296:
-/* Line 1787 of yacc.c */
-#line 2002 "cfparse.y"
- { cur_rmconf->nonce_size = (yyvsp[(2) - (2)].num); }
- break;
-
- case 298:
-/* Line 1787 of yacc.c */
-#line 2004 "cfparse.y"
- {
+break;
+case 293:
+#line 2001 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->verify_identifier = yystack.l_mark[0].num; }
+break;
+case 295:
+#line 2002 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->nonce_size = yystack.l_mark[0].num; }
+break;
+case 297:
+#line 2004 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
yyerror("dh_group cannot be defined here.");
return -1;
}
- break;
-
- case 300:
-/* Line 1787 of yacc.c */
-#line 2009 "cfparse.y"
- { cur_rmconf->passive = (yyvsp[(2) - (2)].num); }
- break;
-
- case 302:
-/* Line 1787 of yacc.c */
-#line 2010 "cfparse.y"
- { cur_rmconf->ike_frag = (yyvsp[(2) - (2)].num); }
- break;
-
- case 304:
-/* Line 1787 of yacc.c */
-#line 2011 "cfparse.y"
- { cur_rmconf->ike_frag = ISAKMP_FRAG_FORCE; }
- break;
-
- case 306:
-/* Line 1787 of yacc.c */
-#line 2012 "cfparse.y"
- {
+break;
+case 299:
+#line 2009 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->passive = yystack.l_mark[0].num; }
+break;
+case 301:
+#line 2010 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->ike_frag = yystack.l_mark[0].num; }
+break;
+case 303:
+#line 2011 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->ike_frag = ISAKMP_FRAG_FORCE; }
+break;
+case 305:
+#line 2012 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef SADB_X_EXT_NAT_T_FRAG
if (libipsec_opt & LIBIPSEC_OPT_FRAG)
- cur_rmconf->esp_frag = (yyvsp[(2) - (2)].num);
+ cur_rmconf->esp_frag = yystack.l_mark[0].num;
else
yywarn("libipsec lacks IKE frag support");
#else
yywarn("Your kernel does not support esp_frag");
#endif
}
- break;
-
- case 308:
-/* Line 1787 of yacc.c */
-#line 2022 "cfparse.y"
- {
+break;
+case 307:
+#line 2022 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->script[SCRIPT_PHASE1_UP] != NULL)
vfree(cur_rmconf->script[SCRIPT_PHASE1_UP]);
cur_rmconf->script[SCRIPT_PHASE1_UP] =
- script_path_add(vdup((yyvsp[(2) - (3)].val)));
+ script_path_add(vdup(yystack.l_mark[-1].val));
}
- break;
-
- case 310:
-/* Line 1787 of yacc.c */
-#line 2029 "cfparse.y"
- {
+break;
+case 309:
+#line 2029 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->script[SCRIPT_PHASE1_DOWN] != NULL)
vfree(cur_rmconf->script[SCRIPT_PHASE1_DOWN]);
cur_rmconf->script[SCRIPT_PHASE1_DOWN] =
- script_path_add(vdup((yyvsp[(2) - (3)].val)));
+ script_path_add(vdup(yystack.l_mark[-1].val));
}
- break;
-
- case 312:
-/* Line 1787 of yacc.c */
-#line 2036 "cfparse.y"
- {
+break;
+case 311:
+#line 2036 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->script[SCRIPT_PHASE1_DEAD] != NULL)
vfree(cur_rmconf->script[SCRIPT_PHASE1_DEAD]);
cur_rmconf->script[SCRIPT_PHASE1_DEAD] =
- script_path_add(vdup((yyvsp[(2) - (3)].val)));
- }
- break;
-
- case 314:
-/* Line 1787 of yacc.c */
-#line 2043 "cfparse.y"
- { cur_rmconf->mode_cfg = (yyvsp[(2) - (2)].num); }
- break;
-
- case 316:
-/* Line 1787 of yacc.c */
-#line 2044 "cfparse.y"
- {
- cur_rmconf->weak_phase1_check = (yyvsp[(2) - (2)].num);
- }
- break;
-
- case 318:
-/* Line 1787 of yacc.c */
-#line 2047 "cfparse.y"
- { cur_rmconf->gen_policy = (yyvsp[(2) - (2)].num); }
- break;
-
- case 320:
-/* Line 1787 of yacc.c */
-#line 2048 "cfparse.y"
- { cur_rmconf->gen_policy = (yyvsp[(2) - (2)].num); }
- break;
-
- case 322:
-/* Line 1787 of yacc.c */
-#line 2049 "cfparse.y"
- { cur_rmconf->support_proxy = (yyvsp[(2) - (2)].num); }
- break;
-
- case 324:
-/* Line 1787 of yacc.c */
-#line 2050 "cfparse.y"
- { cur_rmconf->ini_contact = (yyvsp[(2) - (2)].num); }
- break;
-
- case 326:
-/* Line 1787 of yacc.c */
-#line 2052 "cfparse.y"
- {
+ script_path_add(vdup(yystack.l_mark[-1].val));
+ }
+break;
+case 313:
+#line 2043 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->mode_cfg = yystack.l_mark[0].num; }
+break;
+case 315:
+#line 2044 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_rmconf->weak_phase1_check = yystack.l_mark[0].num;
+ }
+break;
+case 317:
+#line 2047 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->gen_policy = yystack.l_mark[0].num; }
+break;
+case 319:
+#line 2048 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->gen_policy = yystack.l_mark[0].num; }
+break;
+case 321:
+#line 2049 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->support_proxy = yystack.l_mark[0].num; }
+break;
+case 323:
+#line 2050 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->ini_contact = yystack.l_mark[0].num; }
+break;
+case 325:
+#line 2052 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_NATT
if (libipsec_opt & LIBIPSEC_OPT_NATT)
- cur_rmconf->nat_traversal = (yyvsp[(2) - (2)].num);
+ cur_rmconf->nat_traversal = yystack.l_mark[0].num;
else
yyerror("libipsec lacks NAT-T support");
#else
yyerror("NAT-T support not compiled in.");
#endif
}
- break;
-
- case 328:
-/* Line 1787 of yacc.c */
-#line 2063 "cfparse.y"
- {
+break;
+case 327:
+#line 2063 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_NATT
if (libipsec_opt & LIBIPSEC_OPT_NATT)
cur_rmconf->nat_traversal = NATT_FORCE;
@@ -4763,111 +3929,89 @@ yyreduce:
yyerror("NAT-T support not compiled in.");
#endif
}
- break;
-
- case 330:
-/* Line 1787 of yacc.c */
-#line 2074 "cfparse.y"
- {
+break;
+case 329:
+#line 2074 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_DPD
- cur_rmconf->dpd = (yyvsp[(2) - (2)].num);
+ cur_rmconf->dpd = yystack.l_mark[0].num;
#else
yyerror("DPD support not compiled in.");
#endif
}
- break;
-
- case 332:
-/* Line 1787 of yacc.c */
-#line 2082 "cfparse.y"
- {
+break;
+case 331:
+#line 2082 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_DPD
- cur_rmconf->dpd_interval = (yyvsp[(2) - (2)].num);
+ cur_rmconf->dpd_interval = yystack.l_mark[0].num;
#else
yyerror("DPD support not compiled in.");
#endif
}
- break;
-
- case 334:
-/* Line 1787 of yacc.c */
-#line 2091 "cfparse.y"
- {
+break;
+case 333:
+#line 2091 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_DPD
- cur_rmconf->dpd_retry = (yyvsp[(2) - (2)].num);
+ cur_rmconf->dpd_retry = yystack.l_mark[0].num;
#else
yyerror("DPD support not compiled in.");
#endif
}
- break;
-
- case 336:
-/* Line 1787 of yacc.c */
-#line 2100 "cfparse.y"
- {
+break;
+case 335:
+#line 2100 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#ifdef ENABLE_DPD
- cur_rmconf->dpd_maxfails = (yyvsp[(2) - (2)].num);
+ cur_rmconf->dpd_maxfails = yystack.l_mark[0].num;
#else
yyerror("DPD support not compiled in.");
#endif
}
- break;
-
- case 338:
-/* Line 1787 of yacc.c */
-#line 2108 "cfparse.y"
- { cur_rmconf->rekey = (yyvsp[(2) - (2)].num); }
- break;
-
- case 340:
-/* Line 1787 of yacc.c */
-#line 2109 "cfparse.y"
- { cur_rmconf->rekey = REKEY_FORCE; }
- break;
-
- case 342:
-/* Line 1787 of yacc.c */
-#line 2111 "cfparse.y"
- {
- cur_rmconf->ph1id = (yyvsp[(2) - (2)].num);
- }
- break;
-
- case 344:
-/* Line 1787 of yacc.c */
-#line 2116 "cfparse.y"
- {
- cur_rmconf->lifetime = (yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num);
+break;
+case 337:
+#line 2108 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->rekey = yystack.l_mark[0].num; }
+break;
+case 339:
+#line 2109 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->rekey = REKEY_FORCE; }
+break;
+case 341:
+#line 2111 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_rmconf->ph1id = yystack.l_mark[0].num;
}
- break;
-
- case 346:
-/* Line 1787 of yacc.c */
-#line 2120 "cfparse.y"
- { cur_rmconf->pcheck_level = (yyvsp[(2) - (2)].num); }
- break;
-
- case 348:
-/* Line 1787 of yacc.c */
-#line 2122 "cfparse.y"
- {
+break;
+case 343:
+#line 2116 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_rmconf->lifetime = yystack.l_mark[-1].num * yystack.l_mark[0].num;
+ }
+break;
+case 345:
+#line 2120 "../../ipsec-tools/src/racoon/cfparse.y"
+ { cur_rmconf->pcheck_level = yystack.l_mark[0].num; }
+break;
+case 347:
+#line 2122 "../../ipsec-tools/src/racoon/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->lifebyte = fix_lifebyte((yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num));
+ cur_rmconf->lifebyte = fix_lifebyte(yystack.l_mark[-1].num * yystack.l_mark[0].num);
if (cur_rmconf->lifebyte == 0)
return -1;
#endif
}
- break;
-
- case 350:
-/* Line 1787 of yacc.c */
-#line 2136 "cfparse.y"
- {
+break;
+case 349:
+#line 2136 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct secprotospec *spspec;
spspec = newspspec();
@@ -4875,19 +4019,17 @@ yyreduce:
return -1;
insspspec(cur_rmconf, spspec);
}
- break;
-
- case 353:
-/* Line 1787 of yacc.c */
-#line 2149 "cfparse.y"
- {
+break;
+case 352:
+#line 2149 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
struct etypes *new;
new = racoon_malloc(sizeof(struct etypes));
if (new == NULL) {
yyerror("failed to allocate etypes");
return -1;
}
- new->type = (yyvsp[(2) - (2)].num);
+ new->type = yystack.l_mark[0].num;
new->next = NULL;
if (cur_rmconf->etypes == NULL)
cur_rmconf->etypes = new;
@@ -4900,36 +4042,32 @@ yyreduce:
p->next = new;
}
}
- break;
-
- case 354:
-/* Line 1787 of yacc.c */
-#line 2172 "cfparse.y"
- {
+break;
+case 353:
+#line 2172 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->mycert != NULL) {
yyerror("certificate_type already defined\n");
return -1;
}
- if (load_x509((yyvsp[(2) - (3)].val)->v, &cur_rmconf->mycertfile,
+ if (load_x509(yystack.l_mark[-1].val->v, &cur_rmconf->mycertfile,
&cur_rmconf->mycert)) {
yyerror("failed to load certificate \"%s\"\n",
- (yyvsp[(2) - (3)].val)->v);
+ yystack.l_mark[-1].val->v);
return -1;
}
- cur_rmconf->myprivfile = racoon_strdup((yyvsp[(3) - (3)].val)->v);
+ cur_rmconf->myprivfile = racoon_strdup(yystack.l_mark[0].val->v);
STRDUP_FATAL(cur_rmconf->myprivfile);
- vfree((yyvsp[(2) - (3)].val));
- vfree((yyvsp[(3) - (3)].val));
+ vfree(yystack.l_mark[-1].val);
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 356:
-/* Line 1787 of yacc.c */
-#line 2193 "cfparse.y"
- {
+break;
+case 355:
+#line 2193 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
char path[MAXPATHLEN];
int ret = 0;
@@ -4946,7 +4084,7 @@ yyreduce:
cur_rmconf->mycert->v[0] = ISAKMP_CERT_PLAINRSA;
getpathname(path, sizeof(path),
- LC_PATHTYPE_CERT, (yyvsp[(2) - (2)].val)->v);
+ LC_PATHTYPE_CERT, yystack.l_mark[0].val->v);
cur_rmconf->send_cr = FALSE;
cur_rmconf->send_cert = FALSE;
cur_rmconf->verify_cert = FALSE;
@@ -4957,89 +4095,71 @@ yyreduce:
}
plog(LLV_DEBUG, LOCATION, NULL,
"Private PlainRSA keyfile parsed: %s\n", path);
- vfree((yyvsp[(2) - (2)].val));
+ vfree(yystack.l_mark[0].val);
}
- break;
-
- case 358:
-/* Line 1787 of yacc.c */
-#line 2227 "cfparse.y"
- {
- (yyval.num) = algtype2doi(algclass_isakmp_dh, (yyvsp[(1) - (1)].num));
- if ((yyval.num) == -1) {
+break;
+case 357:
+#line 2227 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ yyval.num = algtype2doi(algclass_isakmp_dh, yystack.l_mark[0].num);
+ if (yyval.num == -1) {
yyerror("must be DH group");
return -1;
}
}
- break;
-
- case 359:
-/* Line 1787 of yacc.c */
-#line 2235 "cfparse.y"
- {
- if (ARRAYLEN(num2dhgroup) > (yyvsp[(1) - (1)].num) && num2dhgroup[(yyvsp[(1) - (1)].num)] != 0) {
- (yyval.num) = num2dhgroup[(yyvsp[(1) - (1)].num)];
+break;
+case 358:
+#line 2235 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ if (ARRAYLEN(num2dhgroup) > yystack.l_mark[0].num && num2dhgroup[yystack.l_mark[0].num] != 0) {
+ yyval.num = num2dhgroup[yystack.l_mark[0].num];
} else {
yyerror("must be DH group");
- (yyval.num) = 0;
+ yyval.num = 0;
return -1;
}
}
- break;
-
- case 360:
-/* Line 1787 of yacc.c */
-#line 2246 "cfparse.y"
- { (yyval.val) = NULL; }
- break;
-
- case 361:
-/* Line 1787 of yacc.c */
-#line 2247 "cfparse.y"
- { (yyval.val) = (yyvsp[(1) - (1)].val); }
- break;
-
- case 362:
-/* Line 1787 of yacc.c */
-#line 2248 "cfparse.y"
- { (yyval.val) = (yyvsp[(1) - (1)].val); }
- break;
-
- case 365:
-/* Line 1787 of yacc.c */
-#line 2256 "cfparse.y"
- {
- cur_rmconf->spspec->lifetime = (yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num);
+break;
+case 359:
+#line 2246 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.val = NULL; }
+break;
+case 360:
+#line 2247 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.val = yystack.l_mark[0].val; }
+break;
+case 361:
+#line 2248 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.val = yystack.l_mark[0].val; }
+break;
+case 364:
+#line 2256 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_rmconf->spspec->lifetime = yystack.l_mark[-1].num * yystack.l_mark[0].num;
}
- break;
-
- case 367:
-/* Line 1787 of yacc.c */
-#line 2261 "cfparse.y"
- {
+break;
+case 366:
+#line 2261 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
#if 1
yyerror("byte lifetime support is deprecated");
return -1;
#else
- cur_rmconf->spspec->lifebyte = fix_lifebyte((yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num));
+ cur_rmconf->spspec->lifebyte = fix_lifebyte(yystack.l_mark[-1].num * yystack.l_mark[0].num);
if (cur_rmconf->spspec->lifebyte == 0)
return -1;
#endif
}
- break;
-
- case 369:
-/* Line 1787 of yacc.c */
-#line 2273 "cfparse.y"
- {
- cur_rmconf->spspec->algclass[algclass_isakmp_dh] = (yyvsp[(2) - (2)].num);
+break;
+case 368:
+#line 2273 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
+ cur_rmconf->spspec->algclass[algclass_isakmp_dh] = yystack.l_mark[0].num;
}
- break;
-
- case 371:
-/* Line 1787 of yacc.c */
-#line 2278 "cfparse.y"
- {
+break;
+case 370:
+#line 2278 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
if (cur_rmconf->spspec->vendorid != VENDORID_GSSAPI) {
yyerror("wrong Vendor ID for gssapi_id");
return -1;
@@ -5047,36 +4167,34 @@ yyreduce:
if (cur_rmconf->spspec->gssid != NULL)
racoon_free(cur_rmconf->spspec->gssid);
cur_rmconf->spspec->gssid =
- racoon_strdup((yyvsp[(2) - (2)].val)->v);
+ racoon_strdup(yystack.l_mark[0].val->v);
STRDUP_FATAL(cur_rmconf->spspec->gssid);
}
- break;
-
- case 373:
-/* Line 1787 of yacc.c */
-#line 2291 "cfparse.y"
- {
+break;
+case 372:
+#line 2291 "../../ipsec-tools/src/racoon/cfparse.y"
+ {
int doi;
int defklen;
- doi = algtype2doi((yyvsp[(1) - (3)].num), (yyvsp[(2) - (3)].num));
+ doi = algtype2doi(yystack.l_mark[-2].num, yystack.l_mark[-1].num);
if (doi == -1) {
yyerror("algorithm mismatched 1");
return -1;
}
- switch ((yyvsp[(1) - (3)].num)) {
+ switch (yystack.l_mark[-2].num) {
case algclass_isakmp_enc:
/* reject suppressed algorithms */
#ifndef HAVE_OPENSSL_RC5_H
- if ((yyvsp[(2) - (3)].num) == algtype_rc5) {
+ if (yystack.l_mark[-1].num == algtype_rc5) {
yyerror("algorithm %s not supported",
s_attr_isakmp_enc(doi));
return -1;
}
#endif
#ifndef HAVE_OPENSSL_IDEA_H
- if ((yyvsp[(2) - (3)].num) == algtype_idea) {
+ if (yystack.l_mark[-1].num == algtype_idea) {
yyerror("algorithm %s not supported",
s_attr_isakmp_enc(doi));
return -1;
@@ -5084,20 +4202,20 @@ yyreduce:
#endif
cur_rmconf->spspec->algclass[algclass_isakmp_enc] = doi;
- defklen = default_keylen((yyvsp[(1) - (3)].num), (yyvsp[(2) - (3)].num));
+ defklen = default_keylen(yystack.l_mark[-2].num, yystack.l_mark[-1].num);
if (defklen == 0) {
- if ((yyvsp[(3) - (3)].num)) {
+ if (yystack.l_mark[0].num) {
yyerror("keylen not allowed");
return -1;
}
} else {
- if ((yyvsp[(3) - (3)].num) && check_keylen((yyvsp[(1) - (3)].num), (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].num)) < 0) {
- yyerror("invalid keylen %d", (yyvsp[(3) - (3)].num));
+ if (yystack.l_mark[0].num && check_keylen(yystack.l_mark[-2].num, yystack.l_mark[-1].num, yystack.l_mark[0].num) < 0) {
+ yyerror("invalid keylen %d", yystack.l_mark[0].num);
return -1;
}
}
- if ((yyvsp[(3) - (3)].num))
- cur_rmconf->spspec->encklen = (yyvsp[(3) - (3)].num);
+ if (yystack.l_mark[0].num)
+ cur_rmconf->spspec->encklen = yystack.l_mark[0].num;
else
cur_rmconf->spspec->encklen = defklen;
break;
@@ -5110,7 +4228,7 @@ yyreduce:
* We may have to set the Vendor ID for the
* authentication method we're using.
*/
- switch ((yyvsp[(2) - (3)].num)) {
+ switch (yystack.l_mark[-1].num) {
case algtype_gssapikrb:
if (cur_rmconf->spspec->vendorid !=
VENDORID_UNKNOWN) {
@@ -5148,724 +4266,90 @@ yyreduce:
return -1;
}
}
- break;
-
- case 375:
-/* Line 1787 of yacc.c */
-#line 2388 "cfparse.y"
- { (yyval.num) = 1; }
- break;
-
- case 376:
-/* Line 1787 of yacc.c */
-#line 2389 "cfparse.y"
- { (yyval.num) = 60; }
- break;
-
- case 377:
-/* Line 1787 of yacc.c */
-#line 2390 "cfparse.y"
- { (yyval.num) = (60 * 60); }
- break;
-
- case 378:
-/* Line 1787 of yacc.c */
-#line 2393 "cfparse.y"
- { (yyval.num) = 1; }
- break;
-
- case 379:
-/* Line 1787 of yacc.c */
-#line 2394 "cfparse.y"
- { (yyval.num) = 1024; }
- break;
-
- case 380:
-/* Line 1787 of yacc.c */
-#line 2395 "cfparse.y"
- { (yyval.num) = (1024 * 1024); }
- break;
-
- case 381:
-/* Line 1787 of yacc.c */
-#line 2396 "cfparse.y"
- { (yyval.num) = (1024 * 1024 * 1024); }
- break;
-
-
-/* Line 1787 of yacc.c */
-#line 5198 "cfparse.c"
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* 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 - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
+break;
+case 374:
+#line 2388 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = 1; }
+break;
+case 375:
+#line 2389 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = 60; }
+break;
+case 376:
+#line 2390 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = (60 * 60); }
+break;
+case 377:
+#line 2393 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = 1; }
+break;
+case 378:
+#line 2394 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = 1024; }
+break;
+case 379:
+#line 2395 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = (1024 * 1024); }
+break;
+case 380:
+#line 2396 "../../ipsec-tools/src/racoon/cfparse.y"
+ { yyval.num = (1024 * 1024 * 1024); }
+break;
+#line 4299 "racoonyy.tab.c"
}
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
+ yystack.s_mark -= yym;
+ yystate = *yystack.s_mark;
+ yystack.l_mark -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
{
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
+ yystate = YYFINAL;
+ *++yystack.s_mark = YYFINAL;
+ *++yystack.l_mark = yyval;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
-
-
-/* Line 2048 of yacc.c */
-#line 2398 "cfparse.y"
-
-
-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(rmconf, spspec)
- struct remoteconf *rmconf;
- struct secprotospec *spspec;
-{
- if (rmconf->spspec != NULL)
- rmconf->spspec->prev = spspec;
- spspec->next = rmconf->spspec;
- rmconf->spspec = spspec;
-}
-
-static struct secprotospec *
-dupspspec(spspec)
- struct secprotospec *spspec;
-{
- struct secprotospec *new;
-
- new = newspspec();
- if (new == NULL) {
- plog(LLV_ERROR, LOCATION, NULL,
- "dupspspec: malloc failed\n");
- return NULL;
- }
- memcpy(new, spspec, sizeof(*new));
-
- if (spspec->gssid) {
- new->gssid = racoon_strdup(spspec->gssid);
- STRDUP_FATAL(new->gssid);
- }
- if (spspec->remote) {
- new->remote = racoon_malloc(sizeof(*new->remote));
- if (new->remote == NULL) {
- plog(LLV_ERROR, LOCATION, NULL,
- "dupspspec: malloc failed (remote)\n");
- return NULL;
- }
- memcpy(new->remote, spspec->remote, sizeof(*new->remote));
- }
-
- return new;
-}
-
-/*
- * copy the whole list
- */
-void
-dupspspec_list(dst, src)
- struct remoteconf *dst, *src;
-{
- struct secprotospec *p, *new, *last;
-
- for(p = src->spspec, last = NULL; p; p = p->next, last = new) {
- new = dupspspec(p);
- if (new == NULL)
- exit(1);
-
- new->prev = last;
- new->next = NULL; /* not necessary but clean */
-
- if (last)
- last->next = new;
- else /* first element */
- dst->spspec = new;
-
- }
-}
-
-/*
- * delete the whole list
- */
-void
-flushspspec(rmconf)
- struct remoteconf *rmconf;
-{
- struct secprotospec *p;
-
- while(rmconf->spspec != NULL) {
- p = rmconf->spspec;
- rmconf->spspec = p->next;
- if (p->next != NULL)
- p->next->prev = NULL; /* not necessary but clean */
-
- if (p->gssid)
- racoon_free(p->gssid);
- if (p->remote)
- racoon_free(p->remote);
- racoon_free(p);
- }
- rmconf->spspec = NULL;
-}
-
-/* set final acceptable proposal */
-static int
-set_isakmp_proposal(rmconf)
- struct remoteconf *rmconf;
-{
- struct secprotospec *s;
- int prop_no = 1;
- int trns_no = 1;
- int32_t types[MAXALGCLASS];
-
- /* mandatory check */
- if (rmconf->spspec == NULL) {
- yyerror("no remote specification found: %s.\n",
- saddr2str(rmconf->remote));
- return -1;
- }
- for (s = rmconf->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 = rmconf->spspec; s->next != NULL; s = s->next)
- ;
-
- while (s != NULL) {
- plog(LLV_DEBUG2, LOCATION, NULL,
- "lifetime = %ld\n", (long)
- (s->lifetime ? s->lifetime : rmconf->lifetime));
- plog(LLV_DEBUG2, LOCATION, NULL,
- "lifebyte = %d\n",
- s->lifebyte ? s->lifebyte : rmconf->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 : rmconf->lifetime,
- s->lifebyte ? s->lifebyte : rmconf->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");
+ }
+ if (yychar == YYEOF) goto yyaccept;
+ goto yyloop;
}
-
-#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) {
- if ((new->gssid = vmalloc(strlen(gssid))) == NULL) {
- racoon_free(new);
- yyerror("failed to allocate gssid");
- return -1;
- }
- 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;
-}
-
-#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);
-}
+ if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ *++yystack.s_mark = (YYINT) yystate;
+ *++yystack.l_mark = yyval;
+ goto yyloop;
-int
-cfparse()
-{
- int error;
-
- yyerrorcount = 0;
- yycf_init_buffer();
-
- if (yycf_switch_buffer(lcconf->racoon_conf) != 0) {
- plog(LLV_ERROR, LOCATION, NULL,
- "could not read configuration file \"%s\"\n",
- lcconf->racoon_conf);
- 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");
+yyoverflow:
+ YYERROR_CALL("yacc stack overflow");
- return 0;
-}
+yyabort:
+ yyfreestack(&yystack);
+ return (1);
-int
-cfreparse()
-{
- flushph2();
- flushph1();
- flushrmconf();
- flushsainfo();
- clean_tmpalgtype();
- return(cfparse());
+yyaccept:
+ yyfreestack(&yystack);
+ return (0);
}
-
-#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
diff --git a/ipsec-tools/src/racoon/cfparse.h b/ipsec-tools/src/racoon/cfparse.h
index 71ea0a60..6a6c2383 100644
--- a/ipsec-tools/src/racoon/cfparse.h
+++ b/ipsec-tools/src/racoon/cfparse.h
@@ -1,434 +1,186 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-#ifndef YY_CFPARSE_H
-# define YY_CFPARSE_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
+#define PRIVSEP 257
+#define USER 258
+#define GROUP 259
+#define CHROOT 260
+#define PATH 261
+#define PATHTYPE 262
+#define INCLUDE 263
+#define PFKEY_BUFFER 264
+#define LOGGING 265
+#define LOGLEV 266
+#define PADDING 267
+#define PAD_RANDOMIZE 268
+#define PAD_RANDOMIZELEN 269
+#define PAD_MAXLEN 270
+#define PAD_STRICT 271
+#define PAD_EXCLTAIL 272
+#define LISTEN 273
+#define X_ISAKMP 274
+#define X_ISAKMP_NATT 275
+#define X_ADMIN 276
+#define STRICT_ADDRESS 277
+#define ADMINSOCK 278
+#define DISABLED 279
+#define LDAPCFG 280
+#define LDAP_HOST 281
+#define LDAP_PORT 282
+#define LDAP_PVER 283
+#define LDAP_BASE 284
+#define LDAP_BIND_DN 285
+#define LDAP_BIND_PW 286
+#define LDAP_SUBTREE 287
+#define LDAP_ATTR_USER 288
+#define LDAP_ATTR_ADDR 289
+#define LDAP_ATTR_MASK 290
+#define LDAP_ATTR_GROUP 291
+#define LDAP_ATTR_MEMBER 292
+#define RADCFG 293
+#define RAD_AUTH 294
+#define RAD_ACCT 295
+#define RAD_TIMEOUT 296
+#define RAD_RETRIES 297
+#define MODECFG 298
+#define CFG_NET4 299
+#define CFG_MASK4 300
+#define CFG_DNS4 301
+#define CFG_NBNS4 302
+#define CFG_DEFAULT_DOMAIN 303
+#define CFG_AUTH_SOURCE 304
+#define CFG_AUTH_GROUPS 305
+#define CFG_SYSTEM 306
+#define CFG_RADIUS 307
+#define CFG_PAM 308
+#define CFG_LDAP 309
+#define CFG_LOCAL 310
+#define CFG_NONE 311
+#define CFG_GROUP_SOURCE 312
+#define CFG_ACCOUNTING 313
+#define CFG_CONF_SOURCE 314
+#define CFG_MOTD 315
+#define CFG_POOL_SIZE 316
+#define CFG_AUTH_THROTTLE 317
+#define CFG_SPLIT_NETWORK 318
+#define CFG_SPLIT_LOCAL 319
+#define CFG_SPLIT_INCLUDE 320
+#define CFG_SPLIT_DNS 321
+#define CFG_PFS_GROUP 322
+#define CFG_SAVE_PASSWD 323
+#define RETRY 324
+#define RETRY_COUNTER 325
+#define RETRY_INTERVAL 326
+#define RETRY_PERSEND 327
+#define RETRY_PHASE1 328
+#define RETRY_PHASE2 329
+#define NATT_KA 330
+#define ALGORITHM_CLASS 331
+#define ALGORITHMTYPE 332
+#define STRENGTHTYPE 333
+#define SAINFO 334
+#define FROM 335
+#define REMOTE 336
+#define ANONYMOUS 337
+#define CLIENTADDR 338
+#define INHERIT 339
+#define REMOTE_ADDRESS 340
+#define EXCHANGE_MODE 341
+#define EXCHANGETYPE 342
+#define DOI 343
+#define DOITYPE 344
+#define SITUATION 345
+#define SITUATIONTYPE 346
+#define CERTIFICATE_TYPE 347
+#define CERTTYPE 348
+#define PEERS_CERTFILE 349
+#define CA_TYPE 350
+#define VERIFY_CERT 351
+#define SEND_CERT 352
+#define SEND_CR 353
+#define MATCH_EMPTY_CR 354
+#define IDENTIFIERTYPE 355
+#define IDENTIFIERQUAL 356
+#define MY_IDENTIFIER 357
+#define PEERS_IDENTIFIER 358
+#define VERIFY_IDENTIFIER 359
+#define DNSSEC 360
+#define CERT_X509 361
+#define CERT_PLAINRSA 362
+#define NONCE_SIZE 363
+#define DH_GROUP 364
+#define KEEPALIVE 365
+#define PASSIVE 366
+#define INITIAL_CONTACT 367
+#define NAT_TRAVERSAL 368
+#define REMOTE_FORCE_LEVEL 369
+#define PROPOSAL_CHECK 370
+#define PROPOSAL_CHECK_LEVEL 371
+#define GENERATE_POLICY 372
+#define GENERATE_LEVEL 373
+#define SUPPORT_PROXY 374
+#define PROPOSAL 375
+#define EXEC_PATH 376
+#define EXEC_COMMAND 377
+#define EXEC_SUCCESS 378
+#define EXEC_FAILURE 379
+#define GSS_ID 380
+#define GSS_ID_ENC 381
+#define GSS_ID_ENCTYPE 382
+#define COMPLEX_BUNDLE 383
+#define DPD 384
+#define DPD_DELAY 385
+#define DPD_RETRY 386
+#define DPD_MAXFAIL 387
+#define PH1ID 388
+#define XAUTH_LOGIN 389
+#define WEAK_PHASE1_CHECK 390
+#define REKEY 391
+#define PREFIX 392
+#define PORT 393
+#define PORTANY 394
+#define UL_PROTO 395
+#define ANY 396
+#define IKE_FRAG 397
+#define ESP_FRAG 398
+#define MODE_CFG 399
+#define PFS_GROUP 400
+#define LIFETIME 401
+#define LIFETYPE_TIME 402
+#define LIFETYPE_BYTE 403
+#define STRENGTH 404
+#define REMOTEID 405
+#define SCRIPT 406
+#define PHASE1_UP 407
+#define PHASE1_DOWN 408
+#define PHASE1_DEAD 409
+#define NUMBER 410
+#define SWITCH 411
+#define BOOLEAN 412
+#define HEXSTRING 413
+#define QUOTEDSTRING 414
+#define ADDRSTRING 415
+#define ADDRRANGE 416
+#define UNITTYPE_BYTE 417
+#define UNITTYPE_KBYTES 418
+#define UNITTYPE_MBYTES 419
+#define UNITTYPE_TBYTES 420
+#define UNITTYPE_SEC 421
+#define UNITTYPE_MIN 422
+#define UNITTYPE_HOUR 423
+#define EOS 424
+#define BOC 425
+#define EOC 426
+#define COMMA 427
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-#if YYDEBUG
-extern int yydebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- PRIVSEP = 258,
- USER = 259,
- GROUP = 260,
- CHROOT = 261,
- PATH = 262,
- PATHTYPE = 263,
- INCLUDE = 264,
- PFKEY_BUFFER = 265,
- LOGGING = 266,
- LOGLEV = 267,
- PADDING = 268,
- PAD_RANDOMIZE = 269,
- PAD_RANDOMIZELEN = 270,
- PAD_MAXLEN = 271,
- PAD_STRICT = 272,
- PAD_EXCLTAIL = 273,
- LISTEN = 274,
- X_ISAKMP = 275,
- X_ISAKMP_NATT = 276,
- X_ADMIN = 277,
- STRICT_ADDRESS = 278,
- ADMINSOCK = 279,
- DISABLED = 280,
- LDAPCFG = 281,
- LDAP_HOST = 282,
- LDAP_PORT = 283,
- LDAP_PVER = 284,
- LDAP_BASE = 285,
- LDAP_BIND_DN = 286,
- LDAP_BIND_PW = 287,
- LDAP_SUBTREE = 288,
- LDAP_ATTR_USER = 289,
- LDAP_ATTR_ADDR = 290,
- LDAP_ATTR_MASK = 291,
- LDAP_ATTR_GROUP = 292,
- LDAP_ATTR_MEMBER = 293,
- RADCFG = 294,
- RAD_AUTH = 295,
- RAD_ACCT = 296,
- RAD_TIMEOUT = 297,
- RAD_RETRIES = 298,
- MODECFG = 299,
- CFG_NET4 = 300,
- CFG_MASK4 = 301,
- CFG_DNS4 = 302,
- CFG_NBNS4 = 303,
- CFG_DEFAULT_DOMAIN = 304,
- CFG_AUTH_SOURCE = 305,
- CFG_AUTH_GROUPS = 306,
- CFG_SYSTEM = 307,
- CFG_RADIUS = 308,
- CFG_PAM = 309,
- CFG_LDAP = 310,
- CFG_LOCAL = 311,
- CFG_NONE = 312,
- CFG_GROUP_SOURCE = 313,
- CFG_ACCOUNTING = 314,
- CFG_CONF_SOURCE = 315,
- CFG_MOTD = 316,
- CFG_POOL_SIZE = 317,
- CFG_AUTH_THROTTLE = 318,
- CFG_SPLIT_NETWORK = 319,
- CFG_SPLIT_LOCAL = 320,
- CFG_SPLIT_INCLUDE = 321,
- CFG_SPLIT_DNS = 322,
- CFG_PFS_GROUP = 323,
- CFG_SAVE_PASSWD = 324,
- RETRY = 325,
- RETRY_COUNTER = 326,
- RETRY_INTERVAL = 327,
- RETRY_PERSEND = 328,
- RETRY_PHASE1 = 329,
- RETRY_PHASE2 = 330,
- NATT_KA = 331,
- ALGORITHM_CLASS = 332,
- ALGORITHMTYPE = 333,
- STRENGTHTYPE = 334,
- SAINFO = 335,
- FROM = 336,
- REMOTE = 337,
- ANONYMOUS = 338,
- CLIENTADDR = 339,
- INHERIT = 340,
- REMOTE_ADDRESS = 341,
- EXCHANGE_MODE = 342,
- EXCHANGETYPE = 343,
- DOI = 344,
- DOITYPE = 345,
- SITUATION = 346,
- SITUATIONTYPE = 347,
- CERTIFICATE_TYPE = 348,
- CERTTYPE = 349,
- PEERS_CERTFILE = 350,
- CA_TYPE = 351,
- VERIFY_CERT = 352,
- SEND_CERT = 353,
- SEND_CR = 354,
- MATCH_EMPTY_CR = 355,
- IDENTIFIERTYPE = 356,
- IDENTIFIERQUAL = 357,
- MY_IDENTIFIER = 358,
- PEERS_IDENTIFIER = 359,
- VERIFY_IDENTIFIER = 360,
- DNSSEC = 361,
- CERT_X509 = 362,
- CERT_PLAINRSA = 363,
- NONCE_SIZE = 364,
- DH_GROUP = 365,
- KEEPALIVE = 366,
- PASSIVE = 367,
- INITIAL_CONTACT = 368,
- NAT_TRAVERSAL = 369,
- REMOTE_FORCE_LEVEL = 370,
- PROPOSAL_CHECK = 371,
- PROPOSAL_CHECK_LEVEL = 372,
- GENERATE_POLICY = 373,
- GENERATE_LEVEL = 374,
- SUPPORT_PROXY = 375,
- PROPOSAL = 376,
- EXEC_PATH = 377,
- EXEC_COMMAND = 378,
- EXEC_SUCCESS = 379,
- EXEC_FAILURE = 380,
- GSS_ID = 381,
- GSS_ID_ENC = 382,
- GSS_ID_ENCTYPE = 383,
- COMPLEX_BUNDLE = 384,
- DPD = 385,
- DPD_DELAY = 386,
- DPD_RETRY = 387,
- DPD_MAXFAIL = 388,
- PH1ID = 389,
- XAUTH_LOGIN = 390,
- WEAK_PHASE1_CHECK = 391,
- REKEY = 392,
- PREFIX = 393,
- PORT = 394,
- PORTANY = 395,
- UL_PROTO = 396,
- ANY = 397,
- IKE_FRAG = 398,
- ESP_FRAG = 399,
- MODE_CFG = 400,
- PFS_GROUP = 401,
- LIFETIME = 402,
- LIFETYPE_TIME = 403,
- LIFETYPE_BYTE = 404,
- STRENGTH = 405,
- REMOTEID = 406,
- SCRIPT = 407,
- PHASE1_UP = 408,
- PHASE1_DOWN = 409,
- PHASE1_DEAD = 410,
- NUMBER = 411,
- SWITCH = 412,
- BOOLEAN = 413,
- HEXSTRING = 414,
- QUOTEDSTRING = 415,
- ADDRSTRING = 416,
- ADDRRANGE = 417,
- UNITTYPE_BYTE = 418,
- UNITTYPE_KBYTES = 419,
- UNITTYPE_MBYTES = 420,
- UNITTYPE_TBYTES = 421,
- UNITTYPE_SEC = 422,
- UNITTYPE_MIN = 423,
- UNITTYPE_HOUR = 424,
- EOS = 425,
- BOC = 426,
- EOC = 427,
- COMMA = 428
- };
-#endif
-/* Tokens. */
-#define PRIVSEP 258
-#define USER 259
-#define GROUP 260
-#define CHROOT 261
-#define PATH 262
-#define PATHTYPE 263
-#define INCLUDE 264
-#define PFKEY_BUFFER 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 LDAPCFG 281
-#define LDAP_HOST 282
-#define LDAP_PORT 283
-#define LDAP_PVER 284
-#define LDAP_BASE 285
-#define LDAP_BIND_DN 286
-#define LDAP_BIND_PW 287
-#define LDAP_SUBTREE 288
-#define LDAP_ATTR_USER 289
-#define LDAP_ATTR_ADDR 290
-#define LDAP_ATTR_MASK 291
-#define LDAP_ATTR_GROUP 292
-#define LDAP_ATTR_MEMBER 293
-#define RADCFG 294
-#define RAD_AUTH 295
-#define RAD_ACCT 296
-#define RAD_TIMEOUT 297
-#define RAD_RETRIES 298
-#define MODECFG 299
-#define CFG_NET4 300
-#define CFG_MASK4 301
-#define CFG_DNS4 302
-#define CFG_NBNS4 303
-#define CFG_DEFAULT_DOMAIN 304
-#define CFG_AUTH_SOURCE 305
-#define CFG_AUTH_GROUPS 306
-#define CFG_SYSTEM 307
-#define CFG_RADIUS 308
-#define CFG_PAM 309
-#define CFG_LDAP 310
-#define CFG_LOCAL 311
-#define CFG_NONE 312
-#define CFG_GROUP_SOURCE 313
-#define CFG_ACCOUNTING 314
-#define CFG_CONF_SOURCE 315
-#define CFG_MOTD 316
-#define CFG_POOL_SIZE 317
-#define CFG_AUTH_THROTTLE 318
-#define CFG_SPLIT_NETWORK 319
-#define CFG_SPLIT_LOCAL 320
-#define CFG_SPLIT_INCLUDE 321
-#define CFG_SPLIT_DNS 322
-#define CFG_PFS_GROUP 323
-#define CFG_SAVE_PASSWD 324
-#define RETRY 325
-#define RETRY_COUNTER 326
-#define RETRY_INTERVAL 327
-#define RETRY_PERSEND 328
-#define RETRY_PHASE1 329
-#define RETRY_PHASE2 330
-#define NATT_KA 331
-#define ALGORITHM_CLASS 332
-#define ALGORITHMTYPE 333
-#define STRENGTHTYPE 334
-#define SAINFO 335
-#define FROM 336
-#define REMOTE 337
-#define ANONYMOUS 338
-#define CLIENTADDR 339
-#define INHERIT 340
-#define REMOTE_ADDRESS 341
-#define EXCHANGE_MODE 342
-#define EXCHANGETYPE 343
-#define DOI 344
-#define DOITYPE 345
-#define SITUATION 346
-#define SITUATIONTYPE 347
-#define CERTIFICATE_TYPE 348
-#define CERTTYPE 349
-#define PEERS_CERTFILE 350
-#define CA_TYPE 351
-#define VERIFY_CERT 352
-#define SEND_CERT 353
-#define SEND_CR 354
-#define MATCH_EMPTY_CR 355
-#define IDENTIFIERTYPE 356
-#define IDENTIFIERQUAL 357
-#define MY_IDENTIFIER 358
-#define PEERS_IDENTIFIER 359
-#define VERIFY_IDENTIFIER 360
-#define DNSSEC 361
-#define CERT_X509 362
-#define CERT_PLAINRSA 363
-#define NONCE_SIZE 364
-#define DH_GROUP 365
-#define KEEPALIVE 366
-#define PASSIVE 367
-#define INITIAL_CONTACT 368
-#define NAT_TRAVERSAL 369
-#define REMOTE_FORCE_LEVEL 370
-#define PROPOSAL_CHECK 371
-#define PROPOSAL_CHECK_LEVEL 372
-#define GENERATE_POLICY 373
-#define GENERATE_LEVEL 374
-#define SUPPORT_PROXY 375
-#define PROPOSAL 376
-#define EXEC_PATH 377
-#define EXEC_COMMAND 378
-#define EXEC_SUCCESS 379
-#define EXEC_FAILURE 380
-#define GSS_ID 381
-#define GSS_ID_ENC 382
-#define GSS_ID_ENCTYPE 383
-#define COMPLEX_BUNDLE 384
-#define DPD 385
-#define DPD_DELAY 386
-#define DPD_RETRY 387
-#define DPD_MAXFAIL 388
-#define PH1ID 389
-#define XAUTH_LOGIN 390
-#define WEAK_PHASE1_CHECK 391
-#define REKEY 392
-#define PREFIX 393
-#define PORT 394
-#define PORTANY 395
-#define UL_PROTO 396
-#define ANY 397
-#define IKE_FRAG 398
-#define ESP_FRAG 399
-#define MODE_CFG 400
-#define PFS_GROUP 401
-#define LIFETIME 402
-#define LIFETYPE_TIME 403
-#define LIFETYPE_BYTE 404
-#define STRENGTH 405
-#define REMOTEID 406
-#define SCRIPT 407
-#define PHASE1_UP 408
-#define PHASE1_DOWN 409
-#define PHASE1_DEAD 410
-#define NUMBER 411
-#define SWITCH 412
-#define BOOLEAN 413
-#define HEXSTRING 414
-#define QUOTEDSTRING 415
-#define ADDRSTRING 416
-#define ADDRRANGE 417
-#define UNITTYPE_BYTE 418
-#define UNITTYPE_KBYTES 419
-#define UNITTYPE_MBYTES 420
-#define UNITTYPE_TBYTES 421
-#define UNITTYPE_SEC 422
-#define UNITTYPE_MIN 423
-#define UNITTYPE_HOUR 424
-#define EOS 425
-#define BOC 426
-#define EOC 427
-#define COMMA 428
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 2049 of yacc.c */
-#line 247 "cfparse.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+typedef union {
unsigned long num;
vchar_t *val;
struct remoteconf *rmconf;
struct sockaddr *saddr;
struct sainfoalg *alg;
-
-
-/* Line 2049 of yacc.c */
-#line 412 "cfparse.h"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !YY_CFPARSE_H */
+#endif /* !YYSTYPE_IS_DECLARED */
+extern YYSTYPE racoonyylval;
diff --git a/ipsec-tools/src/racoon/cfparse_wrapper.c b/ipsec-tools/src/racoon/cfparse_wrapper.c
new file mode 100644
index 00000000..7db871fd
--- /dev/null
+++ b/ipsec-tools/src/racoon/cfparse_wrapper.c
@@ -0,0 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#include "cfparse.c"
+#include "rtems-bsd-racoon-cfparse_wrapper-data.h"
diff --git a/ipsec-tools/src/racoon/cftoken.c b/ipsec-tools/src/racoon/cftoken.c
index 7b9bb14f..b28caad0 100644
--- a/ipsec-tools/src/racoon/cftoken.c
+++ b/ipsec-tools/src/racoon/cftoken.c
@@ -1,10 +1,29 @@
-#line 3 "cftoken.c"
+#line 3 "<stdout>"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
+#define yy_create_buffer racoonyy_create_buffer
+#define yy_delete_buffer racoonyy_delete_buffer
+#define yy_flex_debug racoonyy_flex_debug
+#define yy_init_buffer racoonyy_init_buffer
+#define yy_flush_buffer racoonyy_flush_buffer
+#define yy_load_buffer_state racoonyy_load_buffer_state
+#define yy_switch_to_buffer racoonyy_switch_to_buffer
+#define yyin racoonyyin
+#define yyleng racoonyyleng
+#define yylex racoonyylex
+#define yylineno racoonyylineno
+#define yyout racoonyyout
+#define yyrestart racoonyyrestart
+#define yytext racoonyytext
+#define yywrap racoonyywrap
+#define yyalloc racoonyyalloc
+#define yyrealloc racoonyyrealloc
+#define yyfree racoonyyfree
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
@@ -15,6 +34,16 @@
/* First, we deal with platform-specific or compiler-specific issues. */
+#if defined(__FreeBSD__)
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+#include <sys/cdefs.h>
+#include <stdint.h>
+#else
+#define __dead2
+#endif
+
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
@@ -30,7 +59,8 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__FreeBSD__) || \
+ (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -135,13 +165,13 @@ typedef unsigned int flex_uint32_t;
#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_NEW_FILE racoonyyrestart(racoonyyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
+#define YY_BUF_SIZE 1024
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -158,9 +188,9 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t yyleng;
+extern yy_size_t racoonyyleng;
-extern FILE *yyin, *yyout;
+extern FILE *racoonyyin, *racoonyyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
@@ -172,13 +202,13 @@ extern FILE *yyin, *yyout;
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up racoonyytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up racoonyytext again */ \
} \
while ( 0 )
@@ -241,8 +271,8 @@ struct yy_buffer_state
* 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.
+ * (via racoonyyrestart()), so that the user can continue scanning by
+ * just pointing racoonyyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -263,57 +293,58 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+#define yy_current_buffer YY_CURRENT_BUFFER
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when yytext is formed. */
+/* yy_hold_char holds the character lost when racoonyytext is formed. */
static char yy_hold_char;
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+yy_size_t racoonyyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* 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 ...
+/* Flag which is used to allow racoonyywrap()'s to do buffer switches
+ * instead of setting up a fresh racoonyyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
+void racoonyyrestart (FILE *input_file );
+void racoonyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE racoonyy_create_buffer (FILE *file,int size );
+void racoonyy_delete_buffer (YY_BUFFER_STATE b );
+void racoonyy_flush_buffer (YY_BUFFER_STATE b );
+void racoonyypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void racoonyypop_buffer_state (void );
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void racoonyyensure_buffer_stack (void );
+static void racoonyy_load_buffer_state (void );
+static void racoonyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER racoonyy_flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE racoonyy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE racoonyy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE racoonyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+void *racoonyyalloc (yy_size_t );
+void *racoonyyrealloc (void *,yy_size_t );
+void racoonyyfree (void * );
-#define yy_new_buffer yy_create_buffer
+#define yy_new_buffer racoonyy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ racoonyyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ racoonyy_create_buffer(racoonyyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
@@ -321,9 +352,9 @@ void yyfree (void * );
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
+ racoonyyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ racoonyy_create_buffer(racoonyyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
@@ -334,29 +365,29 @@ void yyfree (void * );
typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+FILE *racoonyyin = (FILE *) 0, *racoonyyout = (FILE *) 0;
typedef int yy_state_type;
-extern int yylineno;
+extern int racoonyylineno;
-int yylineno = 1;
+int racoonyylineno = 1;
-extern char *yytext;
-#define yytext_ptr yytext
+extern char *racoonyytext;
+#define yytext_ptr racoonyytext
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static void yy_fatal_error (yyconst char msg[] ) __dead2;
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up racoonyytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
(yytext_ptr) -= (yy_more_len); \
- yyleng = (size_t) (yy_cp - (yytext_ptr)); \
+ racoonyyleng = (size_t) (yy_cp - (yytext_ptr)); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
@@ -1535,8 +1566,8 @@ static yyconst flex_int16_t yy_chk[2259] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+extern int racoonyy_flex_debug;
+int racoonyy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -1547,11 +1578,11 @@ 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"
+char *racoonyytext;
+#line 1 "../../ipsec-tools/src/racoon/cftoken.l"
/* $NetBSD: cftoken.l,v 1.23.2.1 2012/08/29 08:42:24 tteras Exp $ */
/* Id: cftoken.l,v 1.53 2006/08/22 18:17:17 manubsd Exp */
-#line 6 "cftoken.l"
+#line 6 "../../ipsec-tools/src/racoon/cftoken.l"
/*
* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 and 2003 WIDE Project.
* All rights reserved.
@@ -1630,7 +1661,7 @@ int yyerrorcount = 0;
#if defined(YIPS_DEBUG)
# define YYDB plog(LLV_DEBUG2, LOCATION, NULL, \
- "begin <%d>%s\n", yy_start, yytext);
+ "begin <%d>%s\n", yy_start, racoonyytext);
# define YYD { \
plog(LLV_DEBUG2, LOCATION, NULL, "<%d>%s", \
yy_start, loglevel >= LLV_DEBUG2 ? "\n" : ""); \
@@ -1661,7 +1692,7 @@ static int yy_first_time = 1;
-#line 1665 "cftoken.c"
+#line 1696 "<stdout>"
#define INITIAL 0
#define S_INI 1
@@ -1701,31 +1732,31 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy (void );
+int racoonyylex_destroy (void );
-int yyget_debug (void );
+int racoonyyget_debug (void );
-void yyset_debug (int debug_flag );
+void racoonyyset_debug (int debug_flag );
-YY_EXTRA_TYPE yyget_extra (void );
+YY_EXTRA_TYPE racoonyyget_extra (void );
-void yyset_extra (YY_EXTRA_TYPE user_defined );
+void racoonyyset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in (void );
+FILE *racoonyyget_in (void );
-void yyset_in (FILE * in_str );
+void racoonyyset_in (FILE * in_str );
-FILE *yyget_out (void );
+FILE *racoonyyget_out (void );
-void yyset_out (FILE * out_str );
+void racoonyyset_out (FILE * out_str );
-yy_size_t yyget_leng (void );
+yy_size_t racoonyyget_leng (void );
-char *yyget_text (void );
+char *racoonyyget_text (void );
-int yyget_lineno (void );
+int racoonyyget_lineno (void );
-void yyset_lineno (int line_number );
+void racoonyyset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1733,13 +1764,15 @@ void yyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int racoonyywrap (void );
#else
-extern int yywrap (void );
+extern int racoonyywrap (void );
#endif
#endif
+#ifndef YY_NO_UNPUT
static void yyunput (int c,char *buf_ptr );
+#endif
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
@@ -1769,7 +1802,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( racoonyytext, racoonyyleng, 1, racoonyyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1782,18 +1815,18 @@ static int input (void );
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( racoonyyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
+ if ( c == EOF && ferror( racoonyyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = fread(buf, 1, max_size, racoonyyin))==0 && ferror(racoonyyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1801,7 +1834,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(yyin); \
+ clearerr(racoonyyin); \
} \
}\
\
@@ -1834,12 +1867,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int yylex (void);
+extern int racoonyylex (void);
-#define YY_DECL int yylex (void)
+#define YY_DECL int racoonyylex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after racoonyytext and racoonyyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1858,11 +1891,11 @@ extern int yylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
-#line 142 "cftoken.l"
+#line 142 "../../ipsec-tools/src/racoon/cftoken.l"
if (yy_first_time) {
@@ -1872,7 +1905,7 @@ YY_DECL
/* privsep */
-#line 1876 "cftoken.c"
+#line 1909 "<stdout>"
if ( !(yy_init) )
{
@@ -1885,19 +1918,19 @@ YY_DECL
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! yyin )
- yyin = stdin;
+ if ( ! racoonyyin )
+ racoonyyin = stdin;
- if ( ! yyout )
- yyout = stdout;
+ if ( ! racoonyyout )
+ racoonyyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
+ racoonyyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ racoonyy_create_buffer(racoonyyin,YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ racoonyy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
@@ -1910,7 +1943,7 @@ YY_DECL
}
yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
+ /* Support of racoonyytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1922,7 +1955,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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;
@@ -1963,1421 +1996,1421 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 151 "cftoken.l"
+#line 151 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_PRIV; YYDB; return(PRIVSEP); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 152 "cftoken.l"
+#line 152 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 153 "cftoken.l"
+#line 153 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(USER); }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 154 "cftoken.l"
+#line 154 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(GROUP); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 155 "cftoken.l"
+#line 155 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CHROOT); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 156 "cftoken.l"
+#line 156 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* path */
case 7:
YY_RULE_SETUP
-#line 159 "cftoken.l"
+#line 159 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_PTH; YYDB; return(PATH); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 160 "cftoken.l"
+#line 160 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_PATHTYPE_INCLUDE;
return(PATHTYPE); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 162 "cftoken.l"
+#line 162 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_PATHTYPE_PSK;
return(PATHTYPE); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 164 "cftoken.l"
+#line 164 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_PATHTYPE_CERT;
return(PATHTYPE); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 166 "cftoken.l"
+#line 166 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_PATHTYPE_SCRIPT;
return(PATHTYPE); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 168 "cftoken.l"
+#line 168 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_PATHTYPE_BACKUPSA;
return(PATHTYPE); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 170 "cftoken.l"
+#line 170 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_PATHTYPE_PIDFILE;
return(PATHTYPE); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 172 "cftoken.l"
+#line 172 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; YYDB; return(EOS); }
YY_BREAK
/* include */
case 15:
YY_RULE_SETUP
-#line 175 "cftoken.l"
+#line 175 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYDB; return(INCLUDE); }
YY_BREAK
/* pfkey_buffer */
case 16:
YY_RULE_SETUP
-#line 178 "cftoken.l"
+#line 178 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYDB; return(PFKEY_BUFFER); }
YY_BREAK
/* special */
case 17:
YY_RULE_SETUP
-#line 181 "cftoken.l"
+#line 181 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYDB; return(COMPLEX_BUNDLE); }
YY_BREAK
/* logging */
case 18:
YY_RULE_SETUP
-#line 184 "cftoken.l"
+#line 184 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_LOG; YYDB; return(LOGGING); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 185 "cftoken.l"
+#line 185 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LLV_ERROR; return(LOGLEV); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 186 "cftoken.l"
+#line 186 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LLV_WARNING; return(LOGLEV); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 187 "cftoken.l"
+#line 187 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LLV_NOTIFY; return(LOGLEV); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 188 "cftoken.l"
+#line 188 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LLV_INFO; return(LOGLEV); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 189 "cftoken.l"
+#line 189 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LLV_DEBUG; return(LOGLEV); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 190 "cftoken.l"
+#line 190 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LLV_DEBUG2; return(LOGLEV); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 191 "cftoken.l"
+#line 191 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOS); }
YY_BREAK
/* padding */
case 26:
YY_RULE_SETUP
-#line 194 "cftoken.l"
+#line 194 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_PAD; YYDB; return(PADDING); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 195 "cftoken.l"
+#line 195 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 196 "cftoken.l"
+#line 196 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PAD_RANDOMIZE); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 197 "cftoken.l"
+#line 197 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PAD_RANDOMIZELEN); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 198 "cftoken.l"
+#line 198 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PAD_MAXLEN); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 199 "cftoken.l"
+#line 199 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PAD_STRICT); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 200 "cftoken.l"
+#line 200 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PAD_EXCLTAIL); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 201 "cftoken.l"
+#line 201 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* listen */
case 34:
YY_RULE_SETUP
-#line 204 "cftoken.l"
+#line 204 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_LST; YYDB; return(LISTEN); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 205 "cftoken.l"
+#line 205 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 206 "cftoken.l"
+#line 206 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(X_ISAKMP); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 207 "cftoken.l"
+#line 207 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(X_ISAKMP_NATT); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 208 "cftoken.l"
+#line 208 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(X_ADMIN); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 209 "cftoken.l"
+#line 209 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(ADMINSOCK); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 210 "cftoken.l"
+#line 210 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DISABLED); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 211 "cftoken.l"
+#line 211 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(STRICT_ADDRESS); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 212 "cftoken.l"
+#line 212 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* radius config */
case 43:
YY_RULE_SETUP
-#line 215 "cftoken.l"
+#line 215 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_RAD; YYDB; return(RADCFG); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 216 "cftoken.l"
+#line 216 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 217 "cftoken.l"
+#line 217 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RAD_AUTH); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 218 "cftoken.l"
+#line 218 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RAD_ACCT); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 219 "cftoken.l"
+#line 219 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RAD_TIMEOUT); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 220 "cftoken.l"
+#line 220 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RAD_RETRIES); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 221 "cftoken.l"
+#line 221 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* ldap config */
case 50:
YY_RULE_SETUP
-#line 224 "cftoken.l"
+#line 224 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_LDAP; YYDB; return(LDAPCFG); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 225 "cftoken.l"
+#line 225 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 226 "cftoken.l"
+#line 226 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_PVER); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 227 "cftoken.l"
+#line 227 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_HOST); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 228 "cftoken.l"
+#line 228 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_PORT); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 229 "cftoken.l"
+#line 229 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_BASE); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 230 "cftoken.l"
+#line 230 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_SUBTREE); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 231 "cftoken.l"
+#line 231 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_BIND_DN); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 232 "cftoken.l"
+#line 232 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_BIND_PW); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 233 "cftoken.l"
+#line 233 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_ATTR_USER); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 234 "cftoken.l"
+#line 234 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_ATTR_ADDR); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 235 "cftoken.l"
+#line 235 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_ATTR_MASK); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 236 "cftoken.l"
+#line 236 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_ATTR_GROUP); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 237 "cftoken.l"
+#line 237 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LDAP_ATTR_MEMBER); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 238 "cftoken.l"
+#line 238 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* mode_cfg */
case 65:
YY_RULE_SETUP
-#line 241 "cftoken.l"
+#line 241 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_CFG; YYDB; return(MODECFG); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 242 "cftoken.l"
+#line 242 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 243 "cftoken.l"
+#line 243 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_NET4); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 244 "cftoken.l"
+#line 244 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_MASK4); }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 245 "cftoken.l"
+#line 245 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_DNS4); }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 246 "cftoken.l"
+#line 246 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_NBNS4); }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 247 "cftoken.l"
+#line 247 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_NBNS4); }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 248 "cftoken.l"
+#line 248 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_DEFAULT_DOMAIN); }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 249 "cftoken.l"
+#line 249 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_AUTH_SOURCE); }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 250 "cftoken.l"
+#line 250 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_AUTH_GROUPS); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 251 "cftoken.l"
+#line 251 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_GROUP_SOURCE); }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 252 "cftoken.l"
+#line 252 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_CONF_SOURCE); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 253 "cftoken.l"
+#line 253 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_ACCOUNTING); }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 254 "cftoken.l"
+#line 254 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_SYSTEM); }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 255 "cftoken.l"
+#line 255 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_LOCAL); }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 256 "cftoken.l"
+#line 256 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_NONE); }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 257 "cftoken.l"
+#line 257 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_RADIUS); }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 258 "cftoken.l"
+#line 258 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_PAM); }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 259 "cftoken.l"
+#line 259 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_LDAP); }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 260 "cftoken.l"
+#line 260 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_POOL_SIZE); }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 261 "cftoken.l"
+#line 261 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_MOTD); }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 262 "cftoken.l"
+#line 262 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_AUTH_THROTTLE); }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 263 "cftoken.l"
+#line 263 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_SPLIT_NETWORK); }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 264 "cftoken.l"
+#line 264 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_SPLIT_LOCAL); }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 265 "cftoken.l"
+#line 265 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_SPLIT_INCLUDE); }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 266 "cftoken.l"
+#line 266 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_SPLIT_DNS); }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 267 "cftoken.l"
+#line 267 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_PFS_GROUP); }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 268 "cftoken.l"
+#line 268 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CFG_SAVE_PASSWD); }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 269 "cftoken.l"
+#line 269 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(COMMA); }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 270 "cftoken.l"
+#line 270 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* timer */
case 95:
YY_RULE_SETUP
-#line 273 "cftoken.l"
+#line 273 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_RTRY; YYDB; return(RETRY); }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 274 "cftoken.l"
+#line 274 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 275 "cftoken.l"
+#line 275 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RETRY_COUNTER); }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 276 "cftoken.l"
+#line 276 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RETRY_INTERVAL); }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 277 "cftoken.l"
+#line 277 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RETRY_PERSEND); }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 278 "cftoken.l"
+#line 278 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RETRY_PHASE1); }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 279 "cftoken.l"
+#line 279 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(RETRY_PHASE2); }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 280 "cftoken.l"
+#line 280 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(NATT_KA); }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 281 "cftoken.l"
+#line 281 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
/* sainfo */
case 104:
YY_RULE_SETUP
-#line 284 "cftoken.l"
+#line 284 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_SAINF; YYDB; return(SAINFO); }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 285 "cftoken.l"
+#line 285 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(ANONYMOUS); }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 286 "cftoken.l"
+#line 286 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CLIENTADDR); }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 287 "cftoken.l"
+#line 287 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PORTANY); }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 288 "cftoken.l"
+#line 288 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(ANY); }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 289 "cftoken.l"
+#line 289 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(FROM); }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 290 "cftoken.l"
+#line 290 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(GROUP); }
YY_BREAK
/* sainfo spec */
case 111:
YY_RULE_SETUP
-#line 292 "cftoken.l"
+#line 292 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_SAINFS; return(BOC); }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 293 "cftoken.l"
+#line 293 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOS); }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 294 "cftoken.l"
+#line 294 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 295 "cftoken.l"
+#line 295 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PFS_GROUP); }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 296 "cftoken.l"
+#line 296 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(REMOTEID); }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 297 "cftoken.l"
+#line 297 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(MY_IDENTIFIER); }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 298 "cftoken.l"
+#line 298 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETIME); }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 299 "cftoken.l"
+#line 299 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETYPE_TIME); }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 300 "cftoken.l"
+#line 300 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETYPE_BYTE); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 301 "cftoken.l"
+#line 301 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algclass_ipsec_enc; return(ALGORITHM_CLASS); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 302 "cftoken.l"
+#line 302 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algclass_ipsec_auth; return(ALGORITHM_CLASS); }
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 303 "cftoken.l"
+#line 303 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algclass_ipsec_comp; return(ALGORITHM_CLASS); }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 304 "cftoken.l"
+#line 304 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(COMMA); }
YY_BREAK
/* remote */
case 124:
YY_RULE_SETUP
-#line 307 "cftoken.l"
+#line 307 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_RMT; YYDB; return(REMOTE); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 308 "cftoken.l"
+#line 308 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(ANONYMOUS); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 309 "cftoken.l"
+#line 309 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(INHERIT); }
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 310 "cftoken.l"
+#line 310 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; YYDB; return(EOS); }
YY_BREAK
/* remote spec */
case 128:
YY_RULE_SETUP
-#line 312 "cftoken.l"
+#line 312 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_RMTS; return(BOC); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 313 "cftoken.l"
+#line 313 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; return(EOC); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 314 "cftoken.l"
+#line 314 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(REMOTE_ADDRESS); }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 315 "cftoken.l"
+#line 315 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(EXCHANGE_MODE); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 316 "cftoken.l"
+#line 316 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; /* XXX ignored, but to be handled. */ ; }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 317 "cftoken.l"
+#line 317 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = ISAKMP_ETYPE_BASE; return(EXCHANGETYPE); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 318 "cftoken.l"
+#line 318 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = ISAKMP_ETYPE_IDENT; return(EXCHANGETYPE); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 319 "cftoken.l"
+#line 319 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = ISAKMP_ETYPE_AGG; return(EXCHANGETYPE); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 320 "cftoken.l"
+#line 320 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DOI); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 321 "cftoken.l"
+#line 321 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPSEC_DOI; return(DOITYPE); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 322 "cftoken.l"
+#line 322 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(SITUATION); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 323 "cftoken.l"
+#line 323 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPSECDOI_SIT_IDENTITY_ONLY; return(SITUATIONTYPE); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 324 "cftoken.l"
+#line 324 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPSECDOI_SIT_SECRECY; return(SITUATIONTYPE); }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 325 "cftoken.l"
+#line 325 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPSECDOI_SIT_INTEGRITY; return(SITUATIONTYPE); }
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 326 "cftoken.l"
+#line 326 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(MY_IDENTIFIER); }
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 327 "cftoken.l"
+#line 327 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(XAUTH_LOGIN); /* formerly identifier type login */ }
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 328 "cftoken.l"
+#line 328 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PEERS_IDENTIFIER); }
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 329 "cftoken.l"
+#line 329 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(VERIFY_IDENTIFIER); }
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 330 "cftoken.l"
+#line 330 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CERTIFICATE_TYPE); }
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 331 "cftoken.l"
+#line 331 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(CA_TYPE); }
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 332 "cftoken.l"
+#line 332 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = ISAKMP_CERT_X509SIGN; return(CERT_X509); }
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 333 "cftoken.l"
+#line 333 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = ISAKMP_CERT_PLAINRSA; return(CERT_PLAINRSA); }
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 334 "cftoken.l"
+#line 334 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PEERS_CERTFILE); }
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 335 "cftoken.l"
+#line 335 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DNSSEC); }
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 336 "cftoken.l"
+#line 336 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(VERIFY_CERT); }
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 337 "cftoken.l"
+#line 337 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(SEND_CERT); }
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 338 "cftoken.l"
+#line 338 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(SEND_CR); }
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 339 "cftoken.l"
+#line 339 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(MATCH_EMPTY_CR); }
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 340 "cftoken.l"
+#line 340 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DH_GROUP); }
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 341 "cftoken.l"
+#line 341 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(NONCE_SIZE); }
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 342 "cftoken.l"
+#line 342 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(GENERATE_POLICY); }
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 343 "cftoken.l"
+#line 343 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = GENERATE_POLICY_UNIQUE; return(GENERATE_LEVEL); }
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 344 "cftoken.l"
+#line 344 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = GENERATE_POLICY_REQUIRE; return(GENERATE_LEVEL); }
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 345 "cftoken.l"
+#line 345 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(SUPPORT_PROXY); }
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 346 "cftoken.l"
+#line 346 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(INITIAL_CONTACT); }
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 347 "cftoken.l"
+#line 347 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(NAT_TRAVERSAL); }
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 348 "cftoken.l"
+#line 348 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(REMOTE_FORCE_LEVEL); }
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 349 "cftoken.l"
+#line 349 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PROPOSAL_CHECK); }
YY_BREAK
case 166:
YY_RULE_SETUP
-#line 350 "cftoken.l"
+#line 350 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = PROP_CHECK_OBEY; return(PROPOSAL_CHECK_LEVEL); }
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 351 "cftoken.l"
+#line 351 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = PROP_CHECK_STRICT; return(PROPOSAL_CHECK_LEVEL); }
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 352 "cftoken.l"
+#line 352 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = PROP_CHECK_EXACT; return(PROPOSAL_CHECK_LEVEL); }
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 353 "cftoken.l"
+#line 353 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = PROP_CHECK_CLAIM; return(PROPOSAL_CHECK_LEVEL); }
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 354 "cftoken.l"
+#line 354 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(KEEPALIVE); }
YY_BREAK
case 171:
YY_RULE_SETUP
-#line 355 "cftoken.l"
+#line 355 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PASSIVE); }
YY_BREAK
case 172:
YY_RULE_SETUP
-#line 356 "cftoken.l"
+#line 356 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETIME); }
YY_BREAK
case 173:
YY_RULE_SETUP
-#line 357 "cftoken.l"
+#line 357 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETYPE_TIME); }
YY_BREAK
case 174:
YY_RULE_SETUP
-#line 358 "cftoken.l"
+#line 358 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETYPE_BYTE); }
YY_BREAK
case 175:
YY_RULE_SETUP
-#line 359 "cftoken.l"
+#line 359 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DPD); }
YY_BREAK
case 176:
YY_RULE_SETUP
-#line 360 "cftoken.l"
+#line 360 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DPD_DELAY); }
YY_BREAK
case 177:
YY_RULE_SETUP
-#line 361 "cftoken.l"
+#line 361 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DPD_RETRY); }
YY_BREAK
case 178:
YY_RULE_SETUP
-#line 362 "cftoken.l"
+#line 362 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DPD_MAXFAIL); }
YY_BREAK
case 179:
YY_RULE_SETUP
-#line 363 "cftoken.l"
+#line 363 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PH1ID); }
YY_BREAK
case 180:
YY_RULE_SETUP
-#line 364 "cftoken.l"
+#line 364 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(IKE_FRAG); }
YY_BREAK
case 181:
YY_RULE_SETUP
-#line 365 "cftoken.l"
+#line 365 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(ESP_FRAG); }
YY_BREAK
case 182:
YY_RULE_SETUP
-#line 366 "cftoken.l"
+#line 366 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(SCRIPT); }
YY_BREAK
case 183:
YY_RULE_SETUP
-#line 367 "cftoken.l"
+#line 367 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PHASE1_UP); }
YY_BREAK
case 184:
YY_RULE_SETUP
-#line 368 "cftoken.l"
+#line 368 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PHASE1_DOWN); }
YY_BREAK
case 185:
YY_RULE_SETUP
-#line 369 "cftoken.l"
+#line 369 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(PHASE1_DEAD); }
YY_BREAK
case 186:
YY_RULE_SETUP
-#line 370 "cftoken.l"
+#line 370 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(MODE_CFG); }
YY_BREAK
case 187:
YY_RULE_SETUP
-#line 371 "cftoken.l"
+#line 371 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(WEAK_PHASE1_CHECK); }
YY_BREAK
case 188:
YY_RULE_SETUP
-#line 372 "cftoken.l"
+#line 372 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(REKEY); }
YY_BREAK
/* remote proposal */
case 189:
YY_RULE_SETUP
-#line 374 "cftoken.l"
+#line 374 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_RMTP; YYDB; return(PROPOSAL); }
YY_BREAK
case 190:
YY_RULE_SETUP
-#line 375 "cftoken.l"
+#line 375 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(BOC); }
YY_BREAK
case 191:
YY_RULE_SETUP
-#line 376 "cftoken.l"
+#line 376 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_RMTS; return(EOC); }
YY_BREAK
case 192:
YY_RULE_SETUP
-#line 377 "cftoken.l"
+#line 377 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETIME); }
YY_BREAK
case 193:
YY_RULE_SETUP
-#line 378 "cftoken.l"
+#line 378 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETYPE_TIME); }
YY_BREAK
case 194:
YY_RULE_SETUP
-#line 379 "cftoken.l"
+#line 379 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(LIFETYPE_BYTE); }
YY_BREAK
case 195:
YY_RULE_SETUP
-#line 380 "cftoken.l"
+#line 380 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algclass_isakmp_enc; return(ALGORITHM_CLASS); }
YY_BREAK
case 196:
YY_RULE_SETUP
-#line 381 "cftoken.l"
+#line 381 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algclass_isakmp_ameth; return(ALGORITHM_CLASS); }
YY_BREAK
case 197:
YY_RULE_SETUP
-#line 382 "cftoken.l"
+#line 382 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algclass_isakmp_hash; return(ALGORITHM_CLASS); }
YY_BREAK
case 198:
YY_RULE_SETUP
-#line 383 "cftoken.l"
+#line 383 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(DH_GROUP); }
YY_BREAK
case 199:
YY_RULE_SETUP
-#line 384 "cftoken.l"
+#line 384 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(GSS_ID); }
YY_BREAK
case 200:
YY_RULE_SETUP
-#line 385 "cftoken.l"
+#line 385 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(GSS_ID); } /* for back compatibility */
YY_BREAK
/* GSS ID encoding type (global) */
case 201:
YY_RULE_SETUP
-#line 388 "cftoken.l"
+#line 388 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_GSSENC; YYDB; return(GSS_ID_ENC); }
YY_BREAK
case 202:
YY_RULE_SETUP
-#line 389 "cftoken.l"
+#line 389 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_GSSENC_LATIN1;
return(GSS_ID_ENCTYPE); }
YY_BREAK
case 203:
YY_RULE_SETUP
-#line 391 "cftoken.l"
+#line 391 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = LC_GSSENC_UTF16LE;
return(GSS_ID_ENCTYPE); }
YY_BREAK
case 204:
YY_RULE_SETUP
-#line 393 "cftoken.l"
+#line 393 "../../ipsec-tools/src/racoon/cftoken.l"
{ BEGIN S_INI; YYDB; return(EOS); }
YY_BREAK
/* parameter */
case 205:
YY_RULE_SETUP
-#line 396 "cftoken.l"
+#line 396 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = TRUE; return(SWITCH); }
YY_BREAK
case 206:
YY_RULE_SETUP
-#line 397 "cftoken.l"
+#line 397 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = FALSE; return(SWITCH); }
YY_BREAK
/* prefix */
case 207:
YY_RULE_SETUP
-#line 400 "cftoken.l"
+#line 400 "../../ipsec-tools/src/racoon/cftoken.l"
{
YYD;
- yytext++;
- yylval.num = atoi(yytext);
+ racoonyytext++;
+ yylval.num = atoi(racoonyytext);
return(PREFIX);
}
YY_BREAK
/* port number */
case 208:
YY_RULE_SETUP
-#line 408 "cftoken.l"
+#line 408 "../../ipsec-tools/src/racoon/cftoken.l"
{
- char *p = yytext;
+ char *p = racoonyytext;
YYD;
while (*++p != ']') ;
*p = 0;
- yytext++;
- yylval.num = atoi(yytext);
+ racoonyytext++;
+ yylval.num = atoi(racoonyytext);
return(PORT);
}
YY_BREAK
/* address range */
case 209:
YY_RULE_SETUP
-#line 419 "cftoken.l"
+#line 419 "../../ipsec-tools/src/racoon/cftoken.l"
{
YYD;
- yytext++;
- yylval.val = vmalloc(yyleng + 1);
+ racoonyytext++;
+ yylval.val = vmalloc(racoonyyleng + 1);
if (yylval.val == NULL) {
yyerror("vmalloc failed");
return -1;
}
- memcpy(yylval.val->v, yytext, yylval.val->l);
+ memcpy(yylval.val->v, racoonyytext, yylval.val->l);
return(ADDRRANGE);
}
YY_BREAK
/* upper protocol */
case 210:
YY_RULE_SETUP
-#line 432 "cftoken.l"
+#line 432 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_ESP; return(UL_PROTO); }
YY_BREAK
case 211:
YY_RULE_SETUP
-#line 433 "cftoken.l"
+#line 433 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_AH; return(UL_PROTO); }
YY_BREAK
case 212:
YY_RULE_SETUP
-#line 434 "cftoken.l"
+#line 434 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_IPCOMP; return(UL_PROTO); }
YY_BREAK
case 213:
YY_RULE_SETUP
-#line 435 "cftoken.l"
+#line 435 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_ICMP; return(UL_PROTO); }
YY_BREAK
case 214:
YY_RULE_SETUP
-#line 436 "cftoken.l"
+#line 436 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_ICMPV6; return(UL_PROTO); }
YY_BREAK
case 215:
YY_RULE_SETUP
-#line 437 "cftoken.l"
+#line 437 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_TCP; return(UL_PROTO); }
YY_BREAK
case 216:
YY_RULE_SETUP
-#line 438 "cftoken.l"
+#line 438 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_UDP; return(UL_PROTO); }
YY_BREAK
case 217:
YY_RULE_SETUP
-#line 439 "cftoken.l"
+#line 439 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IPPROTO_GRE; return(UL_PROTO); }
YY_BREAK
/* algorithm type */
case 218:
YY_RULE_SETUP
-#line 442 "cftoken.l"
+#line 442 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_des_iv64; return(ALGORITHMTYPE); }
YY_BREAK
case 219:
YY_RULE_SETUP
-#line 443 "cftoken.l"
+#line 443 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_des; return(ALGORITHMTYPE); }
YY_BREAK
case 220:
YY_RULE_SETUP
-#line 444 "cftoken.l"
+#line 444 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_3des; return(ALGORITHMTYPE); }
YY_BREAK
case 221:
YY_RULE_SETUP
-#line 445 "cftoken.l"
+#line 445 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_rc5; return(ALGORITHMTYPE); }
YY_BREAK
case 222:
YY_RULE_SETUP
-#line 446 "cftoken.l"
+#line 446 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_idea; return(ALGORITHMTYPE); }
YY_BREAK
case 223:
YY_RULE_SETUP
-#line 447 "cftoken.l"
+#line 447 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_cast128; return(ALGORITHMTYPE); }
YY_BREAK
case 224:
YY_RULE_SETUP
-#line 448 "cftoken.l"
+#line 448 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_blowfish; return(ALGORITHMTYPE); }
YY_BREAK
case 225:
YY_RULE_SETUP
-#line 449 "cftoken.l"
+#line 449 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_3idea; return(ALGORITHMTYPE); }
YY_BREAK
case 226:
YY_RULE_SETUP
-#line 450 "cftoken.l"
+#line 450 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_des_iv32; return(ALGORITHMTYPE); }
YY_BREAK
case 227:
YY_RULE_SETUP
-#line 451 "cftoken.l"
+#line 451 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_rc4; return(ALGORITHMTYPE); }
YY_BREAK
case 228:
YY_RULE_SETUP
-#line 452 "cftoken.l"
+#line 452 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_null_enc; return(ALGORITHMTYPE); }
YY_BREAK
case 229:
YY_RULE_SETUP
-#line 453 "cftoken.l"
+#line 453 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_null_enc; return(ALGORITHMTYPE); }
YY_BREAK
case 230:
YY_RULE_SETUP
-#line 454 "cftoken.l"
+#line 454 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_aes; return(ALGORITHMTYPE); }
YY_BREAK
case 231:
YY_RULE_SETUP
-#line 455 "cftoken.l"
+#line 455 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_aes; return(ALGORITHMTYPE); }
YY_BREAK
case 232:
YY_RULE_SETUP
-#line 456 "cftoken.l"
+#line 456 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_twofish; return(ALGORITHMTYPE); }
YY_BREAK
case 233:
YY_RULE_SETUP
-#line 457 "cftoken.l"
+#line 457 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_camellia; return(ALGORITHMTYPE); }
YY_BREAK
case 234:
YY_RULE_SETUP
-#line 458 "cftoken.l"
+#line 458 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_non_auth; return(ALGORITHMTYPE); }
YY_BREAK
case 235:
YY_RULE_SETUP
-#line 459 "cftoken.l"
+#line 459 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_md5; return(ALGORITHMTYPE); }
YY_BREAK
case 236:
YY_RULE_SETUP
-#line 460 "cftoken.l"
+#line 460 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha1; return(ALGORITHMTYPE); }
YY_BREAK
case 237:
YY_RULE_SETUP
-#line 461 "cftoken.l"
+#line 461 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha2_256; return(ALGORITHMTYPE); }
YY_BREAK
case 238:
YY_RULE_SETUP
-#line 462 "cftoken.l"
+#line 462 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha2_256; return(ALGORITHMTYPE); }
YY_BREAK
case 239:
YY_RULE_SETUP
-#line 463 "cftoken.l"
+#line 463 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha2_384; return(ALGORITHMTYPE); }
YY_BREAK
case 240:
YY_RULE_SETUP
-#line 464 "cftoken.l"
+#line 464 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha2_384; return(ALGORITHMTYPE); }
YY_BREAK
case 241:
YY_RULE_SETUP
-#line 465 "cftoken.l"
+#line 465 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha2_512; return(ALGORITHMTYPE); }
YY_BREAK
case 242:
YY_RULE_SETUP
-#line 466 "cftoken.l"
+#line 466 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_hmac_sha2_512; return(ALGORITHMTYPE); }
YY_BREAK
case 243:
YY_RULE_SETUP
-#line 467 "cftoken.l"
+#line 467 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_des_mac; return(ALGORITHMTYPE); }
YY_BREAK
case 244:
YY_RULE_SETUP
-#line 468 "cftoken.l"
+#line 468 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_kpdk; return(ALGORITHMTYPE); }
YY_BREAK
case 245:
YY_RULE_SETUP
-#line 469 "cftoken.l"
+#line 469 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_md5; return(ALGORITHMTYPE); }
YY_BREAK
case 246:
YY_RULE_SETUP
-#line 470 "cftoken.l"
+#line 470 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha1; return(ALGORITHMTYPE); }
YY_BREAK
case 247:
YY_RULE_SETUP
-#line 471 "cftoken.l"
+#line 471 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_tiger; return(ALGORITHMTYPE); }
YY_BREAK
case 248:
YY_RULE_SETUP
-#line 472 "cftoken.l"
+#line 472 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha2_256; return(ALGORITHMTYPE); }
YY_BREAK
case 249:
YY_RULE_SETUP
-#line 473 "cftoken.l"
+#line 473 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha2_256; return(ALGORITHMTYPE); }
YY_BREAK
case 250:
YY_RULE_SETUP
-#line 474 "cftoken.l"
+#line 474 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha2_384; return(ALGORITHMTYPE); }
YY_BREAK
case 251:
YY_RULE_SETUP
-#line 475 "cftoken.l"
+#line 475 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha2_384; return(ALGORITHMTYPE); }
YY_BREAK
case 252:
YY_RULE_SETUP
-#line 476 "cftoken.l"
+#line 476 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha2_512; return(ALGORITHMTYPE); }
YY_BREAK
case 253:
YY_RULE_SETUP
-#line 477 "cftoken.l"
+#line 477 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_sha2_512; return(ALGORITHMTYPE); }
YY_BREAK
case 254:
YY_RULE_SETUP
-#line 478 "cftoken.l"
+#line 478 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_oui; return(ALGORITHMTYPE); }
YY_BREAK
case 255:
YY_RULE_SETUP
-#line 479 "cftoken.l"
+#line 479 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_deflate; return(ALGORITHMTYPE); }
YY_BREAK
case 256:
YY_RULE_SETUP
-#line 480 "cftoken.l"
+#line 480 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_lzs; return(ALGORITHMTYPE); }
YY_BREAK
case 257:
YY_RULE_SETUP
-#line 481 "cftoken.l"
+#line 481 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp768; return(ALGORITHMTYPE); }
YY_BREAK
case 258:
YY_RULE_SETUP
-#line 482 "cftoken.l"
+#line 482 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp1024; return(ALGORITHMTYPE); }
YY_BREAK
case 259:
YY_RULE_SETUP
-#line 483 "cftoken.l"
+#line 483 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp1536; return(ALGORITHMTYPE); }
YY_BREAK
case 260:
YY_RULE_SETUP
-#line 484 "cftoken.l"
+#line 484 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_ec2n155; return(ALGORITHMTYPE); }
YY_BREAK
case 261:
YY_RULE_SETUP
-#line 485 "cftoken.l"
+#line 485 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_ec2n185; return(ALGORITHMTYPE); }
YY_BREAK
case 262:
YY_RULE_SETUP
-#line 486 "cftoken.l"
+#line 486 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp2048; return(ALGORITHMTYPE); }
YY_BREAK
case 263:
YY_RULE_SETUP
-#line 487 "cftoken.l"
+#line 487 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp3072; return(ALGORITHMTYPE); }
YY_BREAK
case 264:
YY_RULE_SETUP
-#line 488 "cftoken.l"
+#line 488 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp4096; return(ALGORITHMTYPE); }
YY_BREAK
case 265:
YY_RULE_SETUP
-#line 489 "cftoken.l"
+#line 489 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp6144; return(ALGORITHMTYPE); }
YY_BREAK
case 266:
YY_RULE_SETUP
-#line 490 "cftoken.l"
+#line 490 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_modp8192; return(ALGORITHMTYPE); }
YY_BREAK
case 267:
YY_RULE_SETUP
-#line 491 "cftoken.l"
+#line 491 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_psk; return(ALGORITHMTYPE); }
YY_BREAK
case 268:
YY_RULE_SETUP
-#line 492 "cftoken.l"
+#line 492 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_rsasig; return(ALGORITHMTYPE); }
YY_BREAK
case 269:
YY_RULE_SETUP
-#line 493 "cftoken.l"
+#line 493 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_dsssig; return(ALGORITHMTYPE); }
YY_BREAK
case 270:
YY_RULE_SETUP
-#line 494 "cftoken.l"
+#line 494 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_rsaenc; return(ALGORITHMTYPE); }
YY_BREAK
case 271:
YY_RULE_SETUP
-#line 495 "cftoken.l"
+#line 495 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_rsarev; return(ALGORITHMTYPE); }
YY_BREAK
case 272:
YY_RULE_SETUP
-#line 496 "cftoken.l"
+#line 496 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = algtype_gssapikrb; return(ALGORITHMTYPE); }
YY_BREAK
case 273:
YY_RULE_SETUP
-#line 497 "cftoken.l"
+#line 497 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_hybrid_rsa_s; return(ALGORITHMTYPE);
@@ -3388,7 +3421,7 @@ YY_RULE_SETUP
YY_BREAK
case 274:
YY_RULE_SETUP
-#line 504 "cftoken.l"
+#line 504 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_hybrid_dss_s; return(ALGORITHMTYPE);
@@ -3399,7 +3432,7 @@ YY_RULE_SETUP
YY_BREAK
case 275:
YY_RULE_SETUP
-#line 511 "cftoken.l"
+#line 511 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_hybrid_rsa_c; return(ALGORITHMTYPE);
@@ -3410,7 +3443,7 @@ YY_RULE_SETUP
YY_BREAK
case 276:
YY_RULE_SETUP
-#line 518 "cftoken.l"
+#line 518 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_hybrid_dss_c; return(ALGORITHMTYPE);
@@ -3421,7 +3454,7 @@ YY_RULE_SETUP
YY_BREAK
case 277:
YY_RULE_SETUP
-#line 525 "cftoken.l"
+#line 525 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_xauth_psk_s; return(ALGORITHMTYPE);
@@ -3432,7 +3465,7 @@ YY_RULE_SETUP
YY_BREAK
case 278:
YY_RULE_SETUP
-#line 532 "cftoken.l"
+#line 532 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_xauth_psk_c; return(ALGORITHMTYPE);
@@ -3443,7 +3476,7 @@ YY_RULE_SETUP
YY_BREAK
case 279:
YY_RULE_SETUP
-#line 539 "cftoken.l"
+#line 539 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_xauth_rsa_s; return(ALGORITHMTYPE);
@@ -3454,7 +3487,7 @@ YY_RULE_SETUP
YY_BREAK
case 280:
YY_RULE_SETUP
-#line 546 "cftoken.l"
+#line 546 "../../ipsec-tools/src/racoon/cftoken.l"
{
#ifdef ENABLE_HYBRID
YYD; yylval.num = algtype_xauth_rsa_c; return(ALGORITHMTYPE);
@@ -3466,111 +3499,111 @@ YY_RULE_SETUP
/* identifier type */
case 281:
YY_RULE_SETUP
-#line 556 "cftoken.l"
+#line 556 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDTYPE_USERFQDN; return(IDENTIFIERTYPE); }
YY_BREAK
case 282:
YY_RULE_SETUP
-#line 557 "cftoken.l"
+#line 557 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDTYPE_FQDN; return(IDENTIFIERTYPE); }
YY_BREAK
case 283:
YY_RULE_SETUP
-#line 558 "cftoken.l"
+#line 558 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDTYPE_KEYID; return(IDENTIFIERTYPE); }
YY_BREAK
case 284:
YY_RULE_SETUP
-#line 559 "cftoken.l"
+#line 559 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDTYPE_ADDRESS; return(IDENTIFIERTYPE); }
YY_BREAK
case 285:
YY_RULE_SETUP
-#line 560 "cftoken.l"
+#line 560 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDTYPE_SUBNET; return(IDENTIFIERTYPE); }
YY_BREAK
case 286:
YY_RULE_SETUP
-#line 561 "cftoken.l"
+#line 561 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); }
YY_BREAK
/* identifier qualifier */
case 287:
YY_RULE_SETUP
-#line 564 "cftoken.l"
+#line 564 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDQUAL_TAG; return(IDENTIFIERQUAL); }
YY_BREAK
case 288:
YY_RULE_SETUP
-#line 565 "cftoken.l"
+#line 565 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = IDQUAL_FILE; return(IDENTIFIERQUAL); }
YY_BREAK
/* units */
case 289:
YY_RULE_SETUP
-#line 568 "cftoken.l"
+#line 568 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_BYTE); }
YY_BREAK
case 290:
YY_RULE_SETUP
-#line 569 "cftoken.l"
+#line 569 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_KBYTES); }
YY_BREAK
case 291:
YY_RULE_SETUP
-#line 570 "cftoken.l"
+#line 570 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_MBYTES); }
YY_BREAK
case 292:
YY_RULE_SETUP
-#line 571 "cftoken.l"
+#line 571 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_TBYTES); }
YY_BREAK
case 293:
YY_RULE_SETUP
-#line 572 "cftoken.l"
+#line 572 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_SEC); }
YY_BREAK
case 294:
YY_RULE_SETUP
-#line 573 "cftoken.l"
+#line 573 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_MIN); }
YY_BREAK
case 295:
YY_RULE_SETUP
-#line 574 "cftoken.l"
+#line 574 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; return(UNITTYPE_HOUR); }
YY_BREAK
/* boolean */
case 296:
YY_RULE_SETUP
-#line 577 "cftoken.l"
+#line 577 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = TRUE; return(BOOLEAN); }
YY_BREAK
case 297:
YY_RULE_SETUP
-#line 578 "cftoken.l"
+#line 578 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; yylval.num = FALSE; return(BOOLEAN); }
YY_BREAK
case 298:
YY_RULE_SETUP
-#line 580 "cftoken.l"
+#line 580 "../../ipsec-tools/src/racoon/cftoken.l"
{
char *bp;
YYD;
- yylval.num = strtoul(yytext, &bp, 10);
+ yylval.num = strtoul(racoonyytext, &bp, 10);
return(NUMBER);
}
YY_BREAK
case 299:
YY_RULE_SETUP
-#line 588 "cftoken.l"
+#line 588 "../../ipsec-tools/src/racoon/cftoken.l"
{
char *p;
YYD;
- yylval.val = vmalloc(yyleng + (yyleng & 1) + 1);
+ yylval.val = vmalloc(racoonyyleng + (racoonyyleng & 1) + 1);
if (yylval.val == NULL) {
yyerror("vmalloc failed");
return -1;
@@ -3581,9 +3614,9 @@ YY_RULE_SETUP
*p++ = 'x';
/* fixed string if length is odd. */
- if (yyleng & 1)
+ if (racoonyyleng & 1)
*p++ = '0';
- memcpy(p, &yytext[2], yyleng - 1);
+ memcpy(p, &racoonyytext[2], racoonyyleng - 1);
return(HEXSTRING);
}
@@ -3591,36 +3624,36 @@ YY_RULE_SETUP
case 300:
/* rule 300 can match eol */
YY_RULE_SETUP
-#line 610 "cftoken.l"
+#line 610 "../../ipsec-tools/src/racoon/cftoken.l"
{
- char *p = yytext;
+ char *p = racoonyytext;
YYD;
while (*++p != '"') ;
*p = '\0';
- yylval.val = vmalloc(yyleng - 1);
+ yylval.val = vmalloc(racoonyyleng - 1);
if (yylval.val == NULL) {
yyerror("vmalloc failed");
return -1;
}
- memcpy(yylval.val->v, &yytext[1], yylval.val->l);
+ memcpy(yylval.val->v, &racoonyytext[1], yylval.val->l);
return(QUOTEDSTRING);
}
YY_BREAK
case 301:
YY_RULE_SETUP
-#line 627 "cftoken.l"
+#line 627 "../../ipsec-tools/src/racoon/cftoken.l"
{
YYD;
- yylval.val = vmalloc(yyleng + 1);
+ yylval.val = vmalloc(racoonyyleng + 1);
if (yylval.val == NULL) {
yyerror("vmalloc failed");
return -1;
}
- memcpy(yylval.val->v, yytext, yylval.val->l);
+ memcpy(yylval.val->v, racoonyytext, yylval.val->l);
return(ADDRSTRING);
}
@@ -3645,9 +3678,9 @@ case YY_STATE_EOF(S_RMTS):
case YY_STATE_EOF(S_RMTP):
case YY_STATE_EOF(S_SA):
case YY_STATE_EOF(S_GSSENC):
-#line 640 "cftoken.l"
+#line 640 "../../ipsec-tools/src/racoon/cftoken.l"
{
- yy_delete_buffer(YY_CURRENT_BUFFER);
+ racoonyy_delete_buffer(YY_CURRENT_BUFFER);
fclose (incstack[incstackp].fp);
incstack[incstackp].fp = NULL;
racoon_free(incstack[incstackp].path);
@@ -3663,50 +3696,50 @@ case YY_STATE_EOF(S_GSSENC):
incstackp--;
goto nextfile;
}
- yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
+ racoonyy_switch_to_buffer(racoonyy_create_buffer(racoonyyin,YY_BUF_SIZE));
BEGIN(S_INI);
} else {
globfree(&incstack[incstackp].matches);
if (incstackp == 0)
yyterminate();
else
- yy_switch_to_buffer(incstack[incstackp].prevstate);
+ racoonyy_switch_to_buffer(incstack[incstackp].prevstate);
}
}
YY_BREAK
/* ... */
case 302:
YY_RULE_SETUP
-#line 669 "cftoken.l"
+#line 669 "../../ipsec-tools/src/racoon/cftoken.l"
{ ; }
YY_BREAK
case 303:
/* rule 303 can match eol */
YY_RULE_SETUP
-#line 670 "cftoken.l"
+#line 670 "../../ipsec-tools/src/racoon/cftoken.l"
{ incstack[incstackp].lineno++; }
YY_BREAK
case 304:
YY_RULE_SETUP
-#line 671 "cftoken.l"
+#line 671 "../../ipsec-tools/src/racoon/cftoken.l"
{ YYD; }
YY_BREAK
case 305:
YY_RULE_SETUP
-#line 672 "cftoken.l"
+#line 672 "../../ipsec-tools/src/racoon/cftoken.l"
{ return(EOS); }
YY_BREAK
case 306:
YY_RULE_SETUP
-#line 673 "cftoken.l"
+#line 673 "../../ipsec-tools/src/racoon/cftoken.l"
{ yymore(); }
YY_BREAK
case 307:
YY_RULE_SETUP
-#line 675 "cftoken.l"
+#line 675 "../../ipsec-tools/src/racoon/cftoken.l"
ECHO;
YY_BREAK
-#line 3710 "cftoken.c"
+#line 3743 "<stdout>"
case YY_END_OF_BUFFER:
{
@@ -3721,15 +3754,15 @@ ECHO;
{
/* 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
+ * just pointed racoonyyin at a new source and called
+ * racoonyylex(). 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_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = racoonyyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -3782,11 +3815,11 @@ ECHO;
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( racoonyywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * yytext, we can now set up
+ * racoonyytext, 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
@@ -3835,7 +3868,7 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of yylex */
+} /* end of racoonyylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -3846,9 +3879,9 @@ ECHO;
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -3913,7 +3946,7 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ racoonyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -3945,7 +3978,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ racoonyyrestart(racoonyyin );
}
else
@@ -3962,7 +3995,7 @@ static int yy_get_next_buffer (void)
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) racoonyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
@@ -3980,14 +4013,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ 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);
+ 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;
@@ -4012,10 +4045,10 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -4033,22 +4066,23 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
+#ifndef YY_NO_UNPUT
+ static void yyunput (int c, char * yy_bp )
{
- register char *yy_cp;
+ char *yy_cp;
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up yytext */
+ /* undo effects of setting up racoonyytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ yy_size_t number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -4069,6 +4103,7 @@ static int yy_get_next_buffer (void)
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
+#endif /* ifndef YY_NO_UNPUT */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
@@ -4111,13 +4146,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ racoonyyrestart(racoonyyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( racoonyywrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -4137,7 +4172,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ *(yy_c_buf_p) = '\0'; /* preserve racoonyytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -4149,32 +4184,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file )
+ void racoonyyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+ racoonyyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ racoonyy_create_buffer(racoonyyin,YY_BUF_SIZE );
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
+ racoonyy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ racoonyy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void racoonyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
+ * racoonyypop_buffer_state();
+ * racoonyypush_buffer_state(new_buffer);
*/
- yyensure_buffer_stack ();
+ racoonyyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -4187,21 +4222,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ racoonyy_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
+ * EOF (racoonyywrap()) processing, but the only time this flag
+ * is looked at is after racoonyywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void yy_load_buffer_state (void)
+static void racoonyy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ racoonyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -4211,35 +4246,35 @@ static void yy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE racoonyy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) racoonyyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonyy_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 *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) racoonyyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonyy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ racoonyy_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with racoonyy_create_buffer()
*
*/
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ void racoonyy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -4249,27 +4284,27 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ racoonyyfree((void *) b->yy_ch_buf );
- yyfree((void *) b );
+ racoonyyfree((void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a racoonyyrestart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void racoonyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- yy_flush_buffer(b );
+ racoonyy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then racoonyy_init_buffer was _probably_
+ * called from racoonyyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -4286,7 +4321,7 @@ static void yy_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ void racoonyy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -4306,7 +4341,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ racoonyy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -4315,14 +4350,14 @@ static void yy_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void racoonyypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- yyensure_buffer_stack();
+ racoonyyensure_buffer_stack();
- /* This block is copied from yy_switch_to_buffer. */
+ /* This block is copied from racoonyy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -4336,8 +4371,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ /* copied from racoonyy_switch_to_buffer. */
+ racoonyy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -4345,18 +4380,18 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void yypop_buffer_state (void)
+void racoonyypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ racoonyy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
+ racoonyy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -4364,7 +4399,7 @@ void yypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void yyensure_buffer_stack (void)
+static void racoonyyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
@@ -4375,11 +4410,11 @@ static void yyensure_buffer_stack (void)
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)racoonyyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonyyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -4394,12 +4429,12 @@ static void yyensure_buffer_stack (void)
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)racoonyyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonyyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -4413,7 +4448,7 @@ static void yyensure_buffer_stack (void)
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE racoonyy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -4423,9 +4458,9 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) racoonyyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonyy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -4437,53 +4472,53 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ racoonyy_switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to racoonyylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
+ * racoonyy_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE racoonyy_scan_string (yyconst char * yystr )
{
- return yy_scan_bytes(yystr,strlen(yystr) );
+ return racoonyy_scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to racoonyylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE racoonyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) yyalloc(n );
+ buf = (char *) racoonyyalloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonyy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer(buf,n );
+ b = racoonyy_scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in racoonyy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -4509,14 +4544,14 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up racoonyytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ racoonyytext[racoonyyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = racoonyytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
+ racoonyyleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -4525,85 +4560,85 @@ static void yy_fatal_error (yyconst char* msg )
/** Get the current line number.
*
*/
-int yyget_lineno (void)
+int racoonyyget_lineno (void)
{
- return yylineno;
+ return racoonyylineno;
}
/** Get the input stream.
*
*/
-FILE *yyget_in (void)
+FILE *racoonyyget_in (void)
{
- return yyin;
+ return racoonyyin;
}
/** Get the output stream.
*
*/
-FILE *yyget_out (void)
+FILE *racoonyyget_out (void)
{
- return yyout;
+ return racoonyyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t yyget_leng (void)
+yy_size_t racoonyyget_leng (void)
{
- return yyleng;
+ return racoonyyleng;
}
/** Get the current token.
*
*/
-char *yyget_text (void)
+char *racoonyyget_text (void)
{
- return yytext;
+ return racoonyytext;
}
/** Set the current line number.
* @param line_number
*
*/
-void yyset_lineno (int line_number )
+void racoonyyset_lineno (int line_number )
{
- yylineno = line_number;
+ racoonyylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
- * @see yy_switch_to_buffer
+ * @see racoonyy_switch_to_buffer
*/
-void yyset_in (FILE * in_str )
+void racoonyyset_in (FILE * in_str )
{
- yyin = in_str ;
+ racoonyyin = in_str ;
}
-void yyset_out (FILE * out_str )
+void racoonyyset_out (FILE * out_str )
{
- yyout = out_str ;
+ racoonyyout = out_str ;
}
-int yyget_debug (void)
+int racoonyyget_debug (void)
{
- return yy_flex_debug;
+ return racoonyy_flex_debug;
}
-void yyset_debug (int bdebug )
+void racoonyyset_debug (int bdebug )
{
- yy_flex_debug = bdebug ;
+ racoonyy_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from yylex_destroy(), so don't allocate here.
+ * This function is called from racoonyylex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
@@ -4615,36 +4650,36 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ racoonyyin = stdin;
+ racoonyyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ racoonyyin = (FILE *) 0;
+ racoonyyout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * yylex_init()
+ * racoonyylex_init()
*/
return 0;
}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
+/* racoonyylex_destroy is for both reentrant and non-reentrant scanners. */
+int racoonyylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ racoonyy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
+ racoonyypop_buffer_state();
}
/* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
+ racoonyyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * yylex() is called, initialization will occur. */
+ * racoonyylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -4657,7 +4692,7 @@ int yylex_destroy (void)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -4666,7 +4701,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -4674,12 +4709,12 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+void *racoonyyalloc (yy_size_t size )
{
return (void *) malloc( size );
}
-void *yyrealloc (void * ptr, yy_size_t size )
+void *racoonyyrealloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
@@ -4691,14 +4726,14 @@ void *yyrealloc (void * ptr, yy_size_t size )
return (void *) realloc( (char *) ptr, size );
}
-void yyfree (void * ptr )
+void racoonyyfree (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see racoonyyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 675 "cftoken.l"
+#line 675 "../../ipsec-tools/src/racoon/cftoken.l"
@@ -4715,7 +4750,7 @@ yyerror(char *s, ...)
#endif
snprintf(fmt, sizeof(fmt), "%s:%d: \"%s\" %s\n",
incstack[incstackp].path, incstack[incstackp].lineno,
- yytext, s);
+ racoonyytext, s);
plogv(LLV_ERROR, LOCATION, NULL, fmt, ap);
va_end(ap);
@@ -4735,7 +4770,7 @@ yywarn(char *s, ...)
#endif
snprintf(fmt, sizeof(fmt), "%s:%d: \"%s\" %s\n",
incstack[incstackp].path, incstack[incstackp].lineno,
- yytext, s);
+ racoonyytext, s);
plogv(LLV_WARNING, LOCATION, NULL, fmt, ap);
va_end(ap);
}
@@ -4775,7 +4810,7 @@ yycf_switch_buffer(path)
goto nextmatch;
}
- yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
+ racoonyy_switch_to_buffer(racoonyy_create_buffer(racoonyyin,YY_BUF_SIZE));
BEGIN(S_INI);
@@ -4786,8 +4821,8 @@ int
yycf_set_buffer(path)
char *path;
{
- yyin = fopen(path, "r");
- if (yyin == NULL) {
+ racoonyyin = fopen(path, "r");
+ if (racoonyyin == NULL) {
fprintf(stderr, "failed to open file %s (%s)\n",
path, strerror(errno));
plog(LLV_ERROR, LOCATION, NULL,
@@ -4797,7 +4832,7 @@ yycf_set_buffer(path)
}
/* initialize */
- incstack[incstackp].fp = yyin;
+ incstack[incstackp].fp = racoonyyin;
if (incstack[incstackp].path != NULL)
racoon_free(incstack[incstackp].path);
incstack[incstackp].path = racoon_strdup(path);
@@ -4833,4 +4868,3 @@ yycf_clean_buffer()
}
}
-
diff --git a/ipsec-tools/src/racoon/cftoken_proto.h b/ipsec-tools/src/racoon/cftoken_proto.h
index 41cb939d..26d1d4d5 100644
--- a/ipsec-tools/src/racoon/cftoken_proto.h
+++ b/ipsec-tools/src/racoon/cftoken_proto.h
@@ -34,6 +34,19 @@
#ifndef _CFTOKEN_PROTO_H
#define _CFTOKEN_PROTO_H
+#ifdef __rtems__
+#define yylval racoonyylval
+#define yyerror racoonyyerror
+#define yywrap racoonyywrap
+/*
+ * No idea where yywrap is defined for racoon on FreeBSD but after compilation it
+ * just is implemented as a function that always returns 1.
+ */
+static inline int yywrap()
+{
+ return 1;
+}
+#endif /* __rtems__ */
extern int yyerrorcount;
extern int yylex __P((void));
diff --git a/ipsec-tools/src/racoon/cftoken_wrapper.c b/ipsec-tools/src/racoon/cftoken_wrapper.c
new file mode 100644
index 00000000..2816fdf6
--- /dev/null
+++ b/ipsec-tools/src/racoon/cftoken_wrapper.c
@@ -0,0 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#include "cftoken.c"
+#include "rtems-bsd-racoon-cftoken_wrapper-data.h"
diff --git a/ipsec-tools/src/racoon/config.h b/ipsec-tools/src/racoon/config.h
new file mode 100644
index 00000000..f97325b7
--- /dev/null
+++ b/ipsec-tools/src/racoon/config.h
@@ -0,0 +1 @@
+#include "../config.h"
diff --git a/ipsec-tools/src/racoon/crypto_openssl.c b/ipsec-tools/src/racoon/crypto_openssl.c
index 55b076a3..2d140fdf 100644
--- a/ipsec-tools/src/racoon/crypto_openssl.c
+++ b/ipsec-tools/src/racoon/crypto_openssl.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: crypto_openssl.c,v 1.20.4.3 2012/12/24 14:50:39 tteras Exp $ */
/* Id: crypto_openssl.c,v 1.47 2006/05/06 20:42:09 manubsd Exp */
@@ -86,7 +92,14 @@
#ifdef HAVE_OPENSSL_SHA2_H
#include <openssl/sha2.h>
#else
+#ifndef __rtems__
#include "crypto/sha2/sha2.h"
+#else /* __rtems__ */
+#define SHA384_Init _bsd_SHA384_Init
+#define SHA384_Update _bsd_SHA384_Update
+#define SHA384_Final _bsd_SHA384_Final
+#include <openssl/sha2/sha384.h>
+#endif /* __rtems__ */
#endif
#endif
#include "plog.h"
@@ -2584,3 +2597,6 @@ eay_version()
{
return SSLeay_version(SSLEAY_VERSION);
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-crypto_openssl-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/dnssec.c b/ipsec-tools/src/racoon/dnssec.c
index d52a243f..92b7e72e 100644
--- a/ipsec-tools/src/racoon/dnssec.c
+++ b/ipsec-tools/src/racoon/dnssec.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: dnssec.c,v 1.5 2009/03/12 10:57:26 tteras Exp $ */
/* $KAME: dnssec.c,v 1.2 2001/08/05 18:46:07 itojun Exp $ */
@@ -135,3 +141,6 @@ err:
freecertinfo(res);
return cert;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-dnssec-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/eaytest.c b/ipsec-tools/src/racoon/eaytest.c
index 1474bdcb..bf5cf613 100644
--- a/ipsec-tools/src/racoon/eaytest.c
+++ b/ipsec-tools/src/racoon/eaytest.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: eaytest.c,v 1.10 2010/01/17 23:02:48 wiz Exp $ */
/* Id: eaytest.c,v 1.22 2005/06/19 18:02:54 manubsd Exp */
diff --git a/ipsec-tools/src/racoon/evt.c b/ipsec-tools/src/racoon/evt.c
index 11d96954..f1196662 100644
--- a/ipsec-tools/src/racoon/evt.c
+++ b/ipsec-tools/src/racoon/evt.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: evt.c,v 1.10 2010/10/21 06:15:28 tteras Exp $ */
/* Id: evt.c,v 1.5 2006/06/22 20:11:35 manubsd Exp */
@@ -397,3 +403,6 @@ evt_list_cleanup(list)
}
#endif /* ENABLE_ADMINPORT */
+#ifdef __rtems__
+#include "rtems-bsd-racoon-evt-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/genlist.c b/ipsec-tools/src/racoon/genlist.c
index b5204c00..a6965ce4 100644
--- a/ipsec-tools/src/racoon/genlist.c
+++ b/ipsec-tools/src/racoon/genlist.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: genlist.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* Id: genlist.c,v 1.2 2004/07/12 20:43:50 ludvigm Exp */
@@ -172,3 +178,6 @@ int main()
return 0;
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-genlist-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/getcertsbyname.c b/ipsec-tools/src/racoon/getcertsbyname.c
index 1ce7c62e..050997d6 100644
--- a/ipsec-tools/src/racoon/getcertsbyname.c
+++ b/ipsec-tools/src/racoon/getcertsbyname.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: getcertsbyname.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $KAME: getcertsbyname.c,v 1.7 2001/11/16 04:12:59 sakane Exp $ */
@@ -416,3 +422,6 @@ main(ac, av)
exit(0);
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-getcertsbyname-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/grabmyaddr.c b/ipsec-tools/src/racoon/grabmyaddr.c
index 467a4876..d3203a33 100644
--- a/ipsec-tools/src/racoon/grabmyaddr.c
+++ b/ipsec-tools/src/racoon/grabmyaddr.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: grabmyaddr.c,v 1.28.2.2 2013/04/12 09:53:52 tteras Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -879,3 +885,6 @@ kernel_sync()
#error No supported interface to monitor local addresses.
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-grabmyaddr-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/gssapi.c b/ipsec-tools/src/racoon/gssapi.c
index 7edcf4f6..85cc243a 100644
--- a/ipsec-tools/src/racoon/gssapi.c
+++ b/ipsec-tools/src/racoon/gssapi.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: gssapi.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $KAME: gssapi.c,v 1.19 2001/04/03 15:51:55 thorpej Exp $ */
@@ -752,3 +758,6 @@ gssapi_get_id(struct ph1handle *iph1)
#else
int __gssapi_dUmMy;
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-gssapi-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/handler.c b/ipsec-tools/src/racoon/handler.c
index 9d456b78..83cdddcb 100644
--- a/ipsec-tools/src/racoon/handler.c
+++ b/ipsec-tools/src/racoon/handler.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: handler.c,v 1.39.2.1 2011/11/17 14:46:31 vanhu Exp $ */
/* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */
@@ -1581,3 +1587,6 @@ purgeph1bylogin(login)
return found;
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-handler-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/ipsec_doi.c b/ipsec-tools/src/racoon/ipsec_doi.c
index 84a4c715..7d83a2cc 100644
--- a/ipsec-tools/src/racoon/ipsec_doi.c
+++ b/ipsec-tools/src/racoon/ipsec_doi.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: ipsec_doi.c,v 1.46.4.1 2013/06/18 05:40:36 tteras Exp $ */
/* Id: ipsec_doi.c,v 1.55 2006/08/17 09:20:41 vanhu Exp */
@@ -4794,3 +4800,6 @@ doi2idtype(doi)
}
/*NOTREACHED*/
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-ipsec_doi-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp.c b/ipsec-tools/src/racoon/isakmp.c
index f9291c86..f4f1cce2 100644
--- a/ipsec-tools/src/racoon/isakmp.c
+++ b/ipsec-tools/src/racoon/isakmp.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp.c,v 1.71.2.2 2012/08/29 08:55:26 tteras Exp $ */
/* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */
@@ -3698,3 +3704,6 @@ setscopeid(sp_addr0, sa_addr0)
return 0;
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_agg.c b/ipsec-tools/src/racoon/isakmp_agg.c
index 2e387fb5..27a1f0c9 100644
--- a/ipsec-tools/src/racoon/isakmp_agg.c
+++ b/ipsec-tools/src/racoon/isakmp_agg.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_agg.c,v 1.16 2009/09/18 10:31:11 tteras Exp $ */
/* Id: isakmp_agg.c,v 1.28 2006/04/06 16:46:08 manubsd Exp */
@@ -1449,3 +1455,6 @@ agg_r2send(iph1, msg)
end:
return error;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_agg-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_base.c b/ipsec-tools/src/racoon/isakmp_base.c
index f37d51e0..a8fe30a7 100644
--- a/ipsec-tools/src/racoon/isakmp_base.c
+++ b/ipsec-tools/src/racoon/isakmp_base.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_base.c,v 1.12 2009/03/12 10:57:26 tteras Exp $ */
/* $KAME: isakmp_base.c,v 1.49 2003/11/13 02:30:20 sakane Exp $ */
@@ -1392,3 +1398,6 @@ end:
vfree(vid);
return error;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_base-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_cfg.c b/ipsec-tools/src/racoon/isakmp_cfg.c
index 660a32fe..3aee9aa7 100644
--- a/ipsec-tools/src/racoon/isakmp_cfg.c
+++ b/ipsec-tools/src/racoon/isakmp_cfg.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: isakmp_cfg.c,v 1.24.4.1 2013/04/12 10:04:21 tteras Exp $ */
/* Id: isakmp_cfg.c,v 1.55 2006/08/22 18:17:17 manubsd Exp */
diff --git a/ipsec-tools/src/racoon/isakmp_frag.c b/ipsec-tools/src/racoon/isakmp_frag.c
index 868ac943..3ae464a5 100644
--- a/ipsec-tools/src/racoon/isakmp_frag.c
+++ b/ipsec-tools/src/racoon/isakmp_frag.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_frag.c,v 1.7 2017/07/23 05:40:27 christos Exp $ */
/* Id: isakmp_frag.c,v 1.4 2004/11/13 17:31:36 manubsd Exp */
@@ -390,3 +396,6 @@ isakmp_frag_addcap(buf, cap)
return buf;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_frag-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_ident.c b/ipsec-tools/src/racoon/isakmp_ident.c
index a9c3a012..47d91def 100644
--- a/ipsec-tools/src/racoon/isakmp_ident.c
+++ b/ipsec-tools/src/racoon/isakmp_ident.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_ident.c,v 1.13 2009/09/18 10:31:11 tteras Exp $ */
/* Id: isakmp_ident.c,v 1.21 2006/04/06 16:46:08 manubsd Exp */
@@ -1898,3 +1904,6 @@ ident_recv_n(iph1, gen)
return 0;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_ident-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_inf.c b/ipsec-tools/src/racoon/isakmp_inf.c
index b81d460a..67720b1a 100644
--- a/ipsec-tools/src/racoon/isakmp_inf.c
+++ b/ipsec-tools/src/racoon/isakmp_inf.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_inf.c,v 1.47.2.3 2013/04/12 09:53:52 tteras Exp $ */
/* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
@@ -1604,3 +1610,6 @@ isakmp_sched_r_u(iph1, retry)
return 0;
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_inf-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_newg.c b/ipsec-tools/src/racoon/isakmp_newg.c
index 211e632e..61591952 100644
--- a/ipsec-tools/src/racoon/isakmp_newg.c
+++ b/ipsec-tools/src/racoon/isakmp_newg.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_newg.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $KAME: isakmp_newg.c,v 1.10 2002/09/27 05:55:52 itojun Exp $ */
@@ -230,3 +236,6 @@ end:
return 0;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_newg-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_quick.c b/ipsec-tools/src/racoon/isakmp_quick.c
index 77d126dd..ed291b87 100644
--- a/ipsec-tools/src/racoon/isakmp_quick.c
+++ b/ipsec-tools/src/racoon/isakmp_quick.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: isakmp_quick.c,v 1.29 2011/03/14 17:18:13 tteras Exp $ */
/* Id: isakmp_quick.c,v 1.29 2006/08/22 18:17:17 manubsd Exp */
@@ -2629,3 +2635,6 @@ ph2_recv_n(iph2, gen)
return 0;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-isakmp_quick-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/isakmp_unity.c b/ipsec-tools/src/racoon/isakmp_unity.c
index 440dc671..36ae0f47 100644
--- a/ipsec-tools/src/racoon/isakmp_unity.c
+++ b/ipsec-tools/src/racoon/isakmp_unity.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: isakmp_unity.c,v 1.9.18.1 2012/01/01 17:32:04 tteras Exp $ */
/* Id: isakmp_unity.c,v 1.10 2006/07/31 04:49:23 manubsd Exp */
diff --git a/ipsec-tools/src/racoon/isakmp_xauth.c b/ipsec-tools/src/racoon/isakmp_xauth.c
index 94c72d6d..5868e195 100644
--- a/ipsec-tools/src/racoon/isakmp_xauth.c
+++ b/ipsec-tools/src/racoon/isakmp_xauth.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: isakmp_xauth.c,v 1.22.2.1 2013/02/05 06:23:42 tteras Exp $ */
/* Id: isakmp_xauth.c,v 1.38 2006/08/22 18:17:17 manubsd Exp */
diff --git a/ipsec-tools/src/racoon/kmpstat.c b/ipsec-tools/src/racoon/kmpstat.c
index 50c478dd..93845b99 100644
--- a/ipsec-tools/src/racoon/kmpstat.c
+++ b/ipsec-tools/src/racoon/kmpstat.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: kmpstat.c,v 1.7 2010/11/12 09:08:26 tteras Exp $ */
/* $KAME: kmpstat.c,v 1.33 2004/08/16 08:20:28 itojun Exp $ */
diff --git a/ipsec-tools/src/racoon/localconf.c b/ipsec-tools/src/racoon/localconf.c
index f38ee285..cff57a96 100644
--- a/ipsec-tools/src/racoon/localconf.c
+++ b/ipsec-tools/src/racoon/localconf.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: localconf.c,v 1.7 2008/12/23 14:04:42 tteras Exp $ */
/* $KAME: localconf.c,v 1.33 2001/08/09 07:32:19 sakane Exp $ */
@@ -357,3 +363,6 @@ save_params()
{
saverestore_params(0);
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-localconf-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/logger.c b/ipsec-tools/src/racoon/logger.c
index 06991cc5..7309e8fb 100644
--- a/ipsec-tools/src/racoon/logger.c
+++ b/ipsec-tools/src/racoon/logger.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: logger.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $KAME: logger.c,v 1.9 2002/09/03 14:37:03 itojun Exp $ */
@@ -260,3 +266,6 @@ main(argc, argv)
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-logger-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/main.c b/ipsec-tools/src/racoon/main.c
index 8936204e..43975a85 100644
--- a/ipsec-tools/src/racoon/main.c
+++ b/ipsec-tools/src/racoon/main.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: main.c,v 1.12.6.1 2013/07/12 13:12:24 tteras Exp $ */
/* Id: main.c,v 1.25 2006/06/20 20:31:34 manubsd Exp */
@@ -31,6 +37,14 @@
* SUCH DAMAGE.
*/
+#ifdef __rtems__
+#include <rtems.h>
+#define __need_getopt_newlib
+#include <getopt.h>
+#include <machine/rtems-bsd-commands.h>
+#include <machine/rtems-bsd-racoon.h>
+#include <rtems/linkersets.h>
+#endif /* __rtems__ */
#include "config.h"
#include <sys/types.h>
@@ -172,6 +186,15 @@ parse(ac, av)
#ifdef YYDEBUG
extern int yydebug;
#endif
+#ifdef __rtems__
+ struct getopt_data getopt_data;
+ memset(&getopt_data, 0, sizeof(getopt_data));
+#define optind getopt_data.optind
+#define optarg getopt_data.optarg
+#define opterr getopt_data.opterr
+#define optopt getopt_data.optopt
+#define getopt(argc, argv, opt) getopt_r(argc, argv, "+" opt, &getopt_data)
+#endif /* __rtems__ */
pname = strrchr(*av, '/');
if (pname)
@@ -263,6 +286,30 @@ parse(ac, av)
}
}
+#ifdef __rtems__
+static int
+main(int argc, char **argv);
+
+RTEMS_LINKER_RWSET(bsd_prog_racoon, char);
+
+int rtems_bsd_command_racoon(int argc, char **argv)
+{
+ int exit_code;
+ void *data_begin;
+ size_t data_size;
+
+ data_begin = RTEMS_LINKER_SET_BEGIN(bsd_prog_racoon);
+ data_size = RTEMS_LINKER_SET_SIZE(bsd_prog_racoon);
+
+ rtems_bsd_racoon_lock();
+ exit_code = rtems_bsd_program_call_main_with_data_restore("racoon",
+ main, argc, argv, data_begin, data_size);
+ rtems_bsd_racoon_unlock();
+
+ return exit_code;
+}
+
+#endif /* __rtems__ */
int
main(ac, av)
int ac;
@@ -321,9 +368,15 @@ main(ac, av)
"SA recovering.");
}
+#ifdef __rtems__
+ /* FIXME: RTEMS currently does not support daemon mode. */
+ f_foreground = 1;
+ plog(LLV_INFO, LOCATION, NULL, "RTEMS: Force foreground mode.\n");
+#endif /* __rtems__ */
if (f_foreground)
close(0);
else {
+#ifndef __rtems__
if (daemon(0, 0) < 0) {
errx(1, "failed to be daemon. (%s)",
strerror(errno));
@@ -340,6 +393,9 @@ main(ac, av)
/* no big deal if it fails.. */
}
#endif
+#else /* __rtems__ */
+ errx(1, "Daemon mode currently not supported in RTEMS.");
+#endif /* __rtems__ */
}
session();
@@ -347,3 +403,6 @@ main(ac, av)
return 0;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-main-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/misc.c b/ipsec-tools/src/racoon/misc.c
index 91b8e772..9b9af2a0 100644
--- a/ipsec-tools/src/racoon/misc.c
+++ b/ipsec-tools/src/racoon/misc.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: misc.c,v 1.6 2008/07/15 00:47:09 mgrooms Exp $ */
/* $KAME: misc.c,v 1.23 2001/08/16 14:37:29 itojun Exp $ */
@@ -180,3 +186,6 @@ timedelta(t1, t2)
return t2->tv_sec - t1->tv_sec - 1 +
(double)(1000000 + t2->tv_usec - t1->tv_usec) / 1000000;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-misc-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.c b/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.c
index 7e48d44b..7fb1ec5e 100644
--- a/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.c
+++ b/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-alg-fst.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: rijndael-alg-fst.c,v 1.4 2006/09/09 16:22:36 manu Exp $ */
/* $KAME: rijndael-alg-fst.c,v 1.1.1.1 2001/08/08 09:56:23 sakane Exp $ */
diff --git a/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.c b/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.c
index 9b6f5fe0..03405fd0 100644
--- a/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.c
+++ b/ipsec-tools/src/racoon/missing/crypto/rijndael/rijndael-api-fst.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: rijndael-api-fst.c,v 1.4 2006/09/09 16:22:36 manu Exp $ */
/* $KAME: rijndael-api-fst.c,v 1.8 2002/11/18 23:32:54 itojun Exp $ */
diff --git a/ipsec-tools/src/racoon/missing/crypto/sha2/config.h b/ipsec-tools/src/racoon/missing/crypto/sha2/config.h
new file mode 100644
index 00000000..d50f0949
--- /dev/null
+++ b/ipsec-tools/src/racoon/missing/crypto/sha2/config.h
@@ -0,0 +1 @@
+#include "../../../config.h"
diff --git a/ipsec-tools/src/racoon/missing/crypto/sha2/sha2.c b/ipsec-tools/src/racoon/missing/crypto/sha2/sha2.c
index 099cdb89..fca879c6 100644
--- a/ipsec-tools/src/racoon/missing/crypto/sha2/sha2.c
+++ b/ipsec-tools/src/racoon/missing/crypto/sha2/sha2.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "../../../rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: sha2.c,v 1.4.40.1 2012/12/24 08:48:08 tteras Exp $ */
/* Id: sha2.c,v 1.6 2004/09/21 14:35:25 ludvigm Exp */
@@ -44,7 +50,22 @@
#ifndef __linux__
#include <machine/endian.h>
#endif
+#ifndef __rtems__
#include <crypto/sha2/sha2.h>
+#else /* __rtems__ */
+#define SHA256_Init _bsd_SHA256_Init
+#define SHA256_Update _bsd_SHA256_Update
+#define SHA256_Final _bsd_SHA256_Final
+#include <crypto/sha2/sha256.h>
+#define SHA384_Init _bsd_SHA384_Init
+#define SHA384_Update _bsd_SHA384_Update
+#define SHA384_Final _bsd_SHA384_Final
+#include <crypto/sha2/sha384.h>
+#define SHA512_Init _bsd_SHA512_Init
+#define SHA512_Update _bsd_SHA512_Update
+#define SHA512_Final _bsd_SHA512_Final
+#include <crypto/sha2/sha512.h>
+#endif /* __rtems__ */
#include <openssl/evp.h>
/* get openssl/ssleay version number */
@@ -58,6 +79,7 @@
#define HAVE_EVP_097
+#ifndef __rtems__
/*
* ASSERT NOTE:
* Some sanity checking code is included using assert(). On my FreeBSD
@@ -984,7 +1006,6 @@ char* SHA512_Data(const sha2_byte* data, size_t len, char digest[SHA512_DIGEST_S
return SHA512_End(&context, digest);
}
-
/*** SHA-384: *********************************************************/
void SHA384_Init(SHA384_CTX* context) {
if (context == (SHA384_CTX*)0) {
@@ -1059,6 +1080,8 @@ char* SHA384_Data(const sha2_byte* data, size_t len, char digest[SHA384_DIGEST_S
return SHA384_End(&context, digest);
}
+#endif /* __rtems__ */
+
/*glue*/
#ifdef HAVE_EVP_097
@@ -1197,3 +1220,7 @@ struct env_md_st *EVP_sha2_512(void)
{
return(&sha2_512_md);
}
+
+#ifdef __rtems__
+#include "../../../rtems-bsd-racoon-main-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/nattraversal.c b/ipsec-tools/src/racoon/nattraversal.c
index c36d26f8..ba68f384 100644
--- a/ipsec-tools/src/racoon/nattraversal.c
+++ b/ipsec-tools/src/racoon/nattraversal.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: nattraversal.c,v 1.14 2011/03/14 17:18:13 tteras Exp $ */
/*
@@ -548,3 +554,6 @@ isakmp_plist_append_natt_vids (struct payload_list *plist, vchar_t *vid_natt[MAX
return plist;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-nattraversal-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/oakley.c b/ipsec-tools/src/racoon/oakley.c
index cad68744..8138527f 100644
--- a/ipsec-tools/src/racoon/oakley.c
+++ b/ipsec-tools/src/racoon/oakley.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: oakley.c,v 1.22.2.2 2012/08/29 11:35:09 tteras Exp $ */
/* Id: oakley.c,v 1.32 2006/05/26 12:19:46 manubsd Exp */
@@ -3209,3 +3215,6 @@ oakley_padlen(len, base)
return padlen;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-oakley-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/package_version.h b/ipsec-tools/src/racoon/package_version.h
new file mode 100644
index 00000000..47218284
--- /dev/null
+++ b/ipsec-tools/src/racoon/package_version.h
@@ -0,0 +1,5 @@
+#define TOP_PACKAGE "ipsec-tools"
+#define TOP_PACKAGE_NAME "ipsec-tools"
+#define TOP_PACKAGE_VERSION "0.8.2"
+#define TOP_PACKAGE_STRING "ipsec-tools 0.8.2"
+#define TOP_PACKAGE_URL "http://ipsec-tools.sourceforge.net"
diff --git a/ipsec-tools/src/racoon/pfkey.c b/ipsec-tools/src/racoon/pfkey.c
index 68879992..7925d370 100644
--- a/ipsec-tools/src/racoon/pfkey.c
+++ b/ipsec-tools/src/racoon/pfkey.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: pfkey.c,v 1.57 2011/03/15 13:20:14 vanhu Exp $ */
/* $Id: pfkey.c,v 1.57 2011/03/15 13:20:14 vanhu Exp $ */
@@ -3993,3 +3999,6 @@ sadbsecas2str(src, dst, proto, spi, mode)
return buf;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-pfkey-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/plainrsa-gen.c b/ipsec-tools/src/racoon/plainrsa-gen.c
index cad1861b..929baf17 100644
--- a/ipsec-tools/src/racoon/plainrsa-gen.c
+++ b/ipsec-tools/src/racoon/plainrsa-gen.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: plainrsa-gen.c,v 1.6 2011/02/11 10:07:19 tteras Exp $ */
/* Id: plainrsa-gen.c,v 1.6 2005/04/21 09:08:40 monas Exp */
diff --git a/ipsec-tools/src/racoon/plog.c b/ipsec-tools/src/racoon/plog.c
index aebfed27..5de99b10 100644
--- a/ipsec-tools/src/racoon/plog.c
+++ b/ipsec-tools/src/racoon/plog.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: plog.c,v 1.7 2011/01/28 12:51:40 tteras Exp $ */
/* Id: plog.c,v 1.11 2006/06/20 09:57:31 vanhu Exp */
@@ -58,6 +64,9 @@
#endif
#include <ctype.h>
#include <err.h>
+#ifdef __rtems__
+#include <netinet/in.h>
+#endif /* __rtems__ */
#include "var.h"
#include "misc.h"
@@ -293,3 +302,6 @@ binsanitize(binstr, n)
return d;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-plog-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/policy.c b/ipsec-tools/src/racoon/policy.c
index 4c00677e..00f52078 100644
--- a/ipsec-tools/src/racoon/policy.c
+++ b/ipsec-tools/src/racoon/policy.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: policy.c,v 1.12 2011/03/14 17:18:13 tteras Exp $ */
/* $KAME: policy.c,v 1.46 2001/11/16 04:08:10 sakane Exp $ */
@@ -496,3 +502,6 @@ spidx2str(spidx)
#endif
return buf;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-policy-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/privsep.c b/ipsec-tools/src/racoon/privsep.c
index f222c406..8efdae84 100644
--- a/ipsec-tools/src/racoon/privsep.c
+++ b/ipsec-tools/src/racoon/privsep.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: privsep.c,v 1.21.2.1 2011/08/12 05:46:06 tteras Exp $ */
/* Id: privsep.c,v 1.15 2005/08/08 11:23:44 vanhu Exp */
@@ -311,9 +317,11 @@ privsep_init(void)
plog(LLV_INFO, LOCATION, NULL,
"racoon unprivileged process running with PID %d\n", child_pid);
+#ifndef __rtems__
#if defined(__NetBSD__) || defined(__FreeBSD__)
setproctitle("[priv]");
#endif
+#endif /* __rtems__ */
/*
* Don't catch any signal
@@ -1805,3 +1813,6 @@ privsep_cleanup_pam(port)
return;
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-privsep-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/proposal.c b/ipsec-tools/src/racoon/proposal.c
index 33dd3114..56fe469b 100644
--- a/ipsec-tools/src/racoon/proposal.c
+++ b/ipsec-tools/src/racoon/proposal.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: proposal.c,v 1.17 2008/09/19 11:14:49 tteras Exp $ */
/* $Id: proposal.c,v 1.17 2008/09/19 11:14:49 tteras Exp $ */
@@ -1288,3 +1294,6 @@ end:
free_proppair(pair);
return error;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-proposal-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/prsa_par.c b/ipsec-tools/src/racoon/prsa_par.c
index a9761455..9b9ef0d4 100644
--- a/ipsec-tools/src/racoon/prsa_par.c
+++ b/ipsec-tools/src/racoon/prsa_par.c
@@ -1,77 +1,103 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.6.2"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
+/* original parser id follows */
+/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
+/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
+
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define YYPATCH 20170201
+
+#define YYEMPTY (-1)
+#define yyclearin (yychar = YYEMPTY)
+#define yyerrok (yyerrflag = 0)
+#define YYRECOVERING() (yyerrflag != 0)
+#define YYENOMEM (-2)
+#define YYEOF 0
+
+#ifndef yyparse
+#define yyparse racoonprsaparse
+#endif /* yyparse */
+
+#ifndef yylex
+#define yylex racoonprsalex
+#endif /* yylex */
+
+#ifndef yyerror
+#define yyerror racoonprsaerror
+#endif /* yyerror */
+
+#ifndef yychar
+#define yychar racoonprsachar
+#endif /* yychar */
+
+#ifndef yyval
+#define yyval racoonprsaval
+#endif /* yyval */
+
+#ifndef yylval
+#define yylval racoonprsalval
+#endif /* yylval */
+
+#ifndef yydebug
+#define yydebug racoonprsadebug
+#endif /* yydebug */
+
+#ifndef yynerrs
+#define yynerrs racoonprsanerrs
+#endif /* yynerrs */
+
+#ifndef yyerrflag
+#define yyerrflag racoonprsaerrflag
+#endif /* yyerrflag */
+
+#ifndef yylhs
+#define yylhs racoonprsalhs
+#endif /* yylhs */
+
+#ifndef yylen
+#define yylen racoonprsalen
+#endif /* yylen */
+
+#ifndef yydefred
+#define yydefred racoonprsadefred
+#endif /* yydefred */
+
+#ifndef yydgoto
+#define yydgoto racoonprsadgoto
+#endif /* yydgoto */
+
+#ifndef yysindex
+#define yysindex racoonprsasindex
+#endif /* yysindex */
+
+#ifndef yyrindex
+#define yyrindex racoonprsarindex
+#endif /* yyrindex */
+
+#ifndef yygindex
+#define yygindex racoonprsagindex
+#endif /* yygindex */
+
+#ifndef yytable
+#define yytable racoonprsatable
+#endif /* yytable */
+
+#ifndef yycheck
+#define yycheck racoonprsacheck
+#endif /* yycheck */
+
+#ifndef yyname
+#define yyname racoonprsaname
+#endif /* yyname */
+
+#ifndef yyrule
+#define yyrule racoonprsarule
+#endif /* yyrule */
+#define YYPREFIX "racoonprsa"
-/* Substitute the variable and function names. */
-#define yyparse prsaparse
-#define yylex prsalex
-#define yyerror prsaerror
-#define yylval prsalval
-#define yychar prsachar
-#define yydebug prsadebug
-#define yynerrs prsanerrs
-
-/* Copy the first part of user declarations. */
-/* Line 336 of yacc.c */
-#line 5 "prsa_par.y"
+#define YYPURE 0
+#line 6 "../../ipsec-tools/src/racoon/prsa_par.y"
/*
* Copyright (C) 2004 SuSE Linux AG, Nuernberg, Germany.
* Contributed by: Michal Ludvig <mludvig@suse.cz>, SUSE Labs
@@ -139,6 +165,12 @@
#include "crypto_openssl.h"
#include "sockmisc.h"
#include "rsalist.h"
+#ifdef __rtems__
+#define prsaparse yyparse
+#define prsaerror yyerror
+#define prsain racoonprsain
+#define prsawrap racoonprsawrap
+#endif /* __rtems__ */
extern void prsaerror(const char *str, ...);
extern int prsawrap (void);
@@ -195,1409 +227,483 @@ prsawrap()
{
return 1;
}
-
-/* Line 336 of yacc.c */
-#line 201 "prsa_par.c"
-
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
-# else
-# define YY_NULL 0
-# endif
-# endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "y.tab.h". */
-#ifndef PRSA_Y_TAB_H
-# define PRSA_Y_TAB_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int prsadebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- COLON = 258,
- HEX = 259,
- OBRACE = 260,
- EBRACE = 261,
- TAG_RSA = 262,
- TAG_PUB = 263,
- TAG_PSK = 264,
- MODULUS = 265,
- PUBLIC_EXPONENT = 266,
- PRIVATE_EXPONENT = 267,
- PRIME1 = 268,
- PRIME2 = 269,
- EXPONENT1 = 270,
- EXPONENT2 = 271,
- COEFFICIENT = 272,
- ADDR4 = 273,
- ADDR6 = 274,
- ADDRANY = 275,
- SLASH = 276,
- NUMBER = 277,
- BASE64 = 278
- };
-#endif
-/* Tokens. */
-#define COLON 258
-#define HEX 259
-#define OBRACE 260
-#define EBRACE 261
-#define TAG_RSA 262
-#define TAG_PUB 263
-#define TAG_PSK 264
-#define MODULUS 265
-#define PUBLIC_EXPONENT 266
-#define PRIVATE_EXPONENT 267
-#define PRIME1 268
-#define PRIME2 269
-#define EXPONENT1 270
-#define EXPONENT2 271
-#define COEFFICIENT 272
-#define ADDR4 273
-#define ADDR6 274
-#define ADDRANY 275
-#define SLASH 276
-#define NUMBER 277
-#define BASE64 278
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 350 of yacc.c */
-#line 130 "prsa_par.y"
-
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+#endif
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+#line 136 "../../ipsec-tools/src/racoon/prsa_par.y"
+typedef union {
BIGNUM *bn;
RSA *rsa;
char *chr;
long num;
struct netaddr *naddr;
-
-
-/* Line 350 of yacc.c */
-#line 299 "prsa_par.c"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE prsalval;
+#endif /* !YYSTYPE_IS_DECLARED */
+#line 246 "racoonprsa.tab.c"
+/* compatibility with bison */
#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int prsaparse (void *YYPARSE_PARAM);
-#else
-int prsaparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int prsaparse (void);
-#else
-int prsaparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !PRSA_Y_TAB_H */
-
-/* Copy the second part of user declarations. */
-
-/* Line 353 of yacc.c */
-#line 327 "prsa_par.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+/* compatibility with FreeBSD */
+# ifdef YYPARSE_PARAM_TYPE
+# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
# else
-# define YYSIZE_T unsigned int
+# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
#else
-# define YYUSE(e) /* empty */
+# define YYPARSE_DECL() yyparse(void)
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+/* Parameters sent to lex. */
+#ifdef YYLEX_PARAM
+# define YYLEX_DECL() yylex(void *YYLEX_PARAM)
+# define YYLEX yylex(YYLEX_PARAM)
#else
-static int
-YYID (yyi)
- int yyi;
-#endif
-{
- return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
+# define YYLEX_DECL() yylex(void)
+# define YYLEX yylex()
+#endif
+
+/* Parameters sent to yyerror. */
+#ifndef YYERROR_DECL
+#define YYERROR_DECL() yyerror(const char *s)
+#endif
+#ifndef YYERROR_CALL
+#define YYERROR_CALL(msg) yyerror(msg)
+#endif
+
+extern int YYPARSE_DECL();
+
+#define COLON 257
+#define HEX 258
+#define OBRACE 259
+#define EBRACE 260
+#define TAG_RSA 261
+#define TAG_PUB 262
+#define TAG_PSK 263
+#define MODULUS 264
+#define PUBLIC_EXPONENT 265
+#define PRIVATE_EXPONENT 266
+#define PRIME1 267
+#define PRIME2 268
+#define EXPONENT1 269
+#define EXPONENT2 270
+#define COEFFICIENT 271
+#define ADDR4 272
+#define ADDR6 273
+#define ADDRANY 274
+#define SLASH 275
+#define NUMBER 276
+#define BASE64 277
+#define YYERRCODE 256
+typedef int YYINT;
+static const YYINT racoonprsalhs[] = { -1,
+ 0, 0, 6, 6, 6, 1, 1, 1, 5, 5,
+ 5, 3, 4, 2, 2, 7, 7, 8, 8, 8,
+ 8, 8, 8, 8, 8,
};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 16
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 60
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 24
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 10
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 26
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 55
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 278
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 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, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23
+static const YYINT racoonprsalen[] = { 2,
+ 2, 1, 4, 3, 2, 4, 2, 2, 1, 1,
+ 1, 2, 2, 0, 2, 2, 1, 3, 3, 3,
+ 3, 3, 3, 3, 3,
};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 6, 8, 13, 17, 20, 25, 28,
- 31, 33, 35, 37, 40, 43, 44, 47, 50, 52,
- 56, 60, 64, 68, 72, 76, 80
+static const YYINT racoonprsadefred[] = { 0,
+ 0, 0, 0, 11, 0, 9, 10, 0, 2, 0,
+ 0, 5, 0, 12, 13, 1, 0, 0, 0, 8,
+ 7, 15, 4, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 17, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6, 16, 18, 19, 20, 21, 22,
+ 23, 24, 25,
};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 25, 0, -1, 25, 26, -1, 26, -1, 28, 28,
- 3, 27, -1, 28, 3, 27, -1, 3, 27, -1,
- 7, 5, 32, 6, -1, 8, 23, -1, 8, 4,
- -1, 29, -1, 30, -1, 20, -1, 18, 31, -1,
- 19, 31, -1, -1, 21, 22, -1, 32, 33, -1,
- 33, -1, 10, 3, 4, -1, 11, 3, 4, -1,
- 12, 3, 4, -1, 13, 3, 4, -1, 14, 3,
- 4, -1, 15, 3, 4, -1, 16, 3, 4, -1,
- 17, 3, 4, -1
+static const YYINT racoonprsadgoto[] = { 5,
+ 12, 14, 6, 7, 8, 9, 33, 34,
};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 155, 155, 156, 160, 164, 168, 175, 207, 216,
- 227, 228, 229, 236, 265, 294, 295, 298, 299, 303,
- 305, 307, 309, 311, 313, 315, 317
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || 0
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "COLON", "HEX", "OBRACE", "EBRACE",
- "TAG_RSA", "TAG_PUB", "TAG_PSK", "MODULUS", "PUBLIC_EXPONENT",
- "PRIVATE_EXPONENT", "PRIME1", "PRIME2", "EXPONENT1", "EXPONENT2",
- "COEFFICIENT", "ADDR4", "ADDR6", "ADDRANY", "SLASH", "NUMBER", "BASE64",
- "$accept", "statements", "statement", "rsa_statement", "addr", "addr4",
- "addr6", "prefix", "params", "param", YY_NULL
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 24, 25, 25, 26, 26, 26, 27, 27, 27,
- 28, 28, 28, 29, 30, 31, 31, 32, 32, 33,
- 33, 33, 33, 33, 33, 33, 33
+static const YYINT racoonprsasindex[] = { -256,
+ -255, -272, -272, 0, -256, 0, 0, -252, 0, -248,
+ -258, 0, -266, 0, 0, 0, -255, -253, -226, 0,
+ 0, 0, 0, -255, -245, -244, -243, -242, -230, -229,
+ -228, -211, -234, 0, 0, -210, -209, -208, -207, -206,
+ -205, -204, -203, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,
};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 2, 1, 4, 3, 2, 4, 2, 2,
- 1, 1, 1, 2, 2, 0, 2, 2, 1, 3,
- 3, 3, 3, 3, 3, 3, 3
+static const YYINT racoonprsarindex[] = { 0,
+ 0, -249, -249, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,
};
-
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 0, 0, 15, 15, 12, 0, 3, 0, 10, 11,
- 0, 0, 6, 0, 13, 14, 1, 2, 0, 0,
- 0, 9, 8, 16, 5, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 18, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 7, 17, 19, 20, 21,
- 22, 23, 24, 25, 26
+static const YYINT racoonprsagindex[] = { 0,
+ -15, 44, 0, 0, 48, 52, 0, 25,
};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 5, 6, 12, 7, 8, 9, 14, 34, 35
+#define YYTABLESIZE 58
+static const YYINT racoonprsatable[] = { 20,
+ 1, 23, 13, 24, 17, 10, 11, 14, 35, 22,
+ 19, 36, 37, 38, 39, 2, 3, 4, 21, 2,
+ 3, 4, 14, 14, 14, 44, 40, 41, 42, 25,
+ 26, 27, 28, 29, 30, 31, 32, 25, 26, 27,
+ 28, 29, 30, 31, 32, 43, 15, 46, 47, 48,
+ 49, 50, 51, 52, 53, 18, 16, 45,
};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -18
-static const yytype_int8 yypact[] =
-{
- 4, -3, -15, -15, -18, 0, -18, 7, -18, -18,
- 6, -2, -18, -13, -18, -18, -18, -18, -3, 9,
- 30, -18, -18, -18, -18, -3, 10, 11, 12, 13,
- 14, 26, 27, 28, 22, -18, -18, 44, 45, 46,
- 47, 48, 49, 50, 51, -18, -18, -18, -18, -18,
- -18, -18, -18, -18, -18
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
-{
- -18, -18, 52, -17, 53, -18, -18, 55, -18, 25
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
- 16, 24, 21, 1, 10, 11, 13, 1, 36, 23,
- 18, 20, 25, 37, 38, 39, 40, 41, 2, 3,
- 4, 22, 2, 3, 4, 2, 3, 4, 45, 42,
- 43, 44, 26, 27, 28, 29, 30, 31, 32, 33,
- 26, 27, 28, 29, 30, 31, 32, 33, 47, 48,
- 49, 50, 51, 52, 53, 54, 0, 17, 15, 46,
- 19
+static const YYINT racoonprsacheck[] = { 258,
+ 257, 17, 275, 257, 257, 261, 262, 257, 24, 276,
+ 259, 257, 257, 257, 257, 272, 273, 274, 277, 272,
+ 273, 274, 272, 273, 274, 260, 257, 257, 257, 264,
+ 265, 266, 267, 268, 269, 270, 271, 264, 265, 266,
+ 267, 268, 269, 270, 271, 257, 3, 258, 258, 258,
+ 258, 258, 258, 258, 258, 8, 5, 33,
};
-
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-18))
-
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
-
-static const yytype_int8 yycheck[] =
-{
- 0, 18, 4, 3, 7, 8, 21, 3, 25, 22,
- 3, 5, 3, 3, 3, 3, 3, 3, 18, 19,
- 20, 23, 18, 19, 20, 18, 19, 20, 6, 3,
- 3, 3, 10, 11, 12, 13, 14, 15, 16, 17,
- 10, 11, 12, 13, 14, 15, 16, 17, 4, 4,
- 4, 4, 4, 4, 4, 4, -1, 5, 3, 34,
- 7
+#define YYFINAL 5
+#ifndef YYDEBUG
+#define YYDEBUG 0
+#endif
+#define YYMAXTOKEN 277
+#define YYUNDFTOKEN 288
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
+#if YYDEBUG
+static const char *const racoonprsaname[] = {
+
+"end-of-file",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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"COLON","HEX","OBRACE","EBRACE",
+"TAG_RSA","TAG_PUB","TAG_PSK","MODULUS","PUBLIC_EXPONENT","PRIVATE_EXPONENT",
+"PRIME1","PRIME2","EXPONENT1","EXPONENT2","COEFFICIENT","ADDR4","ADDR6",
+"ADDRANY","SLASH","NUMBER","BASE64",0,0,0,0,0,0,0,0,0,0,"illegal-symbol",
};
+static const char *const racoonprsarule[] = {
+"$accept : statements",
+"statements : statements statement",
+"statements : statement",
+"statement : addr addr COLON rsa_statement",
+"statement : addr COLON rsa_statement",
+"statement : COLON rsa_statement",
+"rsa_statement : TAG_RSA OBRACE params EBRACE",
+"rsa_statement : TAG_PUB BASE64",
+"rsa_statement : TAG_PUB HEX",
+"addr : addr4",
+"addr : addr6",
+"addr : ADDRANY",
+"addr4 : ADDR4 prefix",
+"addr6 : ADDR6 prefix",
+"prefix :",
+"prefix : SLASH NUMBER",
+"params : params param",
+"params : param",
+"param : MODULUS COLON HEX",
+"param : PUBLIC_EXPONENT COLON HEX",
+"param : PRIVATE_EXPONENT COLON HEX",
+"param : PRIME1 COLON HEX",
+"param : PRIME2 COLON HEX",
+"param : EXPONENT1 COLON HEX",
+"param : EXPONENT2 COLON HEX",
+"param : COEFFICIENT COLON HEX",
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 3, 18, 19, 20, 25, 26, 28, 29, 30,
- 7, 8, 27, 21, 31, 31, 0, 26, 3, 28,
- 5, 4, 23, 22, 27, 3, 10, 11, 12, 13,
- 14, 15, 16, 17, 32, 33, 27, 3, 3, 3,
- 3, 3, 3, 3, 3, 6, 33, 4, 4, 4,
- 4, 4, 4, 4, 4
};
-
-#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 yyerrorlab
-
-
-/* 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. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
#endif
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
+int yydebug;
+int yynerrs;
-/* This macro is provided for backward compatibility. */
+int yyerrflag;
+int yychar;
+YYSTYPE yyval;
+YYSTYPE yylval;
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
+/* define the initial stack-sizes */
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
-{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
+#define YYINITSTACKSIZE 200
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
+typedef struct {
+ unsigned stacksize;
+ YYINT *s_base;
+ YYINT *s_mark;
+ YYINT *s_last;
+ YYSTYPE *l_base;
+ YYSTYPE *l_mark;
+} YYSTACKDATA;
+/* variables for the parser stack */
+static YYSTACKDATA yystack;
+#line 327 "../../ipsec-tools/src/racoon/prsa_par.y"
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
+int prsaparse(void);
+
+int
+prsa_parse_file(struct genlist *list, char *fname, enum rsa_key_type type)
{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
+ FILE *fp = NULL;
+ int ret;
+
+ if (!fname)
+ return -1;
+ if (type == RSA_TYPE_PRIVATE) {
+ struct stat st;
+ if (stat(fname, &st) < 0)
+ return -1;
+ if (st.st_mode & (S_IRWXG | S_IRWXO)) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "Too slack permissions on private key '%s'\n",
+ fname);
+ plog(LLV_ERROR, LOCATION, NULL,
+ "Should be at most 0600, now is 0%o\n",
+ st.st_mode & 0777);
+ return -1;
+ }
+ }
+ fp = fopen(fname, "r");
+ if (!fp)
+ return -1;
+ prsain = fp;
+ prsa_cur_lineno = 1;
+ prsa_cur_fname = fname;
+ prsa_cur_list = list;
+ prsa_cur_type = type;
+ rsa_cur = RSA_new();
+ ret = prsaparse();
+ if (rsa_cur) {
+ RSA_free(rsa_cur);
+ rsa_cur = NULL;
+ }
+ fclose (fp);
+ prsain = NULL;
+ return ret;
}
+#line 488 "racoonprsa.tab.c"
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
+#if YYDEBUG
+#include <stdio.h> /* needed for printf */
+#endif
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
+#include <stdlib.h> /* needed for malloc, etc */
+#include <string.h> /* needed for memset */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+/* allocate initial stack or double stack size, up to YYMAXDEPTH */
+static int yygrowstack(YYSTACKDATA *data)
{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
- }
-}
+ int i;
+ unsigned newsize;
+ YYINT *newss;
+ YYSTYPE *newvs;
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
+ if ((newsize = data->stacksize) == 0)
+ newsize = YYINITSTACKSIZE;
+ else if (newsize >= YYMAXDEPTH)
+ return YYENOMEM;
+ else if ((newsize *= 2) > YYMAXDEPTH)
+ newsize = YYMAXDEPTH;
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
+ i = (int) (data->s_mark - data->s_base);
+ newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
+ if (newss == 0)
+ return YYENOMEM;
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
+ data->s_base = newss;
+ data->s_mark = newss + i;
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
+ newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
+ if (newvs == 0)
+ return YYENOMEM;
+ data->l_base = newvs;
+ data->l_mark = newvs + i;
-#if YYERROR_VERBOSE
+ data->stacksize = newsize;
+ data->s_last = data->s_base + newsize - 1;
+ return 0;
+}
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
+#if YYPURE || defined(YY_NO_LEAKS)
+static void yyfreestack(YYSTACKDATA *data)
{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
+ free(data->s_base);
+ free(data->l_base);
+ memset(data, 0, sizeof(*data));
}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
+#define yyfreestack(data) /* nothing */
#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
- while ((*yyd++ = *yys++) != '\0')
- continue;
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
+int
+YYPARSE_DECL()
{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
+ int yym, yyn, yystate;
+#if YYDEBUG
+ const char *yys;
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
+ if ((yys = getenv("YYDEBUG")) != 0)
{
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
}
+#endif
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
+ yym = 0;
+ yyn = 0;
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = YYEMPTY;
+ yystate = 0;
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+#if YYPURE
+ memset(&yystack, 0, sizeof(yystack));
+#endif
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
+ if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystack.s_mark = yystack.s_base;
+ yystack.l_mark = yystack.l_base;
+ yystate = 0;
+ *yystack.s_mark = 0;
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
+yyloop:
+ if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
{
- yyp++;
- yyformat++;
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
}
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
#endif
-{
- YYUSE (yyvaluep);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
+ }
+ if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
{
-
- default:
- break;
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ yychar = YYEMPTY;
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
}
-}
-
-
-
-
-/* The lookahead symbol. */
-int yychar;
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- 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;
- yyvsp = yyvs;
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
+ if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
{
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* 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;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ yyn = yytable[yyn];
+ goto yyreduce;
}
+ if (yyerrflag != 0) goto yyinrecovery;
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YYERROR_CALL("syntax error");
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
+ goto yyerrlab; /* redundant goto avoids 'unused label' warning */
+yyerrlab:
+ ++yynerrs;
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
+yyinrecovery:
+ if (yyerrflag < 3)
{
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ yyerrflag = 3;
+ for (;;)
+ {
+ if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yystack.s_mark);
+#endif
+ if (yystack.s_mark <= yystack.s_base) goto yyabort;
+ --yystack.s_mark;
+ --yystack.l_mark;
+ }
+ }
}
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
+ else
{
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
+ if (yychar == YYEOF) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = YYEMPTY;
+ goto yyloop;
}
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ if (yym > 0)
+ yyval = yystack.l_mark[1-yym];
+ else
+ memset(&yyval, 0, sizeof yyval);
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 4:
-/* Line 1787 of yacc.c */
-#line 161 "prsa_par.y"
+ switch (yyn)
{
- rsa_key_insert(prsa_cur_list, (yyvsp[(1) - (4)].naddr), (yyvsp[(2) - (4)].naddr), (yyvsp[(4) - (4)].rsa));
+case 3:
+#line 167 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
+ rsa_key_insert(prsa_cur_list, yystack.l_mark[-3].naddr, yystack.l_mark[-2].naddr, yystack.l_mark[0].rsa);
}
- break;
-
- case 5:
-/* Line 1787 of yacc.c */
-#line 165 "prsa_par.y"
- {
- rsa_key_insert(prsa_cur_list, NULL, (yyvsp[(1) - (3)].naddr), (yyvsp[(3) - (3)].rsa));
+break;
+case 4:
+#line 171 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
+ rsa_key_insert(prsa_cur_list, NULL, yystack.l_mark[-2].naddr, yystack.l_mark[0].rsa);
}
- break;
-
- case 6:
-/* Line 1787 of yacc.c */
-#line 169 "prsa_par.y"
- {
- rsa_key_insert(prsa_cur_list, NULL, NULL, (yyvsp[(2) - (2)].rsa));
+break;
+case 5:
+#line 175 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
+ rsa_key_insert(prsa_cur_list, NULL, NULL, yystack.l_mark[0].rsa);
}
- break;
-
- case 7:
-/* Line 1787 of yacc.c */
-#line 176 "prsa_par.y"
- {
+break;
+case 6:
+#line 182 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
if (prsa_cur_type == RSA_TYPE_PUBLIC) {
prsawarning("Using private key for public key purpose.\n");
if (!rsa_cur->n || !rsa_cur->e) {
@@ -1625,438 +731,188 @@ yyreduce:
rsa_cur->iqmp = NULL;
}
}
- (yyval.rsa) = rsa_cur;
+ yyval.rsa = rsa_cur;
rsa_cur = RSA_new();
}
- break;
-
- case 8:
-/* Line 1787 of yacc.c */
-#line 208 "prsa_par.y"
- {
+break;
+case 7:
+#line 214 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
if (prsa_cur_type == RSA_TYPE_PRIVATE) {
prsaerror("Public key in private-key file!\n");
YYABORT;
}
- (yyval.rsa) = base64_pubkey2rsa((yyvsp[(2) - (2)].chr));
- free((yyvsp[(2) - (2)].chr));
+ yyval.rsa = base64_pubkey2rsa(yystack.l_mark[0].chr);
+ free(yystack.l_mark[0].chr);
}
- break;
-
- case 9:
-/* Line 1787 of yacc.c */
-#line 217 "prsa_par.y"
- {
+break;
+case 8:
+#line 223 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
if (prsa_cur_type == RSA_TYPE_PRIVATE) {
prsaerror("Public key in private-key file!\n");
YYABORT;
}
- (yyval.rsa) = bignum_pubkey2rsa((yyvsp[(2) - (2)].bn));
+ yyval.rsa = bignum_pubkey2rsa(yystack.l_mark[0].bn);
}
- break;
-
- case 12:
-/* Line 1787 of yacc.c */
-#line 230 "prsa_par.y"
- {
- (yyval.naddr) = NULL;
+break;
+case 11:
+#line 236 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
+ yyval.naddr = NULL;
}
- break;
-
- case 13:
-/* Line 1787 of yacc.c */
-#line 237 "prsa_par.y"
- {
+break;
+case 12:
+#line 243 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
int err;
struct sockaddr_in *sap;
struct addrinfo hints, *res;
- if ((yyvsp[(2) - (2)].num) == -1) (yyvsp[(2) - (2)].num) = 32;
- if ((yyvsp[(2) - (2)].num) < 0 || (yyvsp[(2) - (2)].num) > 32) {
+ if (yystack.l_mark[0].num == -1) yystack.l_mark[0].num = 32;
+ if (yystack.l_mark[0].num < 0 || yystack.l_mark[0].num > 32) {
prsaerror ("Invalid IPv4 prefix\n");
YYABORT;
}
- (yyval.naddr) = calloc (sizeof(struct netaddr), 1);
- (yyval.naddr)->prefix = (yyvsp[(2) - (2)].num);
- sap = (struct sockaddr_in *)(&(yyval.naddr)->sa);
+ yyval.naddr = calloc (sizeof(struct netaddr), 1);
+ yyval.naddr->prefix = yystack.l_mark[0].num;
+ sap = (struct sockaddr_in *)(&yyval.naddr->sa);
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_flags = AI_NUMERICHOST;
- err = getaddrinfo((yyvsp[(1) - (2)].chr), NULL, &hints, &res);
+ err = getaddrinfo(yystack.l_mark[-1].chr, NULL, &hints, &res);
if (err < 0) {
- prsaerror("getaddrinfo(%s): %s\n", (yyvsp[(1) - (2)].chr), gai_strerror(err));
+ prsaerror("getaddrinfo(%s): %s\n", yystack.l_mark[-1].chr, gai_strerror(err));
YYABORT;
}
memcpy(sap, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res);
- free((yyvsp[(1) - (2)].chr));
+ free(yystack.l_mark[-1].chr);
}
- break;
-
- case 14:
-/* Line 1787 of yacc.c */
-#line 266 "prsa_par.y"
- {
+break;
+case 13:
+#line 272 "../../ipsec-tools/src/racoon/prsa_par.y"
+ {
int err;
struct sockaddr_in6 *sap;
struct addrinfo hints, *res;
- if ((yyvsp[(2) - (2)].num) == -1) (yyvsp[(2) - (2)].num) = 128;
- if ((yyvsp[(2) - (2)].num) < 0 || (yyvsp[(2) - (2)].num) > 128) {
+ if (yystack.l_mark[0].num == -1) yystack.l_mark[0].num = 128;
+ if (yystack.l_mark[0].num < 0 || yystack.l_mark[0].num > 128) {
prsaerror ("Invalid IPv6 prefix\n");
YYABORT;
}
- (yyval.naddr) = calloc (sizeof(struct netaddr), 1);
- (yyval.naddr)->prefix = (yyvsp[(2) - (2)].num);
- sap = (struct sockaddr_in6 *)(&(yyval.naddr)->sa);
+ yyval.naddr = calloc (sizeof(struct netaddr), 1);
+ yyval.naddr->prefix = yystack.l_mark[0].num;
+ sap = (struct sockaddr_in6 *)(&yyval.naddr->sa);
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
hints.ai_flags = AI_NUMERICHOST;
- err = getaddrinfo((yyvsp[(1) - (2)].chr), NULL, &hints, &res);
+ err = getaddrinfo(yystack.l_mark[-1].chr, NULL, &hints, &res);
if (err < 0) {
- prsaerror("getaddrinfo(%s): %s\n", (yyvsp[(1) - (2)].chr), gai_strerror(err));
+ prsaerror("getaddrinfo(%s): %s\n", yystack.l_mark[-1].chr, gai_strerror(err));
YYABORT;
}
memcpy(sap, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res);
- free((yyvsp[(1) - (2)].chr));
+ free(yystack.l_mark[-1].chr);
}
- break;
-
- case 15:
-/* Line 1787 of yacc.c */
-#line 294 "prsa_par.y"
- { (yyval.num) = -1; }
- break;
-
- case 16:
-/* Line 1787 of yacc.c */
-#line 295 "prsa_par.y"
- { (yyval.num) = (yyvsp[(2) - (2)].num); }
- break;
-
- case 19:
-/* Line 1787 of yacc.c */
-#line 304 "prsa_par.y"
- { if (!rsa_cur->n) rsa_cur->n = (yyvsp[(3) - (3)].bn); else { prsaerror ("Modulus already defined\n"); YYABORT; } }
- break;
-
- case 20:
-/* Line 1787 of yacc.c */
-#line 306 "prsa_par.y"
- { if (!rsa_cur->e) rsa_cur->e = (yyvsp[(3) - (3)].bn); else { prsaerror ("PublicExponent already defined\n"); YYABORT; } }
- break;
-
- case 21:
-/* Line 1787 of yacc.c */
-#line 308 "prsa_par.y"
- { if (!rsa_cur->d) rsa_cur->d = (yyvsp[(3) - (3)].bn); else { prsaerror ("PrivateExponent already defined\n"); YYABORT; } }
- break;
-
- case 22:
-/* Line 1787 of yacc.c */
-#line 310 "prsa_par.y"
- { if (!rsa_cur->p) rsa_cur->p = (yyvsp[(3) - (3)].bn); else { prsaerror ("Prime1 already defined\n"); YYABORT; } }
- break;
-
- case 23:
-/* Line 1787 of yacc.c */
-#line 312 "prsa_par.y"
- { if (!rsa_cur->q) rsa_cur->q = (yyvsp[(3) - (3)].bn); else { prsaerror ("Prime2 already defined\n"); YYABORT; } }
- break;
-
- case 24:
-/* Line 1787 of yacc.c */
-#line 314 "prsa_par.y"
- { if (!rsa_cur->dmp1) rsa_cur->dmp1 = (yyvsp[(3) - (3)].bn); else { prsaerror ("Exponent1 already defined\n"); YYABORT; } }
- break;
-
- case 25:
-/* Line 1787 of yacc.c */
-#line 316 "prsa_par.y"
- { if (!rsa_cur->dmq1) rsa_cur->dmq1 = (yyvsp[(3) - (3)].bn); else { prsaerror ("Exponent2 already defined\n"); YYABORT; } }
- break;
-
- case 26:
-/* Line 1787 of yacc.c */
-#line 318 "prsa_par.y"
- { if (!rsa_cur->iqmp) rsa_cur->iqmp = (yyvsp[(3) - (3)].bn); else { prsaerror ("Coefficient already defined\n"); YYABORT; } }
- break;
-
-
-/* Line 1787 of yacc.c */
-#line 1789 "prsa_par.c"
- default: break;
+break;
+case 14:
+#line 300 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { yyval.num = -1; }
+break;
+case 15:
+#line 301 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { yyval.num = yystack.l_mark[0].num; }
+break;
+case 18:
+#line 310 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->n) rsa_cur->n = yystack.l_mark[0].bn; else { prsaerror ("Modulus already defined\n"); YYABORT; } }
+break;
+case 19:
+#line 312 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->e) rsa_cur->e = yystack.l_mark[0].bn; else { prsaerror ("PublicExponent already defined\n"); YYABORT; } }
+break;
+case 20:
+#line 314 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->d) rsa_cur->d = yystack.l_mark[0].bn; else { prsaerror ("PrivateExponent already defined\n"); YYABORT; } }
+break;
+case 21:
+#line 316 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->p) rsa_cur->p = yystack.l_mark[0].bn; else { prsaerror ("Prime1 already defined\n"); YYABORT; } }
+break;
+case 22:
+#line 318 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->q) rsa_cur->q = yystack.l_mark[0].bn; else { prsaerror ("Prime2 already defined\n"); YYABORT; } }
+break;
+case 23:
+#line 320 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->dmp1) rsa_cur->dmp1 = yystack.l_mark[0].bn; else { prsaerror ("Exponent1 already defined\n"); YYABORT; } }
+break;
+case 24:
+#line 322 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->dmq1) rsa_cur->dmq1 = yystack.l_mark[0].bn; else { prsaerror ("Exponent2 already defined\n"); YYABORT; } }
+break;
+case 25:
+#line 324 "../../ipsec-tools/src/racoon/prsa_par.y"
+ { if (!rsa_cur->iqmp) rsa_cur->iqmp = yystack.l_mark[0].bn; else { prsaerror ("Coefficient already defined\n"); YYABORT; } }
+break;
+#line 862 "racoonprsa.tab.c"
}
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* 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 - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
+ yystack.s_mark -= yym;
+ yystate = *yystack.s_mark;
+ yystack.l_mark -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
{
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yystack.s_mark = YYFINAL;
+ *++yystack.l_mark = yyval;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
#endif
-
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
+ }
+ if (yychar == YYEOF) goto yyaccept;
+ goto yyloop;
}
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
+ if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ *++yystack.s_mark = (YYINT) yystate;
+ *++yystack.l_mark = yyval;
+ goto yyloop;
+yyoverflow:
+ YYERROR_CALL("yacc stack overflow");
-/* Line 2048 of yacc.c */
-#line 320 "prsa_par.y"
-
-
-int prsaparse(void);
+yyabort:
+ yyfreestack(&yystack);
+ return (1);
-int
-prsa_parse_file(struct genlist *list, char *fname, enum rsa_key_type type)
-{
- FILE *fp = NULL;
- int ret;
-
- if (!fname)
- return -1;
- if (type == RSA_TYPE_PRIVATE) {
- struct stat st;
- if (stat(fname, &st) < 0)
- return -1;
- if (st.st_mode & (S_IRWXG | S_IRWXO)) {
- plog(LLV_ERROR, LOCATION, NULL,
- "Too slack permissions on private key '%s'\n",
- fname);
- plog(LLV_ERROR, LOCATION, NULL,
- "Should be at most 0600, now is 0%o\n",
- st.st_mode & 0777);
- return -1;
- }
- }
- fp = fopen(fname, "r");
- if (!fp)
- return -1;
- prsain = fp;
- prsa_cur_lineno = 1;
- prsa_cur_fname = fname;
- prsa_cur_list = list;
- prsa_cur_type = type;
- rsa_cur = RSA_new();
- ret = prsaparse();
- if (rsa_cur) {
- RSA_free(rsa_cur);
- rsa_cur = NULL;
- }
- fclose (fp);
- prsain = NULL;
- return ret;
+yyaccept:
+ yyfreestack(&yystack);
+ return (0);
}
diff --git a/ipsec-tools/src/racoon/prsa_par.h b/ipsec-tools/src/racoon/prsa_par.h
index 7a7b42ff..03253547 100644
--- a/ipsec-tools/src/racoon/prsa_par.h
+++ b/ipsec-tools/src/racoon/prsa_par.h
@@ -1,134 +1,36 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-#ifndef PRSA_PRSA_PAR_H
-# define PRSA_PRSA_PAR_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
+#define COLON 257
+#define HEX 258
+#define OBRACE 259
+#define EBRACE 260
+#define TAG_RSA 261
+#define TAG_PUB 262
+#define TAG_PSK 263
+#define MODULUS 264
+#define PUBLIC_EXPONENT 265
+#define PRIVATE_EXPONENT 266
+#define PRIME1 267
+#define PRIME2 268
+#define EXPONENT1 269
+#define EXPONENT2 270
+#define COEFFICIENT 271
+#define ADDR4 272
+#define ADDR6 273
+#define ADDRANY 274
+#define SLASH 275
+#define NUMBER 276
+#define BASE64 277
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-#if YYDEBUG
-extern int prsadebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- COLON = 258,
- HEX = 259,
- OBRACE = 260,
- EBRACE = 261,
- TAG_RSA = 262,
- TAG_PUB = 263,
- TAG_PSK = 264,
- MODULUS = 265,
- PUBLIC_EXPONENT = 266,
- PRIVATE_EXPONENT = 267,
- PRIME1 = 268,
- PRIME2 = 269,
- EXPONENT1 = 270,
- EXPONENT2 = 271,
- COEFFICIENT = 272,
- ADDR4 = 273,
- ADDR6 = 274,
- ADDRANY = 275,
- SLASH = 276,
- NUMBER = 277,
- BASE64 = 278
- };
-#endif
-/* Tokens. */
-#define COLON 258
-#define HEX 259
-#define OBRACE 260
-#define EBRACE 261
-#define TAG_RSA 262
-#define TAG_PUB 263
-#define TAG_PSK 264
-#define MODULUS 265
-#define PUBLIC_EXPONENT 266
-#define PRIVATE_EXPONENT 267
-#define PRIME1 268
-#define PRIME2 269
-#define EXPONENT1 270
-#define EXPONENT2 271
-#define COEFFICIENT 272
-#define ADDR4 273
-#define ADDR6 274
-#define ADDRANY 275
-#define SLASH 276
-#define NUMBER 277
-#define BASE64 278
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 2049 of yacc.c */
-#line 130 "prsa_par.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+typedef union {
BIGNUM *bn;
RSA *rsa;
char *chr;
long num;
struct netaddr *naddr;
-
-
-/* Line 2049 of yacc.c */
-#line 112 "prsa_par.h"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE prsalval;
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int prsaparse (void *YYPARSE_PARAM);
-#else
-int prsaparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int prsaparse (void);
-#else
-int prsaparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !PRSA_PRSA_PAR_H */
+#endif /* !YYSTYPE_IS_DECLARED */
+extern YYSTYPE racoonprsalval;
diff --git a/ipsec-tools/src/racoon/prsa_par.y b/ipsec-tools/src/racoon/prsa_par.y
index 1987e4d4..83c49903 100644
--- a/ipsec-tools/src/racoon/prsa_par.y
+++ b/ipsec-tools/src/racoon/prsa_par.y
@@ -70,6 +70,12 @@
#include "crypto_openssl.h"
#include "sockmisc.h"
#include "rsalist.h"
+#ifdef __rtems__
+#define prsaparse yyparse
+#define prsaerror yyerror
+#define prsain racoonprsain
+#define prsawrap racoonprsawrap
+#endif /* __rtems__ */
extern void prsaerror(const char *str, ...);
extern int prsawrap (void);
diff --git a/ipsec-tools/src/racoon/prsa_par_wrapper.c b/ipsec-tools/src/racoon/prsa_par_wrapper.c
new file mode 100644
index 00000000..321fe36e
--- /dev/null
+++ b/ipsec-tools/src/racoon/prsa_par_wrapper.c
@@ -0,0 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#include "prsa_par.c"
+#include "rtems-bsd-racoon-prsa_par_wrapper-data.h"
diff --git a/ipsec-tools/src/racoon/prsa_tok.c b/ipsec-tools/src/racoon/prsa_tok.c
index 66dc2515..8089937a 100644
--- a/ipsec-tools/src/racoon/prsa_tok.c
+++ b/ipsec-tools/src/racoon/prsa_tok.c
@@ -1,29 +1,28 @@
-#line 2 "prsa_tok.c"
-#line 4 "prsa_tok.c"
+#line 3 "<stdout>"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
-#define yy_create_buffer prsa_create_buffer
-#define yy_delete_buffer prsa_delete_buffer
-#define yy_flex_debug prsa_flex_debug
-#define yy_init_buffer prsa_init_buffer
-#define yy_flush_buffer prsa_flush_buffer
-#define yy_load_buffer_state prsa_load_buffer_state
-#define yy_switch_to_buffer prsa_switch_to_buffer
-#define yyin prsain
-#define yyleng prsaleng
-#define yylex prsalex
-#define yylineno prsalineno
-#define yyout prsaout
-#define yyrestart prsarestart
-#define yytext prsatext
-#define yywrap prsawrap
-#define yyalloc prsaalloc
-#define yyrealloc prsarealloc
-#define yyfree prsafree
+#define yy_create_buffer racoonprsa_create_buffer
+#define yy_delete_buffer racoonprsa_delete_buffer
+#define yy_flex_debug racoonprsa_flex_debug
+#define yy_init_buffer racoonprsa_init_buffer
+#define yy_flush_buffer racoonprsa_flush_buffer
+#define yy_load_buffer_state racoonprsa_load_buffer_state
+#define yy_switch_to_buffer racoonprsa_switch_to_buffer
+#define yyin racoonprsain
+#define yyleng racoonprsaleng
+#define yylex racoonprsalex
+#define yylineno racoonprsalineno
+#define yyout racoonprsaout
+#define yyrestart racoonprsarestart
+#define yytext racoonprsatext
+#define yywrap racoonprsawrap
+#define yyalloc racoonprsaalloc
+#define yyrealloc racoonprsarealloc
+#define yyfree racoonprsafree
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
@@ -35,6 +34,16 @@
/* First, we deal with platform-specific or compiler-specific issues. */
+#if defined(__FreeBSD__)
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+#include <sys/cdefs.h>
+#include <stdint.h>
+#else
+#define __dead2
+#endif
+
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
@@ -50,7 +59,8 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__FreeBSD__) || \
+ (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -155,13 +165,13 @@ typedef unsigned int flex_uint32_t;
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE prsarestart(prsain )
+#define YY_NEW_FILE racoonprsarestart(racoonprsain )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
+#define YY_BUF_SIZE 1024
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -178,9 +188,9 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t prsaleng;
+extern yy_size_t racoonprsaleng;
-extern FILE *prsain, *prsaout;
+extern FILE *racoonprsain, *racoonprsaout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
@@ -192,13 +202,13 @@ extern FILE *prsain, *prsaout;
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up prsatext. */ \
+ /* Undo effects of setting up racoonprsatext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up prsatext again */ \
+ YY_DO_BEFORE_ACTION; /* set up racoonprsatext again */ \
} \
while ( 0 )
@@ -261,8 +271,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via prsarestart()), so that the user can continue scanning by
- * just pointing prsain at a new input file.
+ * (via racoonprsarestart()), so that the user can continue scanning by
+ * just pointing racoonprsain at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -283,57 +293,58 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+#define yy_current_buffer YY_CURRENT_BUFFER
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when prsatext is formed. */
+/* yy_hold_char holds the character lost when racoonprsatext is formed. */
static char yy_hold_char;
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t prsaleng;
+yy_size_t racoonprsaleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow prsawrap()'s to do buffer switches
- * instead of setting up a fresh prsain. A bit of a hack ...
+/* Flag which is used to allow racoonprsawrap()'s to do buffer switches
+ * instead of setting up a fresh racoonprsain. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void prsarestart (FILE *input_file );
-void prsa_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE prsa_create_buffer (FILE *file,int size );
-void prsa_delete_buffer (YY_BUFFER_STATE b );
-void prsa_flush_buffer (YY_BUFFER_STATE b );
-void prsapush_buffer_state (YY_BUFFER_STATE new_buffer );
-void prsapop_buffer_state (void );
+void racoonprsarestart (FILE *input_file );
+void racoonprsa_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE racoonprsa_create_buffer (FILE *file,int size );
+void racoonprsa_delete_buffer (YY_BUFFER_STATE b );
+void racoonprsa_flush_buffer (YY_BUFFER_STATE b );
+void racoonprsapush_buffer_state (YY_BUFFER_STATE new_buffer );
+void racoonprsapop_buffer_state (void );
-static void prsaensure_buffer_stack (void );
-static void prsa_load_buffer_state (void );
-static void prsa_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void racoonprsaensure_buffer_stack (void );
+static void racoonprsa_load_buffer_state (void );
+static void racoonprsa_init_buffer (YY_BUFFER_STATE b,FILE *file );
-#define YY_FLUSH_BUFFER prsa_flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER racoonprsa_flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE prsa_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE prsa_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE prsa_scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE racoonprsa_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE racoonprsa_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE racoonprsa_scan_bytes (yyconst char *bytes,yy_size_t len );
-void *prsaalloc (yy_size_t );
-void *prsarealloc (void *,yy_size_t );
-void prsafree (void * );
+void *racoonprsaalloc (yy_size_t );
+void *racoonprsarealloc (void *,yy_size_t );
+void racoonprsafree (void * );
-#define yy_new_buffer prsa_create_buffer
+#define yy_new_buffer racoonprsa_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- prsaensure_buffer_stack (); \
+ racoonprsaensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- prsa_create_buffer(prsain,YY_BUF_SIZE ); \
+ racoonprsa_create_buffer(racoonprsain,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
@@ -341,9 +352,9 @@ void prsafree (void * );
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- prsaensure_buffer_stack (); \
+ racoonprsaensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- prsa_create_buffer(prsain,YY_BUF_SIZE ); \
+ racoonprsa_create_buffer(racoonprsain,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
@@ -354,28 +365,28 @@ void prsafree (void * );
typedef unsigned char YY_CHAR;
-FILE *prsain = (FILE *) 0, *prsaout = (FILE *) 0;
+FILE *racoonprsain = (FILE *) 0, *racoonprsaout = (FILE *) 0;
typedef int yy_state_type;
-extern int prsalineno;
+extern int racoonprsalineno;
-int prsalineno = 1;
+int racoonprsalineno = 1;
-extern char *prsatext;
-#define yytext_ptr prsatext
+extern char *racoonprsatext;
+#define yytext_ptr racoonprsatext
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static void yy_fatal_error (yyconst char msg[] ) __dead2;
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up prsatext.
+ * corresponding action - sets up racoonprsatext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- prsaleng = (size_t) (yy_cp - yy_bp); \
+ racoonprsaleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
@@ -683,8 +694,8 @@ static yyconst flex_int16_t yy_chk[722] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int prsa_flex_debug;
-int prsa_flex_debug = 0;
+extern int racoonprsa_flex_debug;
+int racoonprsa_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -693,11 +704,11 @@ int prsa_flex_debug = 0;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *prsatext;
-#line 1 "prsa_tok.l"
+char *racoonprsatext;
+#line 1 "../../ipsec-tools/src/racoon/prsa_tok.l"
/* $NetBSD: prsa_tok.l,v 1.4 2006/09/09 16:22:10 manu Exp $ */
/* Id: prsa_tok.l,v 1.2 2004/07/12 20:43:51 ludvigm Exp */
-#line 6 "prsa_tok.l"
+#line 6 "../../ipsec-tools/src/racoon/prsa_tok.l"
/*
* Copyright (C) 2004 SuSE Linux AG, Nuernberg, Germany.
* Contributed by: Michal Ludvig <mludvig@suse.cz>, SUSE Labs
@@ -734,11 +745,15 @@ char *prsatext;
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include "prsa_par.h"
+#ifdef __rtems__
+#define prsatext racoonprsatext
+#define prsalval racoonprsalval
+#endif /* __rtems__ */
extern int prsalex (void);
extern int prsa_cur_lineno;
-#line 742 "prsa_tok.c"
+#line 757 "<stdout>"
#define INITIAL 0
@@ -759,31 +774,31 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int prsalex_destroy (void );
+int racoonprsalex_destroy (void );
-int prsaget_debug (void );
+int racoonprsaget_debug (void );
-void prsaset_debug (int debug_flag );
+void racoonprsaset_debug (int debug_flag );
-YY_EXTRA_TYPE prsaget_extra (void );
+YY_EXTRA_TYPE racoonprsaget_extra (void );
-void prsaset_extra (YY_EXTRA_TYPE user_defined );
+void racoonprsaset_extra (YY_EXTRA_TYPE user_defined );
-FILE *prsaget_in (void );
+FILE *racoonprsaget_in (void );
-void prsaset_in (FILE * in_str );
+void racoonprsaset_in (FILE * in_str );
-FILE *prsaget_out (void );
+FILE *racoonprsaget_out (void );
-void prsaset_out (FILE * out_str );
+void racoonprsaset_out (FILE * out_str );
-yy_size_t prsaget_leng (void );
+yy_size_t racoonprsaget_leng (void );
-char *prsaget_text (void );
+char *racoonprsaget_text (void );
-int prsaget_lineno (void );
+int racoonprsaget_lineno (void );
-void prsaset_lineno (int line_number );
+void racoonprsaset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -791,13 +806,15 @@ void prsaset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int prsawrap (void );
+extern "C" int racoonprsawrap (void );
#else
-extern int prsawrap (void );
+extern int racoonprsawrap (void );
#endif
#endif
+#ifndef YY_NO_UNPUT
static void yyunput (int c,char *buf_ptr );
+#endif
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
@@ -827,7 +844,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( prsatext, prsaleng, 1, prsaout )) {} } while (0)
+#define ECHO do { if (fwrite( racoonprsatext, racoonprsaleng, 1, racoonprsaout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -840,18 +857,18 @@ static int input (void );
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
- (c = getc( prsain )) != EOF && c != '\n'; ++n ) \
+ (c = getc( racoonprsain )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( prsain ) ) \
+ if ( c == EOF && ferror( racoonprsain ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, prsain))==0 && ferror(prsain)) \
+ while ( (result = fread(buf, 1, max_size, racoonprsain))==0 && ferror(racoonprsain)) \
{ \
if( errno != EINTR) \
{ \
@@ -859,7 +876,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(prsain); \
+ clearerr(racoonprsain); \
} \
}\
\
@@ -892,12 +909,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int prsalex (void);
+extern int racoonprsalex (void);
-#define YY_DECL int prsalex (void)
+#define YY_DECL int racoonprsalex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after prsatext and prsaleng
+/* Code executed at the beginning of each rule, after racoonprsatext and racoonprsaleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -916,13 +933,13 @@ extern int prsalex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
-#line 56 "prsa_tok.l"
+#line 60 "../../ipsec-tools/src/racoon/prsa_tok.l"
-#line 926 "prsa_tok.c"
+#line 943 "<stdout>"
if ( !(yy_init) )
{
@@ -935,26 +952,26 @@ YY_DECL
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! prsain )
- prsain = stdin;
+ if ( ! racoonprsain )
+ racoonprsain = stdin;
- if ( ! prsaout )
- prsaout = stdout;
+ if ( ! racoonprsaout )
+ racoonprsaout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- prsaensure_buffer_stack ();
+ racoonprsaensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- prsa_create_buffer(prsain,YY_BUF_SIZE );
+ racoonprsa_create_buffer(racoonprsain,YY_BUF_SIZE );
}
- prsa_load_buffer_state( );
+ racoonprsa_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of prsatext. */
+ /* Support of racoonprsatext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -966,7 +983,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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;
@@ -1007,37 +1024,37 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 57 "prsa_tok.l"
+#line 61 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return OBRACE; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 58 "prsa_tok.l"
+#line 62 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return EBRACE; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 59 "prsa_tok.l"
+#line 63 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return COLON; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 60 "prsa_tok.l"
+#line 64 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return TAG_RSA; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 61 "prsa_tok.l"
+#line 65 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return TAG_PSK; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 62 "prsa_tok.l"
+#line 66 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return TAG_PUB; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 63 "prsa_tok.l"
+#line 67 "../../ipsec-tools/src/racoon/prsa_tok.l"
{
BIGNUM *bn = BN_new();
BN_hex2bn(&bn, prsatext+2);
@@ -1047,7 +1064,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 69 "prsa_tok.l"
+#line 73 "../../ipsec-tools/src/racoon/prsa_tok.l"
{
prsalval.chr = strdup(prsatext);
return BASE64;
@@ -1055,91 +1072,91 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 73 "prsa_tok.l"
+#line 77 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return MODULUS; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 74 "prsa_tok.l"
+#line 78 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return PUBLIC_EXPONENT; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 75 "prsa_tok.l"
+#line 79 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return PRIVATE_EXPONENT; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 76 "prsa_tok.l"
+#line 80 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return PRIME1; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 77 "prsa_tok.l"
+#line 81 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return PRIME2; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 78 "prsa_tok.l"
+#line 82 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return EXPONENT1; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 79 "prsa_tok.l"
+#line 83 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return EXPONENT2; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 80 "prsa_tok.l"
+#line 84 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return COEFFICIENT; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 81 "prsa_tok.l"
+#line 85 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return SLASH; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 82 "prsa_tok.l"
+#line 86 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ prsalval.num = atol(prsatext); return NUMBER; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 83 "prsa_tok.l"
+#line 87 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ return ADDRANY; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 84 "prsa_tok.l"
+#line 88 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ prsalval.chr = strdup(prsatext); return ADDR4; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 85 "prsa_tok.l"
+#line 89 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ prsalval.chr = strdup(prsatext); return ADDR6; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 86 "prsa_tok.l"
+#line 90 "../../ipsec-tools/src/racoon/prsa_tok.l"
;
YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 87 "prsa_tok.l"
+#line 91 "../../ipsec-tools/src/racoon/prsa_tok.l"
{ prsa_cur_lineno++; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 88 "prsa_tok.l"
+#line 92 "../../ipsec-tools/src/racoon/prsa_tok.l"
;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 89 "prsa_tok.l"
+#line 93 "../../ipsec-tools/src/racoon/prsa_tok.l"
ECHO;
YY_BREAK
-#line 1143 "prsa_tok.c"
+#line 1160 "<stdout>"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1156,15 +1173,15 @@ case YY_STATE_EOF(INITIAL):
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed prsain at a new source and called
- * prsalex(). If so, then we have to assure
+ * just pointed racoonprsain at a new source and called
+ * racoonprsalex(). 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_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = prsain;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = racoonprsain;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1217,11 +1234,11 @@ case YY_STATE_EOF(INITIAL):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( prsawrap( ) )
+ if ( racoonprsawrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * prsatext, we can now set up
+ * racoonprsatext, 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
@@ -1270,7 +1287,7 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of prsalex */
+} /* end of racoonprsalex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1281,9 +1298,9 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1348,7 +1365,7 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- prsarealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ racoonprsarealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1380,7 +1397,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- prsarestart(prsain );
+ racoonprsarestart(racoonprsain );
}
else
@@ -1397,7 +1414,7 @@ static int yy_get_next_buffer (void)
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) prsarealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) racoonprsarealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
@@ -1415,14 +1432,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ 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);
+ 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;
@@ -1447,10 +1464,10 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1468,22 +1485,23 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
+#ifndef YY_NO_UNPUT
+ static void yyunput (int c, char * yy_bp )
{
- register char *yy_cp;
+ char *yy_cp;
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up prsatext */
+ /* undo effects of setting up racoonprsatext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ yy_size_t number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1504,6 +1522,7 @@ static int yy_get_next_buffer (void)
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
+#endif /* ifndef YY_NO_UNPUT */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
@@ -1546,13 +1565,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- prsarestart(prsain );
+ racoonprsarestart(racoonprsain );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( prsawrap( ) )
+ if ( racoonprsawrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -1572,7 +1591,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve prsatext */
+ *(yy_c_buf_p) = '\0'; /* preserve racoonprsatext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -1584,32 +1603,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void prsarestart (FILE * input_file )
+ void racoonprsarestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- prsaensure_buffer_stack ();
+ racoonprsaensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- prsa_create_buffer(prsain,YY_BUF_SIZE );
+ racoonprsa_create_buffer(racoonprsain,YY_BUF_SIZE );
}
- prsa_init_buffer(YY_CURRENT_BUFFER,input_file );
- prsa_load_buffer_state( );
+ racoonprsa_init_buffer(YY_CURRENT_BUFFER,input_file );
+ racoonprsa_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void prsa_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void racoonprsa_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * prsapop_buffer_state();
- * prsapush_buffer_state(new_buffer);
+ * racoonprsapop_buffer_state();
+ * racoonprsapush_buffer_state(new_buffer);
*/
- prsaensure_buffer_stack ();
+ racoonprsaensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1622,21 +1641,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- prsa_load_buffer_state( );
+ racoonprsa_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (prsawrap()) processing, but the only time this flag
- * is looked at is after prsawrap() is called, so it's safe
+ * EOF (racoonprsawrap()) processing, but the only time this flag
+ * is looked at is after racoonprsawrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void prsa_load_buffer_state (void)
+static void racoonprsa_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- prsain = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ racoonprsain = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -1646,35 +1665,35 @@ static void prsa_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE prsa_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE racoonprsa_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) prsaalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) racoonprsaalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in prsa_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonprsa_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 *) prsaalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) racoonprsaalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in prsa_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonprsa_create_buffer()" );
b->yy_is_our_buffer = 1;
- prsa_init_buffer(b,file );
+ racoonprsa_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with prsa_create_buffer()
+ * @param b a buffer created with racoonprsa_create_buffer()
*
*/
- void prsa_delete_buffer (YY_BUFFER_STATE b )
+ void racoonprsa_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -1684,27 +1703,27 @@ static void prsa_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- prsafree((void *) b->yy_ch_buf );
+ racoonprsafree((void *) b->yy_ch_buf );
- prsafree((void *) b );
+ racoonprsafree((void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a prsarestart() or at EOF.
+ * such as during a racoonprsarestart() or at EOF.
*/
- static void prsa_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void racoonprsa_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- prsa_flush_buffer(b );
+ racoonprsa_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then prsa_init_buffer was _probably_
- * called from prsarestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then racoonprsa_init_buffer was _probably_
+ * called from racoonprsarestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -1721,7 +1740,7 @@ static void prsa_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void prsa_flush_buffer (YY_BUFFER_STATE b )
+ void racoonprsa_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -1741,7 +1760,7 @@ static void prsa_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- prsa_load_buffer_state( );
+ racoonprsa_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1750,14 +1769,14 @@ static void prsa_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void prsapush_buffer_state (YY_BUFFER_STATE new_buffer )
+void racoonprsapush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- prsaensure_buffer_stack();
+ racoonprsaensure_buffer_stack();
- /* This block is copied from prsa_switch_to_buffer. */
+ /* This block is copied from racoonprsa_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1771,8 +1790,8 @@ void prsapush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from prsa_switch_to_buffer. */
- prsa_load_buffer_state( );
+ /* copied from racoonprsa_switch_to_buffer. */
+ racoonprsa_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -1780,18 +1799,18 @@ void prsapush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void prsapop_buffer_state (void)
+void racoonprsapop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- prsa_delete_buffer(YY_CURRENT_BUFFER );
+ racoonprsa_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- prsa_load_buffer_state( );
+ racoonprsa_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -1799,7 +1818,7 @@ void prsapop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void prsaensure_buffer_stack (void)
+static void racoonprsaensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
@@ -1810,11 +1829,11 @@ static void prsaensure_buffer_stack (void)
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)prsaalloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)racoonprsaalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in prsaensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonprsaensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -1829,12 +1848,12 @@ static void prsaensure_buffer_stack (void)
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)prsarealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)racoonprsarealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in prsaensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonprsaensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1848,7 +1867,7 @@ static void prsaensure_buffer_stack (void)
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE prsa_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE racoonprsa_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -1858,9 +1877,9 @@ YY_BUFFER_STATE prsa_scan_buffer (char * base, yy_size_t size )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) prsaalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) racoonprsaalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in prsa_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonprsa_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -1872,53 +1891,53 @@ YY_BUFFER_STATE prsa_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- prsa_switch_to_buffer(b );
+ racoonprsa_switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to prsalex() will
+/** Setup the input buffer state to scan a string. The next call to racoonprsalex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * prsa_scan_bytes() instead.
+ * racoonprsa_scan_bytes() instead.
*/
-YY_BUFFER_STATE prsa_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE racoonprsa_scan_string (yyconst char * yystr )
{
- return prsa_scan_bytes(yystr,strlen(yystr) );
+ return racoonprsa_scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to prsalex() will
+/** Setup the input buffer state to scan the given bytes. The next call to racoonprsalex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE prsa_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE racoonprsa_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) prsaalloc(n );
+ buf = (char *) racoonprsaalloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in prsa_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in racoonprsa_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = prsa_scan_buffer(buf,n );
+ b = racoonprsa_scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in prsa_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in racoonprsa_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -1944,14 +1963,14 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up prsatext. */ \
+ /* Undo effects of setting up racoonprsatext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- prsatext[prsaleng] = (yy_hold_char); \
- (yy_c_buf_p) = prsatext + yyless_macro_arg; \
+ racoonprsatext[racoonprsaleng] = (yy_hold_char); \
+ (yy_c_buf_p) = racoonprsatext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- prsaleng = yyless_macro_arg; \
+ racoonprsaleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -1960,85 +1979,85 @@ static void yy_fatal_error (yyconst char* msg )
/** Get the current line number.
*
*/
-int prsaget_lineno (void)
+int racoonprsaget_lineno (void)
{
- return prsalineno;
+ return racoonprsalineno;
}
/** Get the input stream.
*
*/
-FILE *prsaget_in (void)
+FILE *racoonprsaget_in (void)
{
- return prsain;
+ return racoonprsain;
}
/** Get the output stream.
*
*/
-FILE *prsaget_out (void)
+FILE *racoonprsaget_out (void)
{
- return prsaout;
+ return racoonprsaout;
}
/** Get the length of the current token.
*
*/
-yy_size_t prsaget_leng (void)
+yy_size_t racoonprsaget_leng (void)
{
- return prsaleng;
+ return racoonprsaleng;
}
/** Get the current token.
*
*/
-char *prsaget_text (void)
+char *racoonprsaget_text (void)
{
- return prsatext;
+ return racoonprsatext;
}
/** Set the current line number.
* @param line_number
*
*/
-void prsaset_lineno (int line_number )
+void racoonprsaset_lineno (int line_number )
{
- prsalineno = line_number;
+ racoonprsalineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
- * @see prsa_switch_to_buffer
+ * @see racoonprsa_switch_to_buffer
*/
-void prsaset_in (FILE * in_str )
+void racoonprsaset_in (FILE * in_str )
{
- prsain = in_str ;
+ racoonprsain = in_str ;
}
-void prsaset_out (FILE * out_str )
+void racoonprsaset_out (FILE * out_str )
{
- prsaout = out_str ;
+ racoonprsaout = out_str ;
}
-int prsaget_debug (void)
+int racoonprsaget_debug (void)
{
- return prsa_flex_debug;
+ return racoonprsa_flex_debug;
}
-void prsaset_debug (int bdebug )
+void racoonprsaset_debug (int bdebug )
{
- prsa_flex_debug = bdebug ;
+ racoonprsa_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from prsalex_destroy(), so don't allocate here.
+ * This function is called from racoonprsalex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
@@ -2050,36 +2069,36 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- prsain = stdin;
- prsaout = stdout;
+ racoonprsain = stdin;
+ racoonprsaout = stdout;
#else
- prsain = (FILE *) 0;
- prsaout = (FILE *) 0;
+ racoonprsain = (FILE *) 0;
+ racoonprsaout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * prsalex_init()
+ * racoonprsalex_init()
*/
return 0;
}
-/* prsalex_destroy is for both reentrant and non-reentrant scanners. */
-int prsalex_destroy (void)
+/* racoonprsalex_destroy is for both reentrant and non-reentrant scanners. */
+int racoonprsalex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- prsa_delete_buffer(YY_CURRENT_BUFFER );
+ racoonprsa_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- prsapop_buffer_state();
+ racoonprsapop_buffer_state();
}
/* Destroy the stack itself. */
- prsafree((yy_buffer_stack) );
+ racoonprsafree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * prsalex() is called, initialization will occur. */
+ * racoonprsalex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2092,7 +2111,7 @@ int prsalex_destroy (void)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2101,7 +2120,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2109,12 +2128,12 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *prsaalloc (yy_size_t size )
+void *racoonprsaalloc (yy_size_t size )
{
return (void *) malloc( size );
}
-void *prsarealloc (void * ptr, yy_size_t size )
+void *racoonprsarealloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
@@ -2126,14 +2145,14 @@ void *prsarealloc (void * ptr, yy_size_t size )
return (void *) realloc( (char *) ptr, size );
}
-void prsafree (void * ptr )
+void racoonprsafree (void * ptr )
{
- free( (char *) ptr ); /* see prsarealloc() for (char *) cast */
+ free( (char *) ptr ); /* see racoonprsarealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 89 "prsa_tok.l"
+#line 93 "../../ipsec-tools/src/racoon/prsa_tok.l"
diff --git a/ipsec-tools/src/racoon/prsa_tok.l b/ipsec-tools/src/racoon/prsa_tok.l
index 83e3d141..3ebeac5e 100644
--- a/ipsec-tools/src/racoon/prsa_tok.l
+++ b/ipsec-tools/src/racoon/prsa_tok.l
@@ -39,6 +39,10 @@
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include "prsa_par.h"
+#ifdef __rtems__
+#define prsatext racoonprsatext
+#define prsalval racoonprsalval
+#endif /* __rtems__ */
extern int prsalex (void);
extern int prsa_cur_lineno;
diff --git a/ipsec-tools/src/racoon/prsa_tok_wrapper.c b/ipsec-tools/src/racoon/prsa_tok_wrapper.c
new file mode 100644
index 00000000..38653c9e
--- /dev/null
+++ b/ipsec-tools/src/racoon/prsa_tok_wrapper.c
@@ -0,0 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#include "prsa_tok.c"
+#include "rtems-bsd-racoon-prsa_tok_wrapper-data.h"
diff --git a/ipsec-tools/src/racoon/racoonctl.c b/ipsec-tools/src/racoon/racoonctl.c
index da28ecd7..5d5a7564 100644
--- a/ipsec-tools/src/racoon/racoonctl.c
+++ b/ipsec-tools/src/racoon/racoonctl.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: racoonctl.c,v 1.18 2010/11/12 09:08:26 tteras Exp $ */
/* Id: racoonctl.c,v 1.11 2006/04/06 17:06:25 manubsd Exp */
diff --git a/ipsec-tools/src/racoon/remoteconf.c b/ipsec-tools/src/racoon/remoteconf.c
index 04ae2687..bc91a294 100644
--- a/ipsec-tools/src/racoon/remoteconf.c
+++ b/ipsec-tools/src/racoon/remoteconf.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: remoteconf.c,v 1.26 2011/03/14 15:50:36 vanhu Exp $ */
/* Id: remoteconf.c,v 1.38 2006/05/06 15:52:44 manubsd Exp */
@@ -1246,3 +1252,6 @@ checkisakmpsa(pcheck_level, proposal, acceptable)
return NULL;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-remoteconf-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/rsalist.c b/ipsec-tools/src/racoon/rsalist.c
index f152c825..703b6587 100644
--- a/ipsec-tools/src/racoon/rsalist.c
+++ b/ipsec-tools/src/racoon/rsalist.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: rsalist.c,v 1.6 2011/03/14 15:50:36 vanhu Exp $ */
/* Id: rsalist.c,v 1.3 2004/11/08 12:04:23 ludvigm Exp */
@@ -273,3 +279,6 @@ rsa_try_check_rsasign(vchar_t *source, vchar_t *sig, struct genlist *list)
}
return NULL;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-rsalist-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-admin-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-admin-data.h
new file mode 100644
index 00000000..c025ec8c
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-admin-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* admin.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-algorithm-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-algorithm-data.h
new file mode 100644
index 00000000..5c3d43e2
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-algorithm-data.h
@@ -0,0 +1,12 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* algorithm.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct hash_algorithm oakley_hashdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct hmac_algorithm oakley_hmacdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct enc_algorithm oakley_encdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct enc_algorithm ipsec_encdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct hmac_algorithm ipsec_hmacdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct misc_algorithm ipsec_compdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct misc_algorithm oakley_authdef[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct dh_algorithm oakley_dhdef[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-backupsa-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-backupsa-data.h
new file mode 100644
index 00000000..056f4d04
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-backupsa-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* backupsa.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *format);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *strmon[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-cfparse_wrapper-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-cfparse_wrapper-data.h
new file mode 100644
index 00000000..b5a5e554
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-cfparse_wrapper-data.h
@@ -0,0 +1,11 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* cfparse_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int num2dhgroup[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct remoteconf *cur_rmconf);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int tmpalgtype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct sainfo *cur_sainfo);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int cur_algclass);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int oldloglevel);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static YYSTACKDATA yystack);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-cftoken_wrapper-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-cftoken_wrapper-data.h
new file mode 100644
index 00000000..42c6d646
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-cftoken_wrapper-data.h
@@ -0,0 +1,21 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* cftoken_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static size_t yy_buffer_stack_top);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static size_t yy_buffer_stack_max);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static YY_BUFFER_STATE *yy_buffer_stack);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char yy_hold_char);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static yy_size_t yy_n_chars);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern yy_size_t racoonyyleng);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *yy_c_buf_p);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_init);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_start);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_did_buffer_switch_on_eof);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static yy_state_type yy_last_accepting_state);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *yy_last_accepting_cpos);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_more_flag);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_more_len);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct include_stack incstack[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int incstackp);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_first_time);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-crypto_openssl-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-crypto_openssl-data.h
new file mode 100644
index 00000000..c39feb4f
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-crypto_openssl-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* crypto_openssl.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-data.h
new file mode 100644
index 00000000..3aaf0b3f
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-data.h
@@ -0,0 +1,90 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+/* admin.c */
+/* algorithm.c */
+/* backupsa.c */
+/* cfparse_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonyydebug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonyynerrs);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonyyerrflag);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonyychar);
+/* cftoken_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern FILE *racoonyyin);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern FILE *racoonyyout);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonyylineno);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonyy_flex_debug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern char *racoonyytext);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int yyerrorcount);
+/* crypto_openssl.c */
+/* dnssec.c */
+/* evt.c */
+/* genlist.c */
+/* getcertsbyname.c */
+/* grabmyaddr.c */
+/* gssapi.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int __gssapi_dUmMy);
+/* handler.c */
+/* ipsec_doi.c */
+/* isakmp_agg.c */
+/* isakmp_base.c */
+/* isakmp.c */
+/* isakmp_frag.c */
+/* isakmp_ident.c */
+/* isakmp_inf.c */
+/* isakmp_newg.c */
+/* isakmp_quick.c */
+/* localconf.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct localconf *lcconf);
+/* logger.c */
+/* main.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int dump_config);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int f_local);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int vflag);
+/* misc.c */
+/* sha2.c */
+/* nattraversal.c */
+/* oakley.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp768);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp1024);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp1536);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp2048);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp3072);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp4096);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp6144);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct dhgroup dh_modp8192);
+/* pfkey.c */
+/* plog.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern char *pname);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern u_int32_t loglevel);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int f_foreground);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int print_location);
+/* policy.c */
+/* privsep.c */
+/* proposal.c */
+/* prsa_par_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int prsa_cur_lineno);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern char *prsa_cur_fname);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern struct genlist *prsa_cur_list);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern enum rsa_key_type prsa_cur_type);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonprsadebug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonprsanerrs);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonprsaerrflag);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonprsachar);
+/* prsa_tok_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern FILE *racoonprsain);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern FILE *racoonprsaout);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonprsalineno);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern int racoonprsa_flex_debug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern char *racoonprsatext);
+/* remoteconf.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern char *script_names[]);
+/* rsalist.c */
+/* safefile.c */
+/* sainfo.c */
+/* schedule.c */
+/* session.c */
+/* sockmisc.c */
+/* str2val.c */
+/* strnames.c */
+/* vendorid.c */
+/* vmbuf.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-dnssec-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-dnssec-data.h
new file mode 100644
index 00000000..b1298c7e
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-dnssec-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* dnssec.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-evt-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-evt-data.h
new file mode 100644
index 00000000..a1553cad
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-evt-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* evt.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-genlist-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-genlist-data.h
new file mode 100644
index 00000000..dedd9ced
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-genlist-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* genlist.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-getcertsbyname-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-getcertsbyname-data.h
new file mode 100644
index 00000000..21830e6b
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-getcertsbyname-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* getcertsbyname.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-grabmyaddr-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-grabmyaddr-data.h
new file mode 100644
index 00000000..3effcfc6
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-grabmyaddr-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* grabmyaddr.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _myaddr_list_ configured);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _myaddr_list_ opened);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-gssapi-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-gssapi-data.h
new file mode 100644
index 00000000..0e4e8879
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-gssapi-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* gssapi.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-handler-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-handler-data.h
new file mode 100644
index 00000000..c9a2c87f
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-handler-data.h
@@ -0,0 +1,9 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* handler.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _ph1tree_ ph1tree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _ph2tree_ ph2tree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _ctdtree_ ctdtree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _rcptree_ rcptree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct sched sc_sweep);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-ipsec_doi-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-ipsec_doi-data.h
new file mode 100644
index 00000000..a3bf167d
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-ipsec_doi-data.h
@@ -0,0 +1,8 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* ipsec_doi.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int (*check_protocol[])(int ));
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int (*check_transform[])(int ));
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int (*check_attributes[])(struct isakmp_pl_t *));
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int rm_idtype2doi[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp-data.h
new file mode 100644
index 00000000..5a01d46c
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp-data.h
@@ -0,0 +1,7 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int (*ph1exchange[][2][12])(struct ph1handle *, vchar_t *));
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int (*ph2exchange[][2][11])(struct ph2handle *, vchar_t *));
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static u_char r_ck0[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_agg-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_agg-data.h
new file mode 100644
index 00000000..b9572cb8
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_agg-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_agg.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_base-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_base-data.h
new file mode 100644
index 00000000..44ab7379
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_base-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_base.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_frag-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_frag-data.h
new file mode 100644
index 00000000..35342513
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_frag-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_frag.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_ident-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_ident-data.h
new file mode 100644
index 00000000..c6c70251
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_ident-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_ident.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_inf-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_inf-data.h
new file mode 100644
index 00000000..957c63e2
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_inf-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_inf.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_newg-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_newg-data.h
new file mode 100644
index 00000000..6bffd929
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_newg-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_newg.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_quick-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_quick-data.h
new file mode 100644
index 00000000..a0d88d80
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-isakmp_quick-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* isakmp_quick.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-localconf-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-localconf-data.h
new file mode 100644
index 00000000..224c3f85
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-localconf-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* localconf.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int lc_sittype2doi[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int lc_doitype2doi[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-logger-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-logger-data.h
new file mode 100644
index 00000000..ea8aa8f8
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-logger-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* logger.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-main-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-main-data.h
new file mode 100644
index 00000000..a6d31dbf
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-main-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* main.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int loading_sa);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char version[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-misc-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-misc-data.h
new file mode 100644
index 00000000..b48f3786
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-misc-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* misc.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-namespace.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-namespace.h
new file mode 100644
index 00000000..521f9497
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-namespace.h
@@ -0,0 +1,763 @@
+/* generated by userspace-header-gen.py */
+/* admin.c */
+/* algorithm.c */
+#define algclass2doi _bsd_racoon_algclass2doi
+#define algtype2doi _bsd_racoon_algtype2doi
+#define check_keylen _bsd_racoon_check_keylen
+#define default_keylen _bsd_racoon_default_keylen
+#define alg_oakley_authdef_name _bsd_racoon_alg_oakley_authdef_name
+#define alg_oakley_authdef_doi _bsd_racoon_alg_oakley_authdef_doi
+#define alg_oakley_dhdef_name _bsd_racoon_alg_oakley_dhdef_name
+#define alg_oakley_dhdef_group _bsd_racoon_alg_oakley_dhdef_group
+#define alg_oakley_dhdef_doi _bsd_racoon_alg_oakley_dhdef_doi
+#define alg_oakley_dhdef_ok _bsd_racoon_alg_oakley_dhdef_ok
+#define alg_ipsec_compdef_doi _bsd_racoon_alg_ipsec_compdef_doi
+#define alg_ipsec_hmacdef_hashlen _bsd_racoon_alg_ipsec_hmacdef_hashlen
+#define alg_ipsec_hmacdef_doi _bsd_racoon_alg_ipsec_hmacdef_doi
+#define alg_ipsec_encdef_keylen _bsd_racoon_alg_ipsec_encdef_keylen
+#define alg_ipsec_encdef_doi _bsd_racoon_alg_ipsec_encdef_doi
+#define alg_oakley_encdef_encrypt _bsd_racoon_alg_oakley_encdef_encrypt
+#define alg_oakley_encdef_decrypt _bsd_racoon_alg_oakley_encdef_decrypt
+#define alg_oakley_encdef_name _bsd_racoon_alg_oakley_encdef_name
+#define alg_oakley_encdef_blocklen _bsd_racoon_alg_oakley_encdef_blocklen
+#define alg_oakley_encdef_keylen _bsd_racoon_alg_oakley_encdef_keylen
+#define alg_oakley_encdef_doi _bsd_racoon_alg_oakley_encdef_doi
+#define alg_oakley_encdef_ok _bsd_racoon_alg_oakley_encdef_ok
+#define alg_oakley_hmacdef_one _bsd_racoon_alg_oakley_hmacdef_one
+#define alg_oakley_hmacdef_doi _bsd_racoon_alg_oakley_hmacdef_doi
+#define alg_oakley_hashdef_one _bsd_racoon_alg_oakley_hashdef_one
+#define alg_oakley_hashdef_name _bsd_racoon_alg_oakley_hashdef_name
+#define alg_oakley_hashdef_hashlen _bsd_racoon_alg_oakley_hashdef_hashlen
+#define alg_oakley_hashdef_doi _bsd_racoon_alg_oakley_hashdef_doi
+#define alg_oakley_hashdef_ok _bsd_racoon_alg_oakley_hashdef_ok
+/* backupsa.c */
+#define backupsa_clean _bsd_racoon_backupsa_clean
+#define backupsa_from_file _bsd_racoon_backupsa_from_file
+#define backupsa_to_file _bsd_racoon_backupsa_to_file
+/* cfparse_wrapper.c */
+#define racoonyydebug _bsd_racoon_racoonyydebug
+#define racoonyynerrs _bsd_racoon_racoonyynerrs
+#define racoonyyerrflag _bsd_racoon_racoonyyerrflag
+#define racoonyychar _bsd_racoon_racoonyychar
+#define racoonyyval _bsd_racoon_racoonyyval
+#define racoonyylval _bsd_racoon_racoonyylval
+#define racoonyyparse _bsd_racoon_racoonyyparse
+#define cfreparse _bsd_racoon_cfreparse
+#define cfparse _bsd_racoon_cfparse
+#define flushspspec _bsd_racoon_flushspspec
+#define dupspspec_list _bsd_racoon_dupspspec_list
+/* cftoken_wrapper.c */
+#define racoonyyleng _bsd_racoon_racoonyyleng
+#define racoonyyin _bsd_racoon_racoonyyin
+#define racoonyyout _bsd_racoon_racoonyyout
+#define racoonyylineno _bsd_racoon_racoonyylineno
+#define racoonyy_flex_debug _bsd_racoon_racoonyy_flex_debug
+#define racoonyytext _bsd_racoon_racoonyytext
+#define yyerrorcount _bsd_racoon_yyerrorcount
+#define yycf_clean_buffer _bsd_racoon_yycf_clean_buffer
+#define yycf_init_buffer _bsd_racoon_yycf_init_buffer
+#define yycf_set_buffer _bsd_racoon_yycf_set_buffer
+#define yycf_switch_buffer _bsd_racoon_yycf_switch_buffer
+#define yywarn _bsd_racoon_yywarn
+#define racoonyyerror _bsd_racoon_racoonyyerror
+#define racoonyyfree _bsd_racoon_racoonyyfree
+#define racoonyyrealloc _bsd_racoon_racoonyyrealloc
+#define racoonyyalloc _bsd_racoon_racoonyyalloc
+#define racoonyylex_destroy _bsd_racoon_racoonyylex_destroy
+#define racoonyyset_debug _bsd_racoon_racoonyyset_debug
+#define racoonyyget_debug _bsd_racoon_racoonyyget_debug
+#define racoonyyset_out _bsd_racoon_racoonyyset_out
+#define racoonyyset_in _bsd_racoon_racoonyyset_in
+#define racoonyyset_lineno _bsd_racoon_racoonyyset_lineno
+#define racoonyyget_text _bsd_racoon_racoonyyget_text
+#define racoonyyget_leng _bsd_racoon_racoonyyget_leng
+#define racoonyyget_out _bsd_racoon_racoonyyget_out
+#define racoonyyget_in _bsd_racoon_racoonyyget_in
+#define racoonyyget_lineno _bsd_racoon_racoonyyget_lineno
+#define racoonyy_scan_bytes _bsd_racoon_racoonyy_scan_bytes
+#define racoonyy_scan_string _bsd_racoon_racoonyy_scan_string
+#define racoonyy_scan_buffer _bsd_racoon_racoonyy_scan_buffer
+#define racoonyypop_buffer_state _bsd_racoon_racoonyypop_buffer_state
+#define racoonyypush_buffer_state _bsd_racoon_racoonyypush_buffer_state
+#define racoonyy_flush_buffer _bsd_racoon_racoonyy_flush_buffer
+#define racoonyy_delete_buffer _bsd_racoon_racoonyy_delete_buffer
+#define racoonyy_create_buffer _bsd_racoon_racoonyy_create_buffer
+#define racoonyy_switch_to_buffer _bsd_racoon_racoonyy_switch_to_buffer
+#define racoonyyrestart _bsd_racoon_racoonyyrestart
+#define racoonyylex _bsd_racoon_racoonyylex
+/* crypto_openssl.c */
+#define eay_version _bsd_racoon_eay_version
+#define eay_random _bsd_racoon_eay_random
+#define bignum_pubkey2rsa _bsd_racoon_bignum_pubkey2rsa
+#define base64_pubkey2rsa _bsd_racoon_base64_pubkey2rsa
+#define base64_encode _bsd_racoon_base64_encode
+#define base64_decode _bsd_racoon_base64_decode
+#define eay_init _bsd_racoon_eay_init
+#define eay_bn2v _bsd_racoon_eay_bn2v
+#define eay_v2bn _bsd_racoon_eay_v2bn
+#define eay_dh_compute _bsd_racoon_eay_dh_compute
+#define eay_dh_generate _bsd_racoon_eay_dh_generate
+#define eay_set_random _bsd_racoon_eay_set_random
+#define eay_md5_hashlen _bsd_racoon_eay_md5_hashlen
+#define eay_md5_one _bsd_racoon_eay_md5_one
+#define eay_md5_final _bsd_racoon_eay_md5_final
+#define eay_md5_update _bsd_racoon_eay_md5_update
+#define eay_md5_init _bsd_racoon_eay_md5_init
+#define eay_sha1_hashlen _bsd_racoon_eay_sha1_hashlen
+#define eay_sha1_one _bsd_racoon_eay_sha1_one
+#define eay_sha1_final _bsd_racoon_eay_sha1_final
+#define eay_sha1_update _bsd_racoon_eay_sha1_update
+#define eay_sha1_init _bsd_racoon_eay_sha1_init
+#define eay_sha2_256_hashlen _bsd_racoon_eay_sha2_256_hashlen
+#define eay_sha2_256_one _bsd_racoon_eay_sha2_256_one
+#define eay_sha2_256_final _bsd_racoon_eay_sha2_256_final
+#define eay_sha2_256_update _bsd_racoon_eay_sha2_256_update
+#define eay_sha2_256_init _bsd_racoon_eay_sha2_256_init
+#define eay_sha2_384_hashlen _bsd_racoon_eay_sha2_384_hashlen
+#define eay_sha2_384_one _bsd_racoon_eay_sha2_384_one
+#define eay_sha2_384_final _bsd_racoon_eay_sha2_384_final
+#define eay_sha2_384_update _bsd_racoon_eay_sha2_384_update
+#define eay_sha2_384_init _bsd_racoon_eay_sha2_384_init
+#define eay_sha2_512_hashlen _bsd_racoon_eay_sha2_512_hashlen
+#define eay_sha2_512_one _bsd_racoon_eay_sha2_512_one
+#define eay_sha2_512_final _bsd_racoon_eay_sha2_512_final
+#define eay_sha2_512_update _bsd_racoon_eay_sha2_512_update
+#define eay_sha2_512_init _bsd_racoon_eay_sha2_512_init
+#define eay_hmacmd5_final _bsd_racoon_eay_hmacmd5_final
+#define eay_hmacmd5_update _bsd_racoon_eay_hmacmd5_update
+#define eay_hmacmd5_init _bsd_racoon_eay_hmacmd5_init
+#define eay_hmacmd5_one _bsd_racoon_eay_hmacmd5_one
+#define eay_hmacsha1_final _bsd_racoon_eay_hmacsha1_final
+#define eay_hmacsha1_update _bsd_racoon_eay_hmacsha1_update
+#define eay_hmacsha1_init _bsd_racoon_eay_hmacsha1_init
+#define eay_hmacsha1_one _bsd_racoon_eay_hmacsha1_one
+#define eay_hmacsha2_256_final _bsd_racoon_eay_hmacsha2_256_final
+#define eay_hmacsha2_256_update _bsd_racoon_eay_hmacsha2_256_update
+#define eay_hmacsha2_256_init _bsd_racoon_eay_hmacsha2_256_init
+#define eay_hmacsha2_256_one _bsd_racoon_eay_hmacsha2_256_one
+#define eay_hmacsha2_384_final _bsd_racoon_eay_hmacsha2_384_final
+#define eay_hmacsha2_384_update _bsd_racoon_eay_hmacsha2_384_update
+#define eay_hmacsha2_384_init _bsd_racoon_eay_hmacsha2_384_init
+#define eay_hmacsha2_384_one _bsd_racoon_eay_hmacsha2_384_one
+#define eay_hmacsha2_512_final _bsd_racoon_eay_hmacsha2_512_final
+#define eay_hmacsha2_512_update _bsd_racoon_eay_hmacsha2_512_update
+#define eay_hmacsha2_512_init _bsd_racoon_eay_hmacsha2_512_init
+#define eay_hmacsha2_512_one _bsd_racoon_eay_hmacsha2_512_one
+#define eay_null_keylen _bsd_racoon_eay_null_keylen
+#define eay_twofish_keylen _bsd_racoon_eay_twofish_keylen
+#define eay_kpdk_hashlen _bsd_racoon_eay_kpdk_hashlen
+#define eay_null_hashlen _bsd_racoon_eay_null_hashlen
+#define eay_camellia_keylen _bsd_racoon_eay_camellia_keylen
+#define eay_camellia_weakkey _bsd_racoon_eay_camellia_weakkey
+#define eay_camellia_decrypt _bsd_racoon_eay_camellia_decrypt
+#define eay_camellia_encrypt _bsd_racoon_eay_camellia_encrypt
+#define eay_aes_keylen _bsd_racoon_eay_aes_keylen
+#define eay_aes_weakkey _bsd_racoon_eay_aes_weakkey
+#define eay_aes_decrypt _bsd_racoon_eay_aes_decrypt
+#define eay_aes_encrypt _bsd_racoon_eay_aes_encrypt
+#define eay_cast_keylen _bsd_racoon_eay_cast_keylen
+#define eay_cast_weakkey _bsd_racoon_eay_cast_weakkey
+#define eay_cast_decrypt _bsd_racoon_eay_cast_decrypt
+#define eay_cast_encrypt _bsd_racoon_eay_cast_encrypt
+#define eay_3des_keylen _bsd_racoon_eay_3des_keylen
+#define eay_3des_weakkey _bsd_racoon_eay_3des_weakkey
+#define eay_3des_decrypt _bsd_racoon_eay_3des_decrypt
+#define eay_3des_encrypt _bsd_racoon_eay_3des_encrypt
+#define eay_bf_keylen _bsd_racoon_eay_bf_keylen
+#define eay_bf_weakkey _bsd_racoon_eay_bf_weakkey
+#define eay_bf_decrypt _bsd_racoon_eay_bf_decrypt
+#define eay_bf_encrypt _bsd_racoon_eay_bf_encrypt
+#define eay_idea_keylen _bsd_racoon_eay_idea_keylen
+#define eay_idea_weakkey _bsd_racoon_eay_idea_weakkey
+#define eay_idea_decrypt _bsd_racoon_eay_idea_decrypt
+#define eay_idea_encrypt _bsd_racoon_eay_idea_encrypt
+#define eay_des_keylen _bsd_racoon_eay_des_keylen
+#define eay_des_weakkey _bsd_racoon_eay_des_weakkey
+#define eay_des_decrypt _bsd_racoon_eay_des_decrypt
+#define eay_des_encrypt _bsd_racoon_eay_des_encrypt
+#define evp_keylen _bsd_racoon_evp_keylen
+#define evp_weakkey _bsd_racoon_evp_weakkey
+#define evp_crypt _bsd_racoon_evp_crypt
+#define eay_strerror _bsd_racoon_eay_strerror
+#define eay_rsa_verify _bsd_racoon_eay_rsa_verify
+#define eay_rsa_sign _bsd_racoon_eay_rsa_sign
+#define eay_get_rsasign _bsd_racoon_eay_get_rsasign
+#define eay_get_x509sign _bsd_racoon_eay_get_x509sign
+#define eay_get_pkcs1pubkey _bsd_racoon_eay_get_pkcs1pubkey
+#define eay_get_pkcs1privkey _bsd_racoon_eay_get_pkcs1privkey
+#define eay_check_rsasign _bsd_racoon_eay_check_rsasign
+#define eay_check_x509sign _bsd_racoon_eay_check_x509sign
+#define eay_get_x509cert _bsd_racoon_eay_get_x509cert
+#define eay_get_x509text _bsd_racoon_eay_get_x509text
+#define eay_get_x509asn1issuername _bsd_racoon_eay_get_x509asn1issuername
+#define eay_get_x509subjectaltname _bsd_racoon_eay_get_x509subjectaltname
+#define eay_get_x509asn1subjectname _bsd_racoon_eay_get_x509asn1subjectname
+#define eay_check_x509cert _bsd_racoon_eay_check_x509cert
+#define eay_cmp_asn1dn _bsd_racoon_eay_cmp_asn1dn
+#define eay_hex2asn1dn _bsd_racoon_eay_hex2asn1dn
+#define eay_str2asn1dn _bsd_racoon_eay_str2asn1dn
+/* dnssec.c */
+#define dnssec_getcert _bsd_racoon_dnssec_getcert
+/* evt.c */
+/* genlist.c */
+#define genlist_free _bsd_racoon_genlist_free
+#define genlist_next _bsd_racoon_genlist_next
+#define genlist_foreach _bsd_racoon_genlist_foreach
+#define genlist_append _bsd_racoon_genlist_append
+#define genlist_insert _bsd_racoon_genlist_insert
+#define genlist_init _bsd_racoon_genlist_init
+/* getcertsbyname.c */
+#define getcertsbyname _bsd_racoon_getcertsbyname
+#define freecertinfo _bsd_racoon_freecertinfo
+/* grabmyaddr.c */
+#define myaddr_close _bsd_racoon_myaddr_close
+#define myaddr_init _bsd_racoon_myaddr_init
+#define myaddr_init_lists _bsd_racoon_myaddr_init_lists
+#define myaddr_getsport _bsd_racoon_myaddr_getsport
+#define myaddr_getfd _bsd_racoon_myaddr_getfd
+#define myaddr_sync _bsd_racoon_myaddr_sync
+#define myaddr_listen _bsd_racoon_myaddr_listen
+#define myaddr_flush _bsd_racoon_myaddr_flush
+/* gssapi.c */
+#define __gssapi_dUmMy _bsd_racoon___gssapi_dUmMy
+/* handler.c */
+#define revalidate_ph12 _bsd_racoon_revalidate_ph12
+#define init_recvdpkt _bsd_racoon_init_recvdpkt
+#define add_recvdpkt _bsd_racoon_add_recvdpkt
+#define check_recvdpkt _bsd_racoon_check_recvdpkt
+#define initctdtree _bsd_racoon_initctdtree
+#define remcontacted _bsd_racoon_remcontacted
+#define inscontacted _bsd_racoon_inscontacted
+#define getcontacted _bsd_racoon_getcontacted
+#define unbindph12 _bsd_racoon_unbindph12
+#define bindph12 _bsd_racoon_bindph12
+#define deleteallph2 _bsd_racoon_deleteallph2
+#define flushph2 _bsd_racoon_flushph2
+#define initph2tree _bsd_racoon_initph2tree
+#define remph2 _bsd_racoon_remph2
+#define insph2 _bsd_racoon_insph2
+#define delph2 _bsd_racoon_delph2
+#define initph2 _bsd_racoon_initph2
+#define newph2 _bsd_racoon_newph2
+#define getph2bysaidx _bsd_racoon_getph2bysaidx
+#define getph2bysaddr _bsd_racoon_getph2bysaddr
+#define getph2byid _bsd_racoon_getph2byid
+#define getph2bymsgid _bsd_racoon_getph2bymsgid
+#define getph2byseq _bsd_racoon_getph2byseq
+#define enumph2 _bsd_racoon_enumph2
+#define ph1_rekey_enabled _bsd_racoon_ph1_rekey_enabled
+#define initph1tree _bsd_racoon_initph1tree
+#define flushph1 _bsd_racoon_flushph1
+#define remph1 _bsd_racoon_remph1
+#define insph1 _bsd_racoon_insph1
+#define delph1 _bsd_racoon_delph1
+#define newph1 _bsd_racoon_newph1
+#define dumpph1 _bsd_racoon_dumpph1
+#define migrate_dying_ph12 _bsd_racoon_migrate_dying_ph12
+#define migrate_ph12 _bsd_racoon_migrate_ph12
+#define resolveph1rmconf _bsd_racoon_resolveph1rmconf
+#define getph1 _bsd_racoon_getph1
+#define getph1byindex0 _bsd_racoon_getph1byindex0
+#define getph1byindex _bsd_racoon_getph1byindex
+#define enumph1 _bsd_racoon_enumph1
+/* ipsec_doi.c */
+#define doi2idtype _bsd_racoon_doi2idtype
+#define idtype2doi _bsd_racoon_idtype2doi
+#define ipsecdoi_authalg2trnsid _bsd_racoon_ipsecdoi_authalg2trnsid
+#define ipsecdoi_t2satrns _bsd_racoon_ipsecdoi_t2satrns
+#define ipsecdoi_id2str _bsd_racoon_ipsecdoi_id2str
+#define ipsecdoi_id2sockaddr _bsd_racoon_ipsecdoi_id2sockaddr
+#define ipsecdoi_sockrange2id _bsd_racoon_ipsecdoi_sockrange2id
+#define ipsecdoi_sockaddr2id _bsd_racoon_ipsecdoi_sockaddr2id
+#define ipsecdoi_setid2 _bsd_racoon_ipsecdoi_setid2
+#define set_identifier_qual _bsd_racoon_set_identifier_qual
+#define set_identifier _bsd_racoon_set_identifier
+#define ipsecdoi_setid1 _bsd_racoon_ipsecdoi_setid1
+#define ipsecdoi_checkid1 _bsd_racoon_ipsecdoi_checkid1
+#define ipsecdoi_chkcmpids _bsd_racoon_ipsecdoi_chkcmpids
+#define ipsecdoi_subnetisaddr_v6 _bsd_racoon_ipsecdoi_subnetisaddr_v6
+#define ipsecdoi_subnetisaddr_v4 _bsd_racoon_ipsecdoi_subnetisaddr_v4
+#define doi2ipproto _bsd_racoon_doi2ipproto
+#define ipproto2doi _bsd_racoon_ipproto2doi
+#define ipsecdoi_checkalgtypes _bsd_racoon_ipsecdoi_checkalgtypes
+#define ipsecdoi_get_defaultlifetime _bsd_racoon_ipsecdoi_get_defaultlifetime
+#define ipsecdoi_transportmode _bsd_racoon_ipsecdoi_transportmode
+#define ipsecdoi_setph2proposal _bsd_racoon_ipsecdoi_setph2proposal
+#define ipsecdoi_setph1proposal _bsd_racoon_ipsecdoi_setph1proposal
+#define ipsecdoi_parse_responder_lifetime _bsd_racoon_ipsecdoi_parse_responder_lifetime
+#define get_sabysaprop _bsd_racoon_get_sabysaprop
+#define ipsecdoi_updatespi _bsd_racoon_ipsecdoi_updatespi
+#define get_sabyproppair _bsd_racoon_get_sabyproppair
+#define get_proppair _bsd_racoon_get_proppair
+#define free_proppair _bsd_racoon_free_proppair
+#define ipsecdoi_checkph2proposal _bsd_racoon_ipsecdoi_checkph2proposal
+#define ipsecdoi_selectph2proposal _bsd_racoon_ipsecdoi_selectph2proposal
+#define ipsecdoi_checkph1proposal _bsd_racoon_ipsecdoi_checkph1proposal
+/* isakmp_agg.c */
+#define agg_r2send _bsd_racoon_agg_r2send
+#define agg_r2recv _bsd_racoon_agg_r2recv
+#define agg_r1send _bsd_racoon_agg_r1send
+#define agg_r1recv _bsd_racoon_agg_r1recv
+#define agg_i2send _bsd_racoon_agg_i2send
+#define agg_i2recv _bsd_racoon_agg_i2recv
+#define agg_i1send _bsd_racoon_agg_i1send
+/* isakmp_base.c */
+#define base_r2send _bsd_racoon_base_r2send
+#define base_r2recv _bsd_racoon_base_r2recv
+#define base_r1send _bsd_racoon_base_r1send
+#define base_r1recv _bsd_racoon_base_r1recv
+#define base_i3send _bsd_racoon_base_i3send
+#define base_i3recv _bsd_racoon_base_i3recv
+#define base_i2send _bsd_racoon_base_i2send
+#define base_i2recv _bsd_racoon_base_i2recv
+#define base_i1send _bsd_racoon_base_i1send
+/* isakmp.c */
+#define setscopeid _bsd_racoon_setscopeid
+#define delete_spd _bsd_racoon_delete_spd
+#define purge_remote _bsd_racoon_purge_remote
+#define script_exec _bsd_racoon_script_exec
+#define script_env_append _bsd_racoon_script_env_append
+#define script_hook _bsd_racoon_script_hook
+#define isakmp_plist_set_all _bsd_racoon_isakmp_plist_set_all
+#define isakmp_plist_append_full _bsd_racoon_isakmp_plist_append_full
+#define log_ph1established _bsd_racoon_log_ph1established
+#define copy_ph1addresses _bsd_racoon_copy_ph1addresses
+#define set_isakmp_payload _bsd_racoon_set_isakmp_payload
+#define set_isakmp_header2 _bsd_racoon_set_isakmp_header2
+#define set_isakmp_header1 _bsd_racoon_set_isakmp_header1
+#define isakmp_newmsgid2 _bsd_racoon_isakmp_newmsgid2
+#define isakmp_p2ph _bsd_racoon_isakmp_p2ph
+#define isakmp_newcookie _bsd_racoon_isakmp_newcookie
+#define isakmp_add_attr_l _bsd_racoon_isakmp_add_attr_l
+#define isakmp_add_attr_v _bsd_racoon_isakmp_add_attr_v
+#define isakmp_set_attr_l _bsd_racoon_isakmp_set_attr_l
+#define isakmp_set_attr_v _bsd_racoon_isakmp_set_attr_v
+#define isakmp_chkph1there _bsd_racoon_isakmp_chkph1there
+#define isakmp_chkph1there_stub _bsd_racoon_isakmp_chkph1there_stub
+#define isakmp_post_getspi _bsd_racoon_isakmp_post_getspi
+#define isakmp_get_sainfo _bsd_racoon_isakmp_get_sainfo
+#define isakmp_post_acquire _bsd_racoon_isakmp_post_acquire
+#define isakmp_ph2delete _bsd_racoon_isakmp_ph2delete
+#define isakmp_ph2delete_stub _bsd_racoon_isakmp_ph2delete_stub
+#define isakmp_ph2expire _bsd_racoon_isakmp_ph2expire
+#define isakmp_ph2expire_stub _bsd_racoon_isakmp_ph2expire_stub
+#define isakmp_ph1delete _bsd_racoon_isakmp_ph1delete
+#define isakmp_ph1delete_stub _bsd_racoon_isakmp_ph1delete_stub
+#define isakmp_ph1expire _bsd_racoon_isakmp_ph1expire
+#define isakmp_ph1expire_stub _bsd_racoon_isakmp_ph1expire_stub
+#define isakmp_ph1dying _bsd_racoon_isakmp_ph1dying
+#define isakmp_ph1dying_stub _bsd_racoon_isakmp_ph1dying_stub
+#define isakmp_ph2send _bsd_racoon_isakmp_ph2send
+#define isakmp_ph1send _bsd_racoon_isakmp_ph1send
+#define isakmp_send _bsd_racoon_isakmp_send
+#define isakmp_close _bsd_racoon_isakmp_close
+#define isakmp_open _bsd_racoon_isakmp_open
+#define isakmp_pindex _bsd_racoon_isakmp_pindex
+#define isakmp_init _bsd_racoon_isakmp_init
+#define isakmp_parse _bsd_racoon_isakmp_parse
+#define isakmp_parsewoh _bsd_racoon_isakmp_parsewoh
+#define isakmp_ph1begin_i _bsd_racoon_isakmp_ph1begin_i
+/* isakmp_frag.c */
+#define isakmp_frag_addcap _bsd_racoon_isakmp_frag_addcap
+#define isakmp_frag_reassembly _bsd_racoon_isakmp_frag_reassembly
+#define isakmp_frag_extract _bsd_racoon_isakmp_frag_extract
+#define vendorid_frag_cap _bsd_racoon_vendorid_frag_cap
+#define isakmp_sendfrags _bsd_racoon_isakmp_sendfrags
+/* isakmp_ident.c */
+#define ident_r3send _bsd_racoon_ident_r3send
+#define ident_r3recv _bsd_racoon_ident_r3recv
+#define ident_r2send _bsd_racoon_ident_r2send
+#define ident_r2recv _bsd_racoon_ident_r2recv
+#define ident_r1send _bsd_racoon_ident_r1send
+#define ident_r1recv _bsd_racoon_ident_r1recv
+#define ident_i4send _bsd_racoon_ident_i4send
+#define ident_i4recv _bsd_racoon_ident_i4recv
+#define ident_i3send _bsd_racoon_ident_i3send
+#define ident_i3recv _bsd_racoon_ident_i3recv
+#define ident_i2send _bsd_racoon_ident_i2send
+#define ident_i2recv _bsd_racoon_ident_i2recv
+#define ident_i1send _bsd_racoon_ident_i1send
+/* isakmp_inf.c */
+#define isakmp_sched_r_u _bsd_racoon_isakmp_sched_r_u
+#define isakmp_info_recv_initialcontact _bsd_racoon_isakmp_info_recv_initialcontact
+#define purge_ipsec_spi _bsd_racoon_purge_ipsec_spi
+#define isakmp_add_pl_n _bsd_racoon_isakmp_add_pl_n
+#define isakmp_info_send_common _bsd_racoon_isakmp_info_send_common
+#define isakmp_info_send_n2 _bsd_racoon_isakmp_info_send_n2
+#define isakmp_info_send_n1 _bsd_racoon_isakmp_info_send_n1
+#define isakmp_info_send_nx _bsd_racoon_isakmp_info_send_nx
+#define isakmp_info_send_d2 _bsd_racoon_isakmp_info_send_d2
+#define isakmp_info_send_d1 _bsd_racoon_isakmp_info_send_d1
+#define isakmp_log_notify _bsd_racoon_isakmp_log_notify
+#define isakmp_info_recv _bsd_racoon_isakmp_info_recv
+/* isakmp_newg.c */
+#define isakmp_newgroup_r _bsd_racoon_isakmp_newgroup_r
+/* isakmp_quick.c */
+#define quick_r3prep _bsd_racoon_quick_r3prep
+#define tunnel_mode_prop _bsd_racoon_tunnel_mode_prop
+#define quick_r3send _bsd_racoon_quick_r3send
+#define quick_r3recv _bsd_racoon_quick_r3recv
+#define quick_r2send _bsd_racoon_quick_r2send
+#define quick_r1prep _bsd_racoon_quick_r1prep
+#define quick_r1recv _bsd_racoon_quick_r1recv
+#define quick_i3recv _bsd_racoon_quick_i3recv
+#define quick_i2send _bsd_racoon_quick_i2send
+#define quick_i2recv _bsd_racoon_quick_i2recv
+#define quick_i1send _bsd_racoon_quick_i1send
+#define quick_i1prep _bsd_racoon_quick_i1prep
+/* localconf.c */
+#define lcconf _bsd_racoon_lcconf
+#define save_params _bsd_racoon_save_params
+#define restore_params _bsd_racoon_restore_params
+#define doitype2doi _bsd_racoon_doitype2doi
+#define sittype2doi _bsd_racoon_sittype2doi
+#define getpathname _bsd_racoon_getpathname
+#define getpsk _bsd_racoon_getpsk
+#define getpskbyaddr _bsd_racoon_getpskbyaddr
+#define getpskbyname _bsd_racoon_getpskbyname
+#define flushlcconf _bsd_racoon_flushlcconf
+#define initlcconf _bsd_racoon_initlcconf
+/* logger.c */
+#define log_free _bsd_racoon_log_free
+#define log_close _bsd_racoon_log_close
+#define log_vaprint _bsd_racoon_log_vaprint
+#define log_vprint _bsd_racoon_log_vprint
+#define log_print _bsd_racoon_log_print
+#define log_add _bsd_racoon_log_add
+#define log_open _bsd_racoon_log_open
+/* main.c */
+#define dump_config _bsd_racoon_dump_config
+#define f_local _bsd_racoon_f_local
+#define vflag _bsd_racoon_vflag
+/* misc.c */
+#define timedelta _bsd_racoon_timedelta
+#define close_on_exec _bsd_racoon_close_on_exec
+#define getfsize _bsd_racoon_getfsize
+#define debug_location _bsd_racoon_debug_location
+#define bit2str _bsd_racoon_bit2str
+#define racoon_hexdump _bsd_racoon_racoon_hexdump
+/* sha2.c */
+#define EVP_sha2_512 _bsd_racoon_EVP_sha2_512
+#define EVP_sha2_384 _bsd_racoon_EVP_sha2_384
+#define EVP_sha2_256 _bsd_racoon_EVP_sha2_256
+/* nattraversal.c */
+#define isakmp_plist_append_natt_vids _bsd_racoon_isakmp_plist_append_natt_vids
+#define natt_enabled_in_rmconf _bsd_racoon_natt_enabled_in_rmconf
+#define natt_keepalive_remove _bsd_racoon_natt_keepalive_remove
+#define natt_keepalive_add_ph1 _bsd_racoon_natt_keepalive_add_ph1
+#define natt_keepalive_add _bsd_racoon_natt_keepalive_add
+#define natt_keepalive_init _bsd_racoon_natt_keepalive_init
+#define natt_handle_vendorid _bsd_racoon_natt_handle_vendorid
+#define natt_float_ports _bsd_racoon_natt_float_ports
+#define natt_fill_options _bsd_racoon_natt_fill_options
+#define natt_udp_encap _bsd_racoon_natt_udp_encap
+#define natt_compare_addr_hash _bsd_racoon_natt_compare_addr_hash
+#define natt_hash_addr _bsd_racoon_natt_hash_addr
+#define natt_vendorid _bsd_racoon_natt_vendorid
+/* oakley.c */
+#define dh_modp768 _bsd_racoon_dh_modp768
+#define dh_modp1024 _bsd_racoon_dh_modp1024
+#define dh_modp1536 _bsd_racoon_dh_modp1536
+#define dh_modp2048 _bsd_racoon_dh_modp2048
+#define dh_modp3072 _bsd_racoon_dh_modp3072
+#define dh_modp4096 _bsd_racoon_dh_modp4096
+#define dh_modp6144 _bsd_racoon_dh_modp6144
+#define dh_modp8192 _bsd_racoon_dh_modp8192
+#define oakley_do_encrypt _bsd_racoon_oakley_do_encrypt
+#define oakley_do_decrypt _bsd_racoon_oakley_do_decrypt
+#define oakley_delivm _bsd_racoon_oakley_delivm
+#define oakley_newiv2 _bsd_racoon_oakley_newiv2
+#define oakley_newiv _bsd_racoon_oakley_newiv
+#define oakley_compute_enckey _bsd_racoon_oakley_compute_enckey
+#define oakley_skeyid_dae _bsd_racoon_oakley_skeyid_dae
+#define oakley_skeyid _bsd_racoon_oakley_skeyid
+#define oakley_needcr _bsd_racoon_oakley_needcr
+#define oakley_checkcr _bsd_racoon_oakley_checkcr
+#define oakley_append_cr _bsd_racoon_oakley_append_cr
+#define oakley_savecr _bsd_racoon_oakley_savecr
+#define oakley_savecert _bsd_racoon_oakley_savecert
+#define oakley_getsign _bsd_racoon_oakley_getsign
+#define oakley_getmycert _bsd_racoon_oakley_getmycert
+#define oakley_validate_auth _bsd_racoon_oakley_validate_auth
+#define oakley_ph1hash_base_r _bsd_racoon_oakley_ph1hash_base_r
+#define oakley_ph1hash_base_i _bsd_racoon_oakley_ph1hash_base_i
+#define oakley_ph1hash_common _bsd_racoon_oakley_ph1hash_common
+#define oakley_compute_hash1 _bsd_racoon_oakley_compute_hash1
+#define oakley_compute_hash3 _bsd_racoon_oakley_compute_hash3
+#define oakley_compute_keymat _bsd_racoon_oakley_compute_keymat
+#define oakley_hash _bsd_racoon_oakley_hash
+#define oakley_prf _bsd_racoon_oakley_prf
+#define oakley_setdhgroup _bsd_racoon_oakley_setdhgroup
+#define oakley_dh_generate _bsd_racoon_oakley_dh_generate
+#define oakley_dh_compute _bsd_racoon_oakley_dh_compute
+#define oakley_dhgrp_free _bsd_racoon_oakley_dhgrp_free
+#define oakley_dhinit _bsd_racoon_oakley_dhinit
+#define oakley_get_defaultlifetime _bsd_racoon_oakley_get_defaultlifetime
+#define oakley_get_certtype _bsd_racoon_oakley_get_certtype
+/* pfkey.c */
+#define sadbsecas2str _bsd_racoon_sadbsecas2str
+#define pk_getseq _bsd_racoon_pk_getseq
+#define pk_checkalg _bsd_racoon_pk_checkalg
+#define pk_sendeacquire _bsd_racoon_pk_sendeacquire
+#define pk_sendspddelete _bsd_racoon_pk_sendspddelete
+#define pk_sendspdadd2 _bsd_racoon_pk_sendspdadd2
+#define pk_sendspdupdate2 _bsd_racoon_pk_sendspdupdate2
+#define pk_sendadd _bsd_racoon_pk_sendadd
+#define pk_sendupdate _bsd_racoon_pk_sendupdate
+#define pk_sendgetspi _bsd_racoon_pk_sendgetspi
+#define pfkey_convertfromipsecdoi _bsd_racoon_pfkey_convertfromipsecdoi
+#define pk_fixup_sa_addresses _bsd_racoon_pk_fixup_sa_addresses
+#define pfkey2ipsecdoi_mode _bsd_racoon_pfkey2ipsecdoi_mode
+#define ipsecdoi2pfkey_mode _bsd_racoon_ipsecdoi2pfkey_mode
+#define pfkey2ipsecdoi_proto _bsd_racoon_pfkey2ipsecdoi_proto
+#define ipsecdoi2pfkey_proto _bsd_racoon_ipsecdoi2pfkey_proto
+#define pfkey_reload _bsd_racoon_pfkey_reload
+#define pfkey_init _bsd_racoon_pfkey_init
+#define pfkey_dump_sadb _bsd_racoon_pfkey_dump_sadb
+/* plog.c */
+#define pname _bsd_racoon_pname
+#define loglevel _bsd_racoon_loglevel
+#define f_foreground _bsd_racoon_f_foreground
+#define print_location _bsd_racoon_print_location
+#define binsanitize _bsd_racoon_binsanitize
+#define plogset _bsd_racoon_plogset
+#define ploginit _bsd_racoon_ploginit
+#define plogdump _bsd_racoon_plogdump
+#define plogv _bsd_racoon_plogv
+#define _plog _bsd_racoon__plog
+/* policy.c */
+#define spidx2str _bsd_racoon_spidx2str
+#define newipsecreq _bsd_racoon_newipsecreq
+#define initsp _bsd_racoon_initsp
+#define flushsp _bsd_racoon_flushsp
+#define remsp _bsd_racoon_remsp
+#define inssp _bsd_racoon_inssp
+#define delsp_bothdir _bsd_racoon_delsp_bothdir
+#define delsp _bsd_racoon_delsp
+#define newsp _bsd_racoon_newsp
+#define cmpspidxwild _bsd_racoon_cmpspidxwild
+#define cmpspidxstrict _bsd_racoon_cmpspidxstrict
+#define getspbyspid _bsd_racoon_getspbyspid
+#define getsp_r _bsd_racoon_getsp_r
+#define getsp _bsd_racoon_getsp
+/* privsep.c */
+#define privsep_setsockopt _bsd_racoon_privsep_setsockopt
+#define privsep_bind _bsd_racoon_privsep_bind
+#define privsep_socket _bsd_racoon_privsep_socket
+#define privsep_getpsk _bsd_racoon_privsep_getpsk
+#define privsep_script_exec _bsd_racoon_privsep_script_exec
+#define privsep_eay_get_pkcs1privkey _bsd_racoon_privsep_eay_get_pkcs1privkey
+#define privsep_init _bsd_racoon_privsep_init
+/* proposal.c */
+#define set_proposal_from_proposal _bsd_racoon_set_proposal_from_proposal
+#define set_proposal_from_policy _bsd_racoon_set_proposal_from_policy
+#define print_proppair _bsd_racoon_print_proppair
+#define print_proppair0 _bsd_racoon_print_proppair0
+#define printsatrns _bsd_racoon_printsatrns
+#define printsaproto _bsd_racoon_printsaproto
+#define printsaprop0 _bsd_racoon_printsaprop0
+#define printsaprop _bsd_racoon_printsaprop
+#define flushsatrns _bsd_racoon_flushsatrns
+#define flushsaproto _bsd_racoon_flushsaproto
+#define flushsaprop _bsd_racoon_flushsaprop
+#define aproppair2saprop _bsd_racoon_aproppair2saprop
+#define set_satrnsbysainfo _bsd_racoon_set_satrnsbysainfo
+#define cmpsatrns _bsd_racoon_cmpsatrns
+#define cmpsaprop _bsd_racoon_cmpsaprop
+#define cmpsaprop_alloc _bsd_racoon_cmpsaprop_alloc
+#define inssatrns _bsd_racoon_inssatrns
+#define newsatrns _bsd_racoon_newsatrns
+#define inssaprotorev _bsd_racoon_inssaprotorev
+#define inssaproto _bsd_racoon_inssaproto
+#define inssaprop _bsd_racoon_inssaprop
+#define newsaproto _bsd_racoon_newsaproto
+#define newsaprop _bsd_racoon_newsaprop
+/* prsa_par_wrapper.c */
+#define prsa_cur_lineno _bsd_racoon_prsa_cur_lineno
+#define prsa_cur_fname _bsd_racoon_prsa_cur_fname
+#define prsa_cur_list _bsd_racoon_prsa_cur_list
+#define prsa_cur_type _bsd_racoon_prsa_cur_type
+#define racoonprsadebug _bsd_racoon_racoonprsadebug
+#define racoonprsanerrs _bsd_racoon_racoonprsanerrs
+#define racoonprsaerrflag _bsd_racoon_racoonprsaerrflag
+#define racoonprsachar _bsd_racoon_racoonprsachar
+#define racoonprsaval _bsd_racoon_racoonprsaval
+#define racoonprsalval _bsd_racoon_racoonprsalval
+#define racoonprsaparse _bsd_racoon_racoonprsaparse
+#define prsa_parse_file _bsd_racoon_prsa_parse_file
+#define racoonprsawrap _bsd_racoon_racoonprsawrap
+#define prsawarning _bsd_racoon_prsawarning
+#define racoonprsaerror _bsd_racoon_racoonprsaerror
+/* prsa_tok_wrapper.c */
+#define racoonprsaleng _bsd_racoon_racoonprsaleng
+#define racoonprsain _bsd_racoon_racoonprsain
+#define racoonprsaout _bsd_racoon_racoonprsaout
+#define racoonprsalineno _bsd_racoon_racoonprsalineno
+#define racoonprsa_flex_debug _bsd_racoon_racoonprsa_flex_debug
+#define racoonprsatext _bsd_racoon_racoonprsatext
+#define racoonprsafree _bsd_racoon_racoonprsafree
+#define racoonprsarealloc _bsd_racoon_racoonprsarealloc
+#define racoonprsaalloc _bsd_racoon_racoonprsaalloc
+#define racoonprsalex_destroy _bsd_racoon_racoonprsalex_destroy
+#define racoonprsaset_debug _bsd_racoon_racoonprsaset_debug
+#define racoonprsaget_debug _bsd_racoon_racoonprsaget_debug
+#define racoonprsaset_out _bsd_racoon_racoonprsaset_out
+#define racoonprsaset_in _bsd_racoon_racoonprsaset_in
+#define racoonprsaset_lineno _bsd_racoon_racoonprsaset_lineno
+#define racoonprsaget_text _bsd_racoon_racoonprsaget_text
+#define racoonprsaget_leng _bsd_racoon_racoonprsaget_leng
+#define racoonprsaget_out _bsd_racoon_racoonprsaget_out
+#define racoonprsaget_in _bsd_racoon_racoonprsaget_in
+#define racoonprsaget_lineno _bsd_racoon_racoonprsaget_lineno
+#define racoonprsa_scan_bytes _bsd_racoon_racoonprsa_scan_bytes
+#define racoonprsa_scan_string _bsd_racoon_racoonprsa_scan_string
+#define racoonprsa_scan_buffer _bsd_racoon_racoonprsa_scan_buffer
+#define racoonprsapop_buffer_state _bsd_racoon_racoonprsapop_buffer_state
+#define racoonprsapush_buffer_state _bsd_racoon_racoonprsapush_buffer_state
+#define racoonprsa_flush_buffer _bsd_racoon_racoonprsa_flush_buffer
+#define racoonprsa_delete_buffer _bsd_racoon_racoonprsa_delete_buffer
+#define racoonprsa_create_buffer _bsd_racoon_racoonprsa_create_buffer
+#define racoonprsa_switch_to_buffer _bsd_racoon_racoonprsa_switch_to_buffer
+#define racoonprsarestart _bsd_racoon_racoonprsarestart
+#define racoonprsalex _bsd_racoon_racoonprsalex
+/* remoteconf.c */
+#define script_names _bsd_racoon_script_names
+#define checkisakmpsa _bsd_racoon_checkisakmpsa
+#define dupisakmpsa _bsd_racoon_dupisakmpsa
+#define script_path_add _bsd_racoon_script_path_add
+#define newidspec _bsd_racoon_newidspec
+#define dumprmconf _bsd_racoon_dumprmconf
+#define insisakmpsa _bsd_racoon_insisakmpsa
+#define newisakmpsa _bsd_racoon_newisakmpsa
+#define check_etypeok _bsd_racoon_check_etypeok
+#define rmconf_finish_reload _bsd_racoon_rmconf_finish_reload
+#define rmconf_start_reload _bsd_racoon_rmconf_start_reload
+#define initrmconf _bsd_racoon_initrmconf
+#define flushrmconf _bsd_racoon_flushrmconf
+#define remrmconf _bsd_racoon_remrmconf
+#define insrmconf _bsd_racoon_insrmconf
+#define deletypes _bsd_racoon_deletypes
+#define dupetypes _bsd_racoon_dupetypes
+#define delisakmpsa _bsd_racoon_delisakmpsa
+#define delrmconf _bsd_racoon_delrmconf
+#define duprmconf_finish _bsd_racoon_duprmconf_finish
+#define duprmconf_shallow _bsd_racoon_duprmconf_shallow
+#define duprsa _bsd_racoon_duprsa
+#define dupidvl _bsd_racoon_dupidvl
+#define newrmconf _bsd_racoon_newrmconf
+#define getrmconf_by_name _bsd_racoon_getrmconf_by_name
+#define getrmconf_by_ph1 _bsd_racoon_getrmconf_by_ph1
+#define getrmconf _bsd_racoon_getrmconf
+#define enumrmconf _bsd_racoon_enumrmconf
+#define rmconf_selector_from_ph1 _bsd_racoon_rmconf_selector_from_ph1
+#define rmconf_match_identity _bsd_racoon_rmconf_match_identity
+/* rsalist.c */
+#define rsa_try_check_rsasign _bsd_racoon_rsa_try_check_rsasign
+#define rsa_parse_file _bsd_racoon_rsa_parse_file
+#define rsa_lookup_keys _bsd_racoon_rsa_lookup_keys
+#define rsa_list_count _bsd_racoon_rsa_list_count
+#define rsa_key_dump _bsd_racoon_rsa_key_dump
+#define rsa_key_free _bsd_racoon_rsa_key_free
+#define rsa_key_dup _bsd_racoon_rsa_key_dup
+#define rsa_key_insert _bsd_racoon_rsa_key_insert
+/* safefile.c */
+#define safefile _bsd_racoon_safefile
+/* sainfo.c */
+#define save_sainfotree_restore _bsd_racoon_save_sainfotree_restore
+#define sainfo_finish_reload _bsd_racoon_sainfo_finish_reload
+#define sainfo_start_reload _bsd_racoon_sainfo_start_reload
+#define sainfo2str _bsd_racoon_sainfo2str
+#define inssainfoalg _bsd_racoon_inssainfoalg
+#define delsainfoalg _bsd_racoon_delsainfoalg
+#define newsainfoalg _bsd_racoon_newsainfoalg
+#define initsainfo _bsd_racoon_initsainfo
+#define flushsainfo _bsd_racoon_flushsainfo
+#define remsainfo _bsd_racoon_remsainfo
+#define inssainfo _bsd_racoon_inssainfo
+#define prisainfo _bsd_racoon_prisainfo
+#define delsainfo _bsd_racoon_delsainfo
+#define newsainfo _bsd_racoon_newsainfo
+#define getsainfo _bsd_racoon_getsainfo
+/* schedule.c */
+#define sched_init _bsd_racoon_sched_init
+#define sched_dump _bsd_racoon_sched_dump
+#define sched_cancel _bsd_racoon_sched_cancel
+#define sched_schedule _bsd_racoon_sched_schedule
+#define schedular _bsd_racoon_schedular
+#define sched_monotonic_to_time_t _bsd_racoon_sched_monotonic_to_time_t
+#define sched_get_monotonic_time _bsd_racoon_sched_get_monotonic_time
+/* session.c */
+#define signal_handler _bsd_racoon_signal_handler
+#define session _bsd_racoon_session
+#define unmonitor_fd _bsd_racoon_unmonitor_fd
+#define monitor_fd _bsd_racoon_monitor_fd
+/* sockmisc.c */
+#define set_port _bsd_racoon_set_port
+#define get_port_ptr _bsd_racoon_get_port_ptr
+#define extract_port _bsd_racoon_extract_port
+#define naddr_score _bsd_racoon_naddr_score
+#define mask_sockaddr _bsd_racoon_mask_sockaddr
+#define str2saddr _bsd_racoon_str2saddr
+#define saddr2str_fromto _bsd_racoon_saddr2str_fromto
+#define naddrwop2str_fromto _bsd_racoon_naddrwop2str_fromto
+#define naddrwop2str _bsd_racoon_naddrwop2str
+#define saddrwop2str _bsd_racoon_saddrwop2str
+#define saddr2str _bsd_racoon_saddr2str
+#define dupsaddr _bsd_racoon_dupsaddr
+#define newsaddr _bsd_racoon_newsaddr
+#define setsockopt_bypass _bsd_racoon_setsockopt_bypass
+#define sendfromto _bsd_racoon_sendfromto
+#define recvfromto _bsd_racoon_recvfromto
+#define getlocaladdr _bsd_racoon_getlocaladdr
+#define cmpsaddr _bsd_racoon_cmpsaddr
+/* str2val.c */
+#define str2val _bsd_racoon_str2val
+#define val2str _bsd_racoon_val2str
+/* strnames.c */
+#define s_switch _bsd_racoon_s_switch
+#define s_idtype _bsd_racoon_s_idtype
+#define s_etype _bsd_racoon_s_etype
+#define s_doi _bsd_racoon_s_doi
+#define s_proto _bsd_racoon_s_proto
+#define s_direction _bsd_racoon_s_direction
+#define s_pfkey_satype _bsd_racoon_s_pfkey_satype
+#define s_pfkey_type _bsd_racoon_s_pfkey_type
+#define s_algtype _bsd_racoon_s_algtype
+#define s_algclass _bsd_racoon_s_algclass
+#define s_ipsec_level _bsd_racoon_s_ipsec_level
+#define s_oakley_attr_v _bsd_racoon_s_oakley_attr_v
+#define s_attr_isakmp_ltype _bsd_racoon_s_attr_isakmp_ltype
+#define s_attr_isakmp_group _bsd_racoon_s_attr_isakmp_group
+#define s_attr_isakmp_desc _bsd_racoon_s_attr_isakmp_desc
+#define s_oakley_attr_method _bsd_racoon_s_oakley_attr_method
+#define s_attr_isakmp_hash _bsd_racoon_s_attr_isakmp_hash
+#define s_attr_isakmp_enc _bsd_racoon_s_attr_isakmp_enc
+#define s_oakley_attr _bsd_racoon_s_oakley_attr
+#define s_ipsecdoi_ident _bsd_racoon_s_ipsecdoi_ident
+#define s_ipsecdoi_attr_v _bsd_racoon_s_ipsecdoi_attr_v
+#define s_ipsecdoi_auth _bsd_racoon_s_ipsecdoi_auth
+#define s_ipsecdoi_encmode _bsd_racoon_s_ipsecdoi_encmode
+#define s_ipsecdoi_ltype _bsd_racoon_s_ipsecdoi_ltype
+#define s_ipsecdoi_attr _bsd_racoon_s_ipsecdoi_attr
+#define s_ipsecdoi_trns _bsd_racoon_s_ipsecdoi_trns
+#define s_ipsecdoi_trns_ipcomp _bsd_racoon_s_ipsecdoi_trns_ipcomp
+#define s_ipsecdoi_trns_esp _bsd_racoon_s_ipsecdoi_trns_esp
+#define s_ipsecdoi_trns_ah _bsd_racoon_s_ipsecdoi_trns_ah
+#define s_ipsecdoi_trns_isakmp _bsd_racoon_s_ipsecdoi_trns_isakmp
+#define s_ipsecdoi_proto _bsd_racoon_s_ipsecdoi_proto
+#define s_isakmp_nptype _bsd_racoon_s_isakmp_nptype
+#define s_isakmp_notify_msg _bsd_racoon_s_isakmp_notify_msg
+#define s_isakmp_etype _bsd_racoon_s_isakmp_etype
+#define s_isakmp_certtype _bsd_racoon_s_isakmp_certtype
+#define s_isakmp_state _bsd_racoon_s_isakmp_state
+#define num2str _bsd_racoon_num2str
+/* vendorid.c */
+#define handle_vendorid _bsd_racoon_handle_vendorid
+#define set_vendorid _bsd_racoon_set_vendorid
+#define compute_vendorids _bsd_racoon_compute_vendorids
+#define vid_string_by_id _bsd_racoon_vid_string_by_id
+/* vmbuf.c */
+#define vdup _bsd_racoon_vdup
+#define vfree _bsd_racoon_vfree
+#define vrealloc _bsd_racoon_vrealloc
+#define vmalloc _bsd_racoon_vmalloc
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-nattraversal-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-nattraversal-data.h
new file mode 100644
index 00000000..f939c807
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-nattraversal-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* nattraversal.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _natt_ka_addrs ka_tree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct sched sc_natt);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-oakley-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-oakley-data.h
new file mode 100644
index 00000000..fd8a3073
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-oakley-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* oakley.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-pfkey-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-pfkey-data.h
new file mode 100644
index 00000000..a1042362
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-pfkey-data.h
@@ -0,0 +1,5 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* pfkey.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int (*pkrecvf[])(caddr_t *));
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-plog-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-plog-data.h
new file mode 100644
index 00000000..cebd3ae4
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-plog-data.h
@@ -0,0 +1,7 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* plog.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct log *logp);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *logfile);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct plogtags ptab[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-policy-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-policy-data.h
new file mode 100644
index 00000000..3e50618d
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-policy-data.h
@@ -0,0 +1,5 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* policy.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _sptree sptree);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-privsep-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-privsep-data.h
new file mode 100644
index 00000000..196a0314
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-privsep-data.h
@@ -0,0 +1,5 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* privsep.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int privsep_sock[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-proposal-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-proposal-data.h
new file mode 100644
index 00000000..910c4470
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-proposal-data.h
@@ -0,0 +1,5 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* proposal.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static uint g_nextreqid);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_par_wrapper-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_par_wrapper-data.h
new file mode 100644
index 00000000..1bed6b3c
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_par_wrapper-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* prsa_par_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static RSA *rsa_cur);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static YYSTACKDATA yystack);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_tok_wrapper-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_tok_wrapper-data.h
new file mode 100644
index 00000000..e40f4cf4
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-prsa_tok_wrapper-data.h
@@ -0,0 +1,16 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* prsa_tok_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static size_t yy_buffer_stack_top);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static size_t yy_buffer_stack_max);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static YY_BUFFER_STATE *yy_buffer_stack);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char yy_hold_char);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static yy_size_t yy_n_chars);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, extern yy_size_t racoonprsaleng);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *yy_c_buf_p);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_init);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_start);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int yy_did_buffer_switch_on_eof);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static yy_state_type yy_last_accepting_state);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static char *yy_last_accepting_cpos);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-remoteconf-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-remoteconf-data.h
new file mode 100644
index 00000000..561d0976
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-remoteconf-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* remoteconf.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static remoteconf_tailq_head_t rmtree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static remoteconf_tailq_head_t rmtree_save);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-rsalist-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-rsalist-data.h
new file mode 100644
index 00000000..114f932b
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-rsalist-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* rsalist.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-safefile-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-safefile-data.h
new file mode 100644
index 00000000..32e272c9
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-safefile-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* safefile.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-sainfo-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-sainfo-data.h
new file mode 100644
index 00000000..32f9e449
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-sainfo-data.h
@@ -0,0 +1,6 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* sainfo.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static sainfo_tailq_head_t sitree);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static sainfo_tailq_head_t sitree_save);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-schedule-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-schedule-data.h
new file mode 100644
index 00000000..139ca7d4
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-schedule-data.h
@@ -0,0 +1,5 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* schedule.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct _schedtree sctree);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h
new file mode 100644
index 00000000..44f60e2f
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h
@@ -0,0 +1,12 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* session.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static _types_fd_set preset_mask);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static _types_fd_set active_mask);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct fd_monitor fd_monitors[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct fd_monitor_list fd_monitor_tree[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int nfds);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static sig_atomic_t volatile volatile sigreq[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct sched scflushsa);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int signals[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-sha2-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-sha2-data.h
new file mode 100644
index 00000000..6460b356
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-sha2-data.h
@@ -0,0 +1,8 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* sha2.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct env_md_st sha2_256_md);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct env_md_st sha2_384_md);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct env_md_st sha2_512_md);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int loading_sa);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-sockmisc-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-sockmisc-data.h
new file mode 100644
index 00000000..c0421fc0
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-sockmisc-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* sockmisc.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-str2val-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-str2val-data.h
new file mode 100644
index 00000000..2261acc8
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-str2val-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* str2val.c */
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-strnames-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-strnames-data.h
new file mode 100644
index 00000000..cdd5b3df
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-strnames-data.h
@@ -0,0 +1,30 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* strnames.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_isakmp_certtype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_isakmp_etype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_isakmp_notify_msg[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_isakmp_nptype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsecdoi_proto[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsecdoi_trns_isakmp[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsecdoi_trns_ah[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsecdoi_trns_esp[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsecdoi_trns_ipcomp[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_ipsec[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_ipsec_ltype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_ipsec_encmode[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_ipsec_auth[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsecdoi_ident[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_oakley_attr[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_isakmp_enc[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_isakmp_hash[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_isakmp_method[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_isakmp_desc[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_isakmp_group[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_attr_isakmp_ltype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_ipsec_level[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_algclass[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_pfkey_type[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_pfkey_satype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct ksmap name_direction[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-vendorid-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-vendorid-data.h
new file mode 100644
index 00000000..fa658ffc
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-vendorid-data.h
@@ -0,0 +1,5 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* vendorid.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct vendor_id all_vendor_ids[]);
diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-vmbuf-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-vmbuf-data.h
new file mode 100644
index 00000000..bc36e24c
--- /dev/null
+++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-vmbuf-data.h
@@ -0,0 +1,4 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-racoon-data.h"
+/* vmbuf.c */
diff --git a/ipsec-tools/src/racoon/safefile.c b/ipsec-tools/src/racoon/safefile.c
index 52410920..139751eb 100644
--- a/ipsec-tools/src/racoon/safefile.c
+++ b/ipsec-tools/src/racoon/safefile.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: safefile.c,v 1.4 2006/09/09 16:22:10 manu Exp $ */
/* $KAME: safefile.c,v 1.5 2001/03/05 19:54:06 thorpej Exp $ */
@@ -80,6 +86,7 @@ safefile(path, secret)
return -1;
}
+#ifndef __rtems__
/* secret file should not be read by others */
if (secret) {
if ((s.st_mode & S_IRWXG) != 0 || (s.st_mode & S_IRWXO) != 0) {
@@ -88,6 +95,15 @@ safefile(path, secret)
return -1;
}
}
+#else /* __rtems__ */
+ /* We don't have a single address space anyway. So user permissions
+ * don't really add security. */
+ plog(LLV_WARNING, LOCATION, NULL,
+ "File permissions of %s not checked.\n", path);
+#endif /* __rtems__ */
return 0;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-safefile-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/sainfo.c b/ipsec-tools/src/racoon/sainfo.c
index b6577c2e..6af1f635 100644
--- a/ipsec-tools/src/racoon/sainfo.c
+++ b/ipsec-tools/src/racoon/sainfo.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: sainfo.c,v 1.14 2011/02/02 15:21:34 vanhu Exp $ */
/* $KAME: sainfo.c,v 1.16 2003/06/27 07:32:39 sakane Exp $ */
@@ -411,3 +417,6 @@ void save_sainfotree_restore(void){
flushsainfo();
sitree=sitree_save;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-sainfo-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/schedule.c b/ipsec-tools/src/racoon/schedule.c
index 018f920b..fddbab0b 100644
--- a/ipsec-tools/src/racoon/schedule.c
+++ b/ipsec-tools/src/racoon/schedule.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: schedule.c,v 1.7 2009/01/23 09:10:13 tteras Exp $ */
/* $KAME: schedule.c,v 1.19 2001/11/05 10:53:19 sakane Exp $ */
@@ -309,3 +315,6 @@ main()
}
}
#endif
+#ifdef __rtems__
+#include "rtems-bsd-racoon-schedule-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/security.c b/ipsec-tools/src/racoon/security.c
index e4b5a0d6..b05257d3 100644
--- a/ipsec-tools/src/racoon/security.c
+++ b/ipsec-tools/src/racoon/security.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/*
* Copyright (C) 2005 International Business Machines Corporation
* Copyright (c) 2005 by Trusted Computer Solutions, Inc.
diff --git a/ipsec-tools/src/racoon/session.c b/ipsec-tools/src/racoon/session.c
index 85e29a39..65124c15 100644
--- a/ipsec-tools/src/racoon/session.c
+++ b/ipsec-tools/src/racoon/session.c
@@ -1,3 +1,8 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
/* $NetBSD: session.c,v 1.32 2011/03/02 15:09:16 vanhu Exp $ */
/* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */
@@ -250,6 +255,7 @@ session(void)
natt_keepalive_init ();
#endif
+#ifndef __rtems__
/* write .pid file */
if (lcconf->pathinfo[LC_PATHTYPE_PIDFILE] == NULL)
strlcpy(pid_file, _PATH_VARRUN "racoon.pid", MAXPATHLEN);
@@ -271,10 +277,12 @@ session(void)
plog(LLV_ERROR, LOCATION, NULL,
"cannot open %s", pid_file);
}
+#endif /* __rtems__ */
if (privsep_init() != 0)
exit(1);
+#ifndef __rtems__
/*
* The fork()'ed privileged side will close its copy of fp. We wait
* until here to get the correct child pid.
@@ -282,6 +290,7 @@ session(void)
racoon_pid = getpid();
fprintf(fp, "%ld\n", (long)racoon_pid);
fclose(fp);
+#endif /* __rtems__ */
for (i = 0; i <= NSIG; i++)
sigreq[i] = 0;
@@ -516,7 +525,11 @@ set_signal(sig, func)
memset((caddr_t)&sa, 0, sizeof(sa));
sa.sa_handler = func;
+#ifndef __rtems__
sa.sa_flags = SA_RESTART;
+#else /* __rtems__ */
+ sa.sa_flags = 0;
+#endif /* __rtems__ */
if (sigemptyset(&sa.sa_mask) < 0)
return -1;
@@ -538,3 +551,6 @@ close_sockets()
return 0;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-session-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/sockmisc.c b/ipsec-tools/src/racoon/sockmisc.c
index 4cfe7906..0ef51474 100644
--- a/ipsec-tools/src/racoon/sockmisc.c
+++ b/ipsec-tools/src/racoon/sockmisc.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: sockmisc.c,v 1.19 2011/03/14 17:18:13 tteras Exp $ */
/* Id: sockmisc.c,v 1.24 2006/05/07 21:32:59 manubsd Exp */
@@ -633,7 +639,11 @@ setsockopt_bypass(so, family)
strerror(errno));
return -1;
}
+#ifndef __rtems__
racoon_free(buf);
+#else /* __rtems__ */
+ ipsec_free_policy(buf);
+#endif /* __rtems__ */
policy = "out bypass";
buf = ipsec_set_policy(policy, strlen(policy));
@@ -652,7 +662,11 @@ setsockopt_bypass(so, family)
strerror(errno));
return -1;
}
+#ifndef __rtems__
racoon_free(buf);
+#else /* __rtems__ */
+ ipsec_free_policy(buf);
+#endif /* __rtems__ */
return 0;
}
@@ -1004,3 +1018,6 @@ set_port (struct sockaddr *addr, u_int16_t new_port)
return port_ptr;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-sockmisc-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/sockmisc.h b/ipsec-tools/src/racoon/sockmisc.h
index 67bfdaf5..583f15c4 100644
--- a/ipsec-tools/src/racoon/sockmisc.h
+++ b/ipsec-tools/src/racoon/sockmisc.h
@@ -33,6 +33,9 @@
#ifndef _SOCKMISC_H
#define _SOCKMISC_H
+#ifdef __rtems__
+#include <netinet/in.h>
+#endif /* __rtems__ */
#ifndef IP_IPSEC_POLICY
#define IP_IPSEC_POLICY 16 /* XXX: from linux/in.h */
diff --git a/ipsec-tools/src/racoon/str2val.c b/ipsec-tools/src/racoon/str2val.c
index 62d38a66..254314ac 100644
--- a/ipsec-tools/src/racoon/str2val.c
+++ b/ipsec-tools/src/racoon/str2val.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: str2val.c,v 1.4 2006/09/09 16:22:10 manu Exp $ */
/* $KAME: str2val.c,v 1.11 2001/08/16 14:37:29 itojun Exp $ */
@@ -124,3 +130,6 @@ str2val(str, base, len)
return(dst);
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-str2val-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/strnames.c b/ipsec-tools/src/racoon/strnames.c
index 4906b337..afd2425a 100644
--- a/ipsec-tools/src/racoon/strnames.c
+++ b/ipsec-tools/src/racoon/strnames.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: strnames.c,v 1.9 2008/07/14 05:40:13 tteras Exp $ */
/* $KAME: strnames.c,v 1.25 2003/11/13 10:53:26 itojun Exp $ */
@@ -1034,3 +1040,6 @@ s_switch (int k)
return num2str(k);
}
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-strnames-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/throttle.c b/ipsec-tools/src/racoon/throttle.c
index 84a2d6b6..5d71a3ce 100644
--- a/ipsec-tools/src/racoon/throttle.c
+++ b/ipsec-tools/src/racoon/throttle.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
/* $NetBSD: throttle.c,v 1.7 2011/03/14 17:18:13 tteras Exp $ */
/* Id: throttle.c,v 1.5 2006/04/05 20:54:50 manubsd Exp */
diff --git a/ipsec-tools/src/racoon/vendorid.c b/ipsec-tools/src/racoon/vendorid.c
index 81297bdd..eb088aa3 100644
--- a/ipsec-tools/src/racoon/vendorid.c
+++ b/ipsec-tools/src/racoon/vendorid.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: vendorid.c,v 1.8 2009/09/01 12:22:09 tteras Exp $ */
/* Id: vendorid.c,v 1.10 2006/02/22 16:10:21 vanhu Exp */
@@ -318,3 +324,6 @@ vendorid_fixup(vendorid, vidhash)
return vidhash;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-vendorid-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/racoon/vmbuf.c b/ipsec-tools/src/racoon/vmbuf.c
index 6c1aed1f..6704c73c 100644
--- a/ipsec-tools/src/racoon/vmbuf.c
+++ b/ipsec-tools/src/racoon/vmbuf.c
@@ -1,3 +1,9 @@
+#include <machine/rtems-bsd-user-space.h>
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-racoon-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: vmbuf.c,v 1.4 2006/09/09 16:22:10 manu Exp $ */
/* $KAME: vmbuf.c,v 1.11 2001/11/26 16:54:29 sakane Exp $ */
@@ -135,3 +141,6 @@ vdup(src)
return new;
}
+#ifdef __rtems__
+#include "rtems-bsd-racoon-vmbuf-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/setkey/config.h b/ipsec-tools/src/setkey/config.h
new file mode 100644
index 00000000..f97325b7
--- /dev/null
+++ b/ipsec-tools/src/setkey/config.h
@@ -0,0 +1 @@
+#include "../config.h"
diff --git a/ipsec-tools/src/setkey/package_version.h b/ipsec-tools/src/setkey/package_version.h
new file mode 100644
index 00000000..47218284
--- /dev/null
+++ b/ipsec-tools/src/setkey/package_version.h
@@ -0,0 +1,5 @@
+#define TOP_PACKAGE "ipsec-tools"
+#define TOP_PACKAGE_NAME "ipsec-tools"
+#define TOP_PACKAGE_VERSION "0.8.2"
+#define TOP_PACKAGE_STRING "ipsec-tools 0.8.2"
+#define TOP_PACKAGE_URL "http://ipsec-tools.sourceforge.net"
diff --git a/ipsec-tools/src/setkey/parse.c b/ipsec-tools/src/setkey/parse.c
index 2a9f8796..415acf6c 100644
--- a/ipsec-tools/src/setkey/parse.c
+++ b/ipsec-tools/src/setkey/parse.c
@@ -1,70 +1,103 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.6.2"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-
-
+/* original parser id follows */
+/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
+/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
+
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define YYPATCH 20170201
+
+#define YYEMPTY (-1)
+#define yyclearin (yychar = YYEMPTY)
+#define yyerrok (yyerrflag = 0)
+#define YYRECOVERING() (yyerrflag != 0)
+#define YYENOMEM (-2)
+#define YYEOF 0
+
+#ifndef yyparse
+#define yyparse setkeyyyparse
+#endif /* yyparse */
+
+#ifndef yylex
+#define yylex setkeyyylex
+#endif /* yylex */
+
+#ifndef yyerror
+#define yyerror setkeyyyerror
+#endif /* yyerror */
+
+#ifndef yychar
+#define yychar setkeyyychar
+#endif /* yychar */
+
+#ifndef yyval
+#define yyval setkeyyyval
+#endif /* yyval */
+
+#ifndef yylval
+#define yylval setkeyyylval
+#endif /* yylval */
+
+#ifndef yydebug
+#define yydebug setkeyyydebug
+#endif /* yydebug */
+
+#ifndef yynerrs
+#define yynerrs setkeyyynerrs
+#endif /* yynerrs */
+
+#ifndef yyerrflag
+#define yyerrflag setkeyyyerrflag
+#endif /* yyerrflag */
+
+#ifndef yylhs
+#define yylhs setkeyyylhs
+#endif /* yylhs */
+
+#ifndef yylen
+#define yylen setkeyyylen
+#endif /* yylen */
+
+#ifndef yydefred
+#define yydefred setkeyyydefred
+#endif /* yydefred */
+
+#ifndef yydgoto
+#define yydgoto setkeyyydgoto
+#endif /* yydgoto */
+
+#ifndef yysindex
+#define yysindex setkeyyysindex
+#endif /* yysindex */
+
+#ifndef yyrindex
+#define yyrindex setkeyyyrindex
+#endif /* yyrindex */
+
+#ifndef yygindex
+#define yygindex setkeyyygindex
+#endif /* yygindex */
+
+#ifndef yytable
+#define yytable setkeyyytable
+#endif /* yytable */
+
+#ifndef yycheck
+#define yycheck setkeyyycheck
+#endif /* yycheck */
+
+#ifndef yyname
+#define yyname setkeyyyname
+#endif /* yyname */
+
+#ifndef yyrule
+#define yyrule setkeyyyrule
+#endif /* yyrule */
+#define YYPREFIX "setkeyyy"
-/* Copy the first part of user declarations. */
-/* Line 336 of yacc.c */
-#line 34 "parse.y"
+#define YYPURE 0
+#line 35 "../../ipsec-tools/src/setkey/parse.y"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -100,6 +133,7 @@
(isdigit((int)c) ? (c - '0') : \
(isupper((int)c) ? (c - 'A' + 10) : (c - 'a' + 10)))
+#ifndef __rtems__
u_int32_t p_spi;
u_int p_ext, p_alg_enc, p_alg_auth, p_replay, p_mode;
u_int32_t p_reqid;
@@ -108,6 +142,16 @@ const char *p_key_enc;
const char *p_key_auth;
time_t p_lt_hard, p_lt_soft;
size_t p_lb_hard, p_lb_soft;
+#else /* __rtems__ */
+static u_int32_t p_spi;
+static u_int p_ext, p_alg_enc, p_alg_auth, p_replay, p_mode;
+static u_int32_t p_reqid;
+static u_int p_key_enc_len, p_key_auth_len;
+static const char *p_key_enc;
+static const char *p_key_auth;
+static time_t p_lt_hard, p_lt_soft;
+static size_t p_lb_hard, p_lb_soft;
+#endif /* __rtems__ */
struct security_ctx {
u_int8_t doi;
@@ -116,7 +160,7 @@ struct security_ctx {
char *buf;
};
-struct security_ctx sec_ctx;
+static struct security_ctx sec_ctx;
static u_int p_natt_type;
static struct addrinfo * p_natt_oa = NULL;
@@ -138,2713 +182,410 @@ static int setkeymsg_addr __P((unsigned int, unsigned int,
struct addrinfo *, struct addrinfo *, int));
static int setkeymsg_add __P((unsigned int, unsigned int,
struct addrinfo *, struct addrinfo *));
-
-/* Line 336 of yacc.c */
-#line 144 "parse.c"
-
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
-# else
-# define YY_NULL 0
-# endif
-# endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "y.tab.h". */
-#ifndef YY_Y_TAB_H
-# define YY_Y_TAB_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int yydebug;
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- EOT = 258,
- SLASH = 259,
- BLCL = 260,
- ELCL = 261,
- ADD = 262,
- GET = 263,
- DELETE = 264,
- DELETEALL = 265,
- FLUSH = 266,
- DUMP = 267,
- EXIT = 268,
- PR_ESP = 269,
- PR_AH = 270,
- PR_IPCOMP = 271,
- PR_ESPUDP = 272,
- PR_TCP = 273,
- F_PROTOCOL = 274,
- F_AUTH = 275,
- F_ENC = 276,
- F_REPLAY = 277,
- F_COMP = 278,
- F_RAWCPI = 279,
- F_MODE = 280,
- MODE = 281,
- F_REQID = 282,
- F_EXT = 283,
- EXTENSION = 284,
- NOCYCLICSEQ = 285,
- ALG_AUTH = 286,
- ALG_AUTH_NOKEY = 287,
- ALG_ENC = 288,
- ALG_ENC_NOKEY = 289,
- ALG_ENC_DESDERIV = 290,
- ALG_ENC_DES32IV = 291,
- ALG_ENC_OLD = 292,
- ALG_COMP = 293,
- F_LIFETIME_HARD = 294,
- F_LIFETIME_SOFT = 295,
- F_LIFEBYTE_HARD = 296,
- F_LIFEBYTE_SOFT = 297,
- DECSTRING = 298,
- QUOTEDSTRING = 299,
- HEXSTRING = 300,
- STRING = 301,
- ANY = 302,
- SPDADD = 303,
- SPDUPDATE = 304,
- SPDDELETE = 305,
- SPDDUMP = 306,
- SPDFLUSH = 307,
- F_POLICY = 308,
- PL_REQUESTS = 309,
- F_AIFLAGS = 310,
- TAGGED = 311,
- SECURITY_CTX = 312
- };
-#endif
-/* Tokens. */
-#define EOT 258
-#define SLASH 259
-#define BLCL 260
-#define ELCL 261
-#define ADD 262
-#define GET 263
-#define DELETE 264
-#define DELETEALL 265
-#define FLUSH 266
-#define DUMP 267
-#define EXIT 268
-#define PR_ESP 269
-#define PR_AH 270
-#define PR_IPCOMP 271
-#define PR_ESPUDP 272
-#define PR_TCP 273
-#define F_PROTOCOL 274
-#define F_AUTH 275
-#define F_ENC 276
-#define F_REPLAY 277
-#define F_COMP 278
-#define F_RAWCPI 279
-#define F_MODE 280
-#define MODE 281
-#define F_REQID 282
-#define F_EXT 283
-#define EXTENSION 284
-#define NOCYCLICSEQ 285
-#define ALG_AUTH 286
-#define ALG_AUTH_NOKEY 287
-#define ALG_ENC 288
-#define ALG_ENC_NOKEY 289
-#define ALG_ENC_DESDERIV 290
-#define ALG_ENC_DES32IV 291
-#define ALG_ENC_OLD 292
-#define ALG_COMP 293
-#define F_LIFETIME_HARD 294
-#define F_LIFETIME_SOFT 295
-#define F_LIFEBYTE_HARD 296
-#define F_LIFEBYTE_SOFT 297
-#define DECSTRING 298
-#define QUOTEDSTRING 299
-#define HEXSTRING 300
-#define STRING 301
-#define ANY 302
-#define SPDADD 303
-#define SPDUPDATE 304
-#define SPDDELETE 305
-#define SPDDUMP 306
-#define SPDFLUSH 307
-#define F_POLICY 308
-#define PL_REQUESTS 309
-#define F_AIFLAGS 310
-#define TAGGED 311
-#define SECURITY_CTX 312
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 350 of yacc.c */
-#line 110 "parse.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+#line 121 "../../ipsec-tools/src/setkey/parse.y"
+typedef union {
int num;
unsigned long ulnum;
vchar_t val;
struct addrinfo *res;
-
-
-/* Line 350 of yacc.c */
-#line 309 "parse.c"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
+#endif /* !YYSTYPE_IS_DECLARED */
+#line 200 "setkeyyy.tab.c"
+/* compatibility with bison */
#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !YY_Y_TAB_H */
-
-/* Copy the second part of user declarations. */
-
-/* Line 353 of yacc.c */
-#line 337 "parse.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+/* compatibility with FreeBSD */
+# ifdef YYPARSE_PARAM_TYPE
+# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
# else
-# define YYSIZE_T unsigned int
+# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
#else
-# define YYUSE(e) /* empty */
+# define YYPARSE_DECL() yyparse(void)
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+/* Parameters sent to lex. */
+#ifdef YYLEX_PARAM
+# define YYLEX_DECL() yylex(void *YYLEX_PARAM)
+# define YYLEX yylex(YYLEX_PARAM)
#else
-static int
-YYID (yyi)
- int yyi;
+# define YYLEX_DECL() yylex(void)
+# define YYLEX yylex()
#endif
-{
- return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+/* Parameters sent to yyerror. */
+#ifndef YYERROR_DECL
+#define YYERROR_DECL() yyerror(const char *s)
#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 2
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 174
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 58
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 37
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 90
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 188
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 312
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 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, 2, 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
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 4, 7, 9, 11, 13, 15, 17,
- 19, 21, 23, 25, 27, 29, 31, 41, 50, 57,
- 66, 70, 74, 75, 77, 79, 81, 83, 86, 88,
- 90, 92, 94, 96, 98, 103, 106, 109, 112, 116,
- 118, 121, 123, 126, 129, 132, 134, 136, 138, 139,
- 142, 145, 148, 151, 154, 157, 160, 163, 166, 169,
- 172, 177, 191, 197, 211, 217, 231, 234, 237, 238,
- 241, 243, 245, 247, 250, 251, 254, 255, 259, 263,
- 267, 269, 271, 273, 275, 276, 278, 279, 284, 287,
- 289
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 59, 0, -1, -1, 59, 60, -1, 61, -1, 64,
- -1, 62, -1, 63, -1, 65, -1, 66, -1, 94,
- -1, 78, -1, 79, -1, 80, -1, 81, -1, 82,
- -1, 7, 83, 86, 86, 67, 68, 76, 69, 3,
- -1, 9, 83, 86, 86, 67, 68, 76, 3, -1,
- 10, 83, 85, 85, 67, 3, -1, 8, 83, 86,
- 86, 67, 68, 76, 3, -1, 11, 67, 3, -1,
- 12, 67, 3, -1, -1, 14, -1, 15, -1, 16,
- -1, 17, -1, 17, 85, -1, 18, -1, 43, -1,
- 45, -1, 70, -1, 71, -1, 72, -1, 21, 73,
- 20, 74, -1, 21, 73, -1, 20, 74, -1, 23,
- 38, -1, 23, 38, 24, -1, 34, -1, 33, 75,
- -1, 37, -1, 35, 75, -1, 36, 75, -1, 31,
- 75, -1, 32, -1, 44, -1, 45, -1, -1, 76,
- 77, -1, 28, 29, -1, 28, 30, -1, 25, 26,
- -1, 25, 47, -1, 27, 43, -1, 22, 43, -1,
- 39, 43, -1, 40, 43, -1, 41, 43, -1, 42,
- 43, -1, 57, 43, 43, 44, -1, 48, 83, 46,
- 87, 88, 46, 87, 88, 89, 90, 91, 92, 3,
- -1, 48, 56, 44, 92, 3, -1, 49, 83, 46,
- 87, 88, 46, 87, 88, 89, 90, 91, 92, 3,
- -1, 49, 56, 44, 92, 3, -1, 50, 83, 46,
- 87, 88, 46, 87, 88, 89, 90, 91, 92, 3,
- -1, 51, 3, -1, 52, 3, -1, -1, 83, 84,
- -1, 55, -1, 46, -1, 46, -1, 46, 88, -1,
- -1, 4, 43, -1, -1, 5, 47, 6, -1, 5,
- 43, 6, -1, 5, 46, 6, -1, 43, -1, 47,
- -1, 18, -1, 46, -1, -1, 46, -1, -1, 57,
- 43, 43, 44, -1, 53, 93, -1, 54, -1, 13,
- 3, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 151, 151, 153, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 178, 190, 209, 237,
- 252, 262, 272, 275, 283, 291, 295, 302, 309, 318,
- 319, 340, 341, 342, 346, 347, 351, 355, 363, 375,
- 390, 405, 421, 442, 466, 491, 504, 508, 537, 539,
- 543, 544, 545, 546, 547, 548, 557, 558, 559, 560,
- 561, 573, 606, 619, 652, 664, 696, 707, 716, 718,
- 722, 747, 758, 766, 777, 778, 783, 791, 800, 811,
- 818, 819, 820, 823, 846, 850, 861, 863, 872, 896,
- 901
-};
+#ifndef YYERROR_CALL
+#define YYERROR_CALL(msg) yyerror(msg)
#endif
-#if YYDEBUG || YYERROR_VERBOSE || 0
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "EOT", "SLASH", "BLCL", "ELCL", "ADD",
- "GET", "DELETE", "DELETEALL", "FLUSH", "DUMP", "EXIT", "PR_ESP", "PR_AH",
- "PR_IPCOMP", "PR_ESPUDP", "PR_TCP", "F_PROTOCOL", "F_AUTH", "F_ENC",
- "F_REPLAY", "F_COMP", "F_RAWCPI", "F_MODE", "MODE", "F_REQID", "F_EXT",
- "EXTENSION", "NOCYCLICSEQ", "ALG_AUTH", "ALG_AUTH_NOKEY", "ALG_ENC",
- "ALG_ENC_NOKEY", "ALG_ENC_DESDERIV", "ALG_ENC_DES32IV", "ALG_ENC_OLD",
- "ALG_COMP", "F_LIFETIME_HARD", "F_LIFETIME_SOFT", "F_LIFEBYTE_HARD",
- "F_LIFEBYTE_SOFT", "DECSTRING", "QUOTEDSTRING", "HEXSTRING", "STRING",
- "ANY", "SPDADD", "SPDUPDATE", "SPDDELETE", "SPDDUMP", "SPDFLUSH",
- "F_POLICY", "PL_REQUESTS", "F_AIFLAGS", "TAGGED", "SECURITY_CTX",
- "$accept", "commands", "command", "add_command", "delete_command",
- "deleteall_command", "get_command", "flush_command", "dump_command",
- "protocol_spec", "spi", "algorithm_spec", "esp_spec", "ah_spec",
- "ipcomp_spec", "enc_alg", "auth_alg", "key_string", "extension_spec",
- "extension", "spdadd_command", "spdupdate_command", "spddelete_command",
- "spddump_command", "spdflush_command", "ipaddropts", "ipaddropt",
- "ipaddr", "ipandport", "prefix", "portstr", "upper_spec",
- "upper_misc_spec", "context_spec", "policy_spec", "policy_requests",
- "exit_command", YY_NULL
+extern int YYPARSE_DECL();
+
+#define EOT 257
+#define SLASH 258
+#define BLCL 259
+#define ELCL 260
+#define ADD 261
+#define GET 262
+#define DELETE 263
+#define DELETEALL 264
+#define FLUSH 265
+#define DUMP 266
+#define EXIT 267
+#define PR_ESP 268
+#define PR_AH 269
+#define PR_IPCOMP 270
+#define PR_ESPUDP 271
+#define PR_TCP 272
+#define F_PROTOCOL 273
+#define F_AUTH 274
+#define F_ENC 275
+#define F_REPLAY 276
+#define F_COMP 277
+#define F_RAWCPI 278
+#define F_MODE 279
+#define MODE 280
+#define F_REQID 281
+#define F_EXT 282
+#define EXTENSION 283
+#define NOCYCLICSEQ 284
+#define ALG_AUTH 285
+#define ALG_AUTH_NOKEY 286
+#define ALG_ENC 287
+#define ALG_ENC_NOKEY 288
+#define ALG_ENC_DESDERIV 289
+#define ALG_ENC_DES32IV 290
+#define ALG_ENC_OLD 291
+#define ALG_COMP 292
+#define F_LIFETIME_HARD 293
+#define F_LIFETIME_SOFT 294
+#define F_LIFEBYTE_HARD 295
+#define F_LIFEBYTE_SOFT 296
+#define DECSTRING 297
+#define QUOTEDSTRING 298
+#define HEXSTRING 299
+#define STRING 300
+#define ANY 301
+#define SPDADD 302
+#define SPDUPDATE 303
+#define SPDDELETE 304
+#define SPDDUMP 305
+#define SPDFLUSH 306
+#define F_POLICY 307
+#define PL_REQUESTS 308
+#define F_AIFLAGS 309
+#define TAGGED 310
+#define SECURITY_CTX 311
+#define YYERRCODE 256
+typedef int YYINT;
+static const YYINT setkeyyylhs[] = { -1,
+ 0, 0, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 12, 14, 15, 13, 16, 17,
+ 2, 2, 2, 2, 2, 2, 2, 25, 25, 27,
+ 27, 27, 28, 28, 29, 30, 30, 31, 31, 31,
+ 31, 31, 32, 32, 5, 5, 26, 26, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 19,
+ 19, 20, 20, 21, 22, 23, 24, 24, 35, 9,
+ 10, 10, 1, 1, 4, 4, 4, 4, 3, 3,
+ 3, 3, 7, 7, 34, 34, 8, 6, 18,
};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
- 305, 306, 307, 308, 309, 310, 311, 312
+static const YYINT setkeyyylen[] = { 2,
+ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 9, 8, 6, 8, 3, 3,
+ 0, 1, 1, 1, 1, 2, 1, 1, 1, 1,
+ 1, 1, 4, 2, 2, 2, 3, 1, 2, 1,
+ 2, 2, 2, 1, 1, 1, 0, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 4, 13,
+ 5, 13, 5, 13, 2, 2, 0, 2, 1, 1,
+ 1, 2, 0, 2, 0, 3, 3, 3, 1, 1,
+ 1, 1, 0, 1, 0, 4, 2, 1, 2,
};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 58, 59, 59, 60, 60, 60, 60, 60, 60,
- 60, 60, 60, 60, 60, 60, 61, 62, 63, 64,
- 65, 66, 67, 67, 67, 67, 67, 67, 67, 68,
- 68, 69, 69, 69, 70, 70, 71, 72, 72, 73,
- 73, 73, 73, 73, 74, 74, 75, 75, 76, 76,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 78, 78, 79, 79, 80, 81, 82, 83, 83,
- 84, 85, 86, 86, 87, 87, 88, 88, 88, 88,
- 89, 89, 89, 89, 90, 90, 91, 91, 92, 93,
- 94
+static const YYINT setkeyyydefred[] = { 1,
+ 0, 67, 67, 67, 67, 0, 0, 0, 0, 0,
+ 67, 0, 0, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 0, 0, 0, 0,
+ 22, 23, 24, 0, 27, 0, 0, 89, 0, 0,
+ 0, 0, 0, 65, 66, 0, 69, 0, 68, 0,
+ 0, 70, 0, 26, 19, 20, 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, 88, 87, 61, 74, 0, 63, 0, 0, 77,
+ 78, 76, 28, 29, 47, 47, 47, 17, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 30, 31, 32, 48, 18, 16, 0, 0, 0, 0,
+ 44, 35, 0, 38, 0, 0, 40, 0, 54, 0,
+ 51, 52, 53, 49, 50, 55, 56, 57, 58, 0,
+ 15, 81, 79, 82, 80, 0, 0, 0, 45, 46,
+ 43, 39, 41, 42, 0, 37, 0, 84, 0, 0,
+ 0, 33, 59, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 60, 62, 64, 86,
};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 0, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 9, 8, 6, 8,
- 3, 3, 0, 1, 1, 1, 1, 2, 1, 1,
- 1, 1, 1, 1, 4, 2, 2, 2, 3, 1,
- 2, 1, 2, 2, 2, 1, 1, 1, 0, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 4, 13, 5, 13, 5, 13, 2, 2, 0, 2,
- 1, 1, 1, 2, 0, 2, 0, 3, 3, 3,
- 1, 1, 1, 1, 0, 1, 0, 4, 2, 1,
- 2
+static const YYINT setkeyyydgoto[] = { 1,
+ 71, 36, 156, 63, 161, 83, 169, 69, 53, 48,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 95, 102, 120, 121, 122, 123,
+ 138, 132, 124, 175, 49,
};
-
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 2, 0, 1, 68, 68, 68, 68, 22, 22, 0,
- 68, 68, 68, 0, 0, 3, 4, 6, 7, 5,
- 8, 9, 11, 12, 13, 14, 15, 10, 0, 0,
- 0, 0, 23, 24, 25, 26, 28, 0, 0, 90,
- 0, 0, 0, 0, 0, 66, 67, 72, 70, 69,
- 0, 0, 0, 71, 0, 27, 20, 21, 0, 74,
- 0, 74, 74, 0, 73, 22, 22, 22, 22, 0,
- 0, 0, 76, 0, 76, 76, 0, 0, 0, 0,
- 0, 0, 0, 89, 88, 62, 75, 0, 64, 0,
- 0, 78, 79, 77, 29, 30, 48, 48, 48, 18,
- 74, 74, 74, 0, 0, 0, 76, 76, 76, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 31, 32, 33, 49, 19, 17, 0, 0,
- 0, 0, 45, 36, 0, 39, 0, 0, 41, 35,
- 55, 37, 52, 53, 54, 50, 51, 56, 57, 58,
- 59, 0, 16, 82, 80, 83, 81, 84, 84, 84,
- 46, 47, 44, 40, 42, 43, 0, 38, 0, 85,
- 86, 86, 86, 34, 60, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 61, 63, 65, 87
+static const YYINT setkeyyysindex[] = { 0,
+ -251, 0, 0, 0, 0, -128, -128, -250, -267, -253,
+ 0, -227, -169, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -292, -292, -292, -277,
+ 0, 0, 0, -187, 0, -129, -122, 0, -233, -214,
+ -133, -185, -180, 0, 0, -103, 0, -134, 0, -134,
+ -134, 0, -187, 0, 0, 0, -140, -90, -140, -90,
+ -90, -147, 0, -128, -128, -128, -128, -139, -87, -126,
+ -103, -85, -103, -103, -86, -84, -83, -210, -210, -210,
+ -82, 0, 0, 0, 0, -127, 0, -121, -120, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -90, -90,
+ -90, -197, -255, -248, -103, -103, -103, -280, -142, -119,
+ -111, -276, -115, -264, -114, -113, -112, -110, -109, -71,
+ 0, 0, 0, 0, 0, 0, -191, -191, -191, -249,
+ 0, 0, -249, 0, -249, -249, 0, -81, 0, -89,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -107,
+ 0, 0, 0, 0, 0, -108, -108, -108, 0, 0,
+ 0, 0, 0, 0, -280, 0, -104, 0, -116, -116,
+ -116, 0, 0, -106, -140, -140, -140, -101, -60, -58,
+ -57, -100, 0, 0, 0, 0,
};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 1, 15, 16, 17, 18, 19, 20, 21, 37,
- 96, 121, 122, 123, 124, 139, 133, 162, 103, 125,
- 22, 23, 24, 25, 26, 28, 49, 54, 50, 72,
- 64, 157, 170, 176, 70, 84, 27
+static const YYINT setkeyyyrindex[] = { 0,
+ 0, 0, 0, 0, 0, -55, -55, 0, -173, -173,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -235, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -256, 0, -256,
+ -256, 0, 0, -192, -192, -192, -55, 0, 0, 0,
+ -99, 0, -99, -99, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -230, -230,
+ -230, 0, 0, 0, -189, -189, -189, 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, -54, 0, -53,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -177, -177, -177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -102, -102,
+ -102, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -61
-static const yytype_int16 yypact[] =
-{
- -61, 3, -61, -61, -61, -61, -61, 96, 96, 17,
- -12, 1, -61, 78, 106, -61, -61, -61, -61, -61,
- -61, -61, -61, -61, -61, -61, -61, -61, -38, -38,
- -38, 29, -61, -61, -61, 69, -61, 122, 130, -61,
- 92, 31, 93, 39, 49, -61, -61, 133, -61, -61,
- 94, 94, 94, -61, 69, -61, -61, -61, 88, 135,
- 88, 135, 135, -24, -61, 96, 96, 96, 96, 89,
- 139, 101, 133, 142, 133, 133, 140, 141, 143, 81,
- 81, 81, 145, -61, -61, -61, -61, 104, -61, 105,
- 107, -61, -61, -61, -61, -61, -61, -61, -61, -61,
- 135, 135, 135, 51, -1, 6, 133, 133, 133, -26,
- 86, 109, 116, -22, 112, 13, 113, 114, 115, 117,
- 118, 156, -61, -61, -61, -61, -61, -61, -11, -11,
- -11, 5, -61, -61, 5, -61, 5, 5, -61, 144,
- -61, 138, -61, -61, -61, -61, -61, -61, -61, -61,
- -61, 120, -61, -61, -61, -61, -61, 119, 119, 119,
- -61, -61, -61, -61, -61, -61, -26, -61, 123, -61,
- 111, 111, 111, -61, -61, 126, 88, 88, 88, 127,
- 163, 168, 169, 129, -61, -61, -61, -61
+static const YYINT setkeyyygindex[] = { 0,
+ -25, -6, -56, -5, 22, 0, 2, -59, -16, 75,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 128, 72, 65, 0, 0, 0, 0,
+ 0, 41, 0, -7, 0,
};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
-{
- -61, -61, -61, -61, -61, -61, -61, -61, -61, -7,
- 22, -61, -61, -61, -61, -61, 8, -54, 30, -61,
- -61, -61, -61, -61, -61, 95, -61, -17, 37, -32,
- -10, 0, -27, -37, -60, -61, -61
+#define YYTABLESIZE 206
+static const YYINT setkeyyytable[] = { 72,
+ 37, 125, 73, 141, 130, 131, 38, 46, 126, 2,
+ 3, 4, 5, 6, 7, 8, 47, 54, 144, 145,
+ 110, 25, 52, 112, 142, 113, 114, 110, 73, 44,
+ 112, 47, 113, 114, 73, 74, 67, 115, 116, 117,
+ 118, 73, 39, 73, 115, 116, 117, 118, 159, 160,
+ 9, 10, 11, 12, 13, 119, 41, 78, 79, 80,
+ 81, 25, 119, 25, 57, 86, 73, 88, 89, 73,
+ 73, 157, 158, 105, 106, 107, 108, 109, 110, 111,
+ 152, 112, 75, 113, 114, 58, 93, 45, 94, 71,
+ 71, 71, 71, 71, 47, 115, 116, 117, 118, 127,
+ 128, 129, 50, 51, 21, 153, 21, 75, 154, 155,
+ 75, 75, 52, 119, 60, 179, 180, 181, 71, 61,
+ 71, 71, 64, 47, 65, 66, 67, 55, 47, 83,
+ 28, 29, 30, 83, 56, 67, 40, 42, 43, 31,
+ 32, 33, 34, 35, 133, 134, 135, 136, 137, 75,
+ 96, 97, 76, 77, 162, 62, 163, 164, 170, 171,
+ 103, 104, 176, 177, 59, 46, 68, 70, 82, 84,
+ 85, 87, 99, 90, 98, 91, 92, 139, 100, 101,
+ 140, 143, 146, 147, 148, 151, 149, 150, 166, 167,
+ 178, 168, 165, 173, 174, 182, 183, 186, 184, 185,
+ 75, 21, 34, 36, 85, 172,
};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
- 73, 38, 126, 2, 142, 131, 132, 153, 47, 127,
- 3, 4, 5, 6, 7, 8, 9, 48, 55, 76,
- 39, 111, 77, 78, 113, 143, 114, 115, 111, 74,
- 75, 113, 154, 114, 115, 155, 156, 68, 116, 117,
- 118, 119, 145, 146, 40, 116, 117, 118, 119, 160,
- 161, 10, 11, 12, 13, 14, 120, 42, 79, 80,
- 81, 82, 87, 120, 89, 90, 51, 52, 106, 107,
- 108, 109, 110, 111, 112, 53, 113, 59, 114, 115,
- 163, 45, 164, 165, 48, 61, 48, 65, 66, 67,
- 116, 117, 118, 119, 48, 62, 128, 129, 130, 29,
- 30, 31, 97, 98, 48, 41, 43, 44, 120, 46,
- 32, 33, 34, 35, 36, 53, 180, 181, 182, 134,
- 135, 136, 137, 138, 94, 56, 95, 104, 105, 158,
- 159, 171, 172, 57, 177, 178, 58, 60, 63, 71,
- 47, 69, 85, 83, 86, 88, 91, 92, 99, 93,
- 100, 101, 140, 102, 141, 144, 147, 148, 149, 152,
- 150, 151, 167, 168, 166, 169, 184, 174, 175, 179,
- 183, 185, 186, 187, 173
+static const YYINT setkeyyycheck[] = { 59,
+ 7, 257, 259, 280, 285, 286, 257, 300, 257, 261,
+ 262, 263, 264, 265, 266, 267, 309, 34, 283, 284,
+ 276, 257, 300, 279, 301, 281, 282, 276, 259, 257,
+ 279, 309, 281, 282, 60, 61, 53, 293, 294, 295,
+ 296, 272, 310, 300, 293, 294, 295, 296, 298, 299,
+ 302, 303, 304, 305, 306, 311, 310, 64, 65, 66,
+ 67, 297, 311, 299, 298, 71, 297, 73, 74, 300,
+ 301, 128, 129, 99, 100, 101, 274, 275, 276, 277,
+ 272, 279, 272, 281, 282, 300, 297, 257, 299, 268,
+ 269, 270, 271, 272, 309, 293, 294, 295, 296, 105,
+ 106, 107, 28, 29, 297, 297, 299, 297, 300, 301,
+ 300, 301, 300, 311, 300, 175, 176, 177, 297, 300,
+ 299, 300, 48, 309, 50, 51, 300, 257, 309, 307,
+ 3, 4, 5, 311, 257, 309, 9, 10, 11, 268,
+ 269, 270, 271, 272, 287, 288, 289, 290, 291, 297,
+ 79, 80, 300, 301, 133, 259, 135, 136, 157, 158,
+ 96, 97, 170, 171, 298, 300, 307, 258, 308, 257,
+ 297, 257, 300, 260, 257, 260, 260, 297, 300, 300,
+ 292, 297, 297, 297, 297, 257, 297, 297, 278, 297,
+ 297, 300, 274, 298, 311, 297, 257, 298, 257, 257,
+ 300, 257, 257, 257, 307, 165,
};
-
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-61))
-
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
-
-static const yytype_uint8 yycheck[] =
-{
- 60, 8, 3, 0, 26, 31, 32, 18, 46, 3,
- 7, 8, 9, 10, 11, 12, 13, 55, 35, 43,
- 3, 22, 46, 47, 25, 47, 27, 28, 22, 61,
- 62, 25, 43, 27, 28, 46, 47, 54, 39, 40,
- 41, 42, 29, 30, 56, 39, 40, 41, 42, 44,
- 45, 48, 49, 50, 51, 52, 57, 56, 65, 66,
- 67, 68, 72, 57, 74, 75, 29, 30, 100, 101,
- 102, 20, 21, 22, 23, 46, 25, 46, 27, 28,
- 134, 3, 136, 137, 55, 46, 55, 50, 51, 52,
- 39, 40, 41, 42, 55, 46, 106, 107, 108, 4,
- 5, 6, 80, 81, 55, 10, 11, 12, 57, 3,
- 14, 15, 16, 17, 18, 46, 176, 177, 178, 33,
- 34, 35, 36, 37, 43, 3, 45, 97, 98, 129,
- 130, 158, 159, 3, 171, 172, 44, 44, 5, 4,
- 46, 53, 3, 54, 43, 3, 6, 6, 3, 6,
- 46, 46, 43, 46, 38, 43, 43, 43, 43, 3,
- 43, 43, 24, 43, 20, 46, 3, 44, 57, 43,
- 43, 3, 3, 44, 166
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 59, 0, 7, 8, 9, 10, 11, 12, 13,
- 48, 49, 50, 51, 52, 60, 61, 62, 63, 64,
- 65, 66, 78, 79, 80, 81, 82, 94, 83, 83,
- 83, 83, 14, 15, 16, 17, 18, 67, 67, 3,
- 56, 83, 56, 83, 83, 3, 3, 46, 55, 84,
- 86, 86, 86, 46, 85, 85, 3, 3, 44, 46,
- 44, 46, 46, 5, 88, 86, 86, 86, 85, 53,
- 92, 4, 87, 92, 87, 87, 43, 46, 47, 67,
- 67, 67, 67, 54, 93, 3, 43, 88, 3, 88,
- 88, 6, 6, 6, 43, 45, 68, 68, 68, 3,
- 46, 46, 46, 76, 76, 76, 87, 87, 87, 20,
- 21, 22, 23, 25, 27, 28, 39, 40, 41, 42,
- 57, 69, 70, 71, 72, 77, 3, 3, 88, 88,
- 88, 31, 32, 74, 33, 34, 35, 36, 37, 73,
- 43, 38, 26, 47, 43, 29, 30, 43, 43, 43,
- 43, 43, 3, 18, 43, 46, 47, 89, 89, 89,
- 44, 45, 75, 75, 75, 75, 20, 24, 43, 46,
- 90, 90, 90, 74, 44, 57, 91, 91, 91, 43,
- 92, 92, 92, 43, 3, 3, 3, 44
-};
-
-#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 yyerrorlab
-
-
-/* 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. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
-
-/* This macro is provided for backward compatibility. */
-
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 0
#endif
-
-/* Enable debugging if requested. */
+#define YYMAXTOKEN 311
+#define YYUNDFTOKEN 349
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
#if YYDEBUG
+static const char *const setkeyyyname[] = {
+
+"end-of-file",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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"EOT","SLASH","BLCL","ELCL","ADD",
+"GET","DELETE","DELETEALL","FLUSH","DUMP","EXIT","PR_ESP","PR_AH","PR_IPCOMP",
+"PR_ESPUDP","PR_TCP","F_PROTOCOL","F_AUTH","F_ENC","F_REPLAY","F_COMP",
+"F_RAWCPI","F_MODE","MODE","F_REQID","F_EXT","EXTENSION","NOCYCLICSEQ",
+"ALG_AUTH","ALG_AUTH_NOKEY","ALG_ENC","ALG_ENC_NOKEY","ALG_ENC_DESDERIV",
+"ALG_ENC_DES32IV","ALG_ENC_OLD","ALG_COMP","F_LIFETIME_HARD","F_LIFETIME_SOFT",
+"F_LIFEBYTE_HARD","F_LIFEBYTE_SOFT","DECSTRING","QUOTEDSTRING","HEXSTRING",
+"STRING","ANY","SPDADD","SPDUPDATE","SPDDELETE","SPDDUMP","SPDFLUSH","F_POLICY",
+"PL_REQUESTS","F_AIFLAGS","TAGGED","SECURITY_CTX",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,"illegal-symbol",
+};
+static const char *const setkeyyyrule[] = {
+"$accept : commands",
+"commands :",
+"commands : commands command",
+"command : add_command",
+"command : get_command",
+"command : delete_command",
+"command : deleteall_command",
+"command : flush_command",
+"command : dump_command",
+"command : exit_command",
+"command : spdadd_command",
+"command : spdupdate_command",
+"command : spddelete_command",
+"command : spddump_command",
+"command : spdflush_command",
+"add_command : ADD ipaddropts ipandport ipandport protocol_spec spi extension_spec algorithm_spec EOT",
+"delete_command : DELETE ipaddropts ipandport ipandport protocol_spec spi extension_spec EOT",
+"deleteall_command : DELETEALL ipaddropts ipaddr ipaddr protocol_spec EOT",
+"get_command : GET ipaddropts ipandport ipandport protocol_spec spi extension_spec EOT",
+"flush_command : FLUSH protocol_spec EOT",
+"dump_command : DUMP protocol_spec EOT",
+"protocol_spec :",
+"protocol_spec : PR_ESP",
+"protocol_spec : PR_AH",
+"protocol_spec : PR_IPCOMP",
+"protocol_spec : PR_ESPUDP",
+"protocol_spec : PR_ESPUDP ipaddr",
+"protocol_spec : PR_TCP",
+"spi : DECSTRING",
+"spi : HEXSTRING",
+"algorithm_spec : esp_spec",
+"algorithm_spec : ah_spec",
+"algorithm_spec : ipcomp_spec",
+"esp_spec : F_ENC enc_alg F_AUTH auth_alg",
+"esp_spec : F_ENC enc_alg",
+"ah_spec : F_AUTH auth_alg",
+"ipcomp_spec : F_COMP ALG_COMP",
+"ipcomp_spec : F_COMP ALG_COMP F_RAWCPI",
+"enc_alg : ALG_ENC_NOKEY",
+"enc_alg : ALG_ENC key_string",
+"enc_alg : ALG_ENC_OLD",
+"enc_alg : ALG_ENC_DESDERIV key_string",
+"enc_alg : ALG_ENC_DES32IV key_string",
+"auth_alg : ALG_AUTH key_string",
+"auth_alg : ALG_AUTH_NOKEY",
+"key_string : QUOTEDSTRING",
+"key_string : HEXSTRING",
+"extension_spec :",
+"extension_spec : extension_spec extension",
+"extension : F_EXT EXTENSION",
+"extension : F_EXT NOCYCLICSEQ",
+"extension : F_MODE MODE",
+"extension : F_MODE ANY",
+"extension : F_REQID DECSTRING",
+"extension : F_REPLAY DECSTRING",
+"extension : F_LIFETIME_HARD DECSTRING",
+"extension : F_LIFETIME_SOFT DECSTRING",
+"extension : F_LIFEBYTE_HARD DECSTRING",
+"extension : F_LIFEBYTE_SOFT DECSTRING",
+"extension : SECURITY_CTX DECSTRING DECSTRING QUOTEDSTRING",
+"spdadd_command : SPDADD ipaddropts STRING prefix portstr STRING prefix portstr upper_spec upper_misc_spec context_spec policy_spec EOT",
+"spdadd_command : SPDADD TAGGED QUOTEDSTRING policy_spec EOT",
+"spdupdate_command : SPDUPDATE ipaddropts STRING prefix portstr STRING prefix portstr upper_spec upper_misc_spec context_spec policy_spec EOT",
+"spdupdate_command : SPDUPDATE TAGGED QUOTEDSTRING policy_spec EOT",
+"spddelete_command : SPDDELETE ipaddropts STRING prefix portstr STRING prefix portstr upper_spec upper_misc_spec context_spec policy_spec EOT",
+"spddump_command : SPDDUMP EOT",
+"spdflush_command : SPDFLUSH EOT",
+"ipaddropts :",
+"ipaddropts : ipaddropts ipaddropt",
+"ipaddropt : F_AIFLAGS",
+"ipaddr : STRING",
+"ipandport : STRING",
+"ipandport : STRING portstr",
+"prefix :",
+"prefix : SLASH DECSTRING",
+"portstr :",
+"portstr : BLCL ANY ELCL",
+"portstr : BLCL DECSTRING ELCL",
+"portstr : BLCL STRING ELCL",
+"upper_spec : DECSTRING",
+"upper_spec : ANY",
+"upper_spec : PR_TCP",
+"upper_spec : STRING",
+"upper_misc_spec :",
+"upper_misc_spec : STRING",
+"context_spec :",
+"context_spec : SECURITY_CTX DECSTRING DECSTRING QUOTEDSTRING",
+"policy_spec : F_POLICY policy_requests",
+"policy_requests : PL_REQUESTS",
+"exit_command : EXIT EOT",
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
+};
#endif
+int yydebug;
+int yynerrs;
-#if YYERROR_VERBOSE
+int yyerrflag;
+int yychar;
+YYSTYPE yyval;
+YYSTYPE yylval;
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
+/* define the initial stack-sizes */
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
#endif
-{
- YYUSE (yyvaluep);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
- {
-
- default:
- break;
- }
-}
+#define YYINITSTACKSIZE 200
-
-
-/* The lookahead symbol. */
-int yychar;
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- 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;
- yyvsp = yyvs;
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* 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;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 3:
-/* Line 1787 of yacc.c */
-#line 154 "parse.y"
- {
- free_buffer();
- parse_init();
- }
- break;
-
- case 16:
-/* Line 1787 of yacc.c */
-#line 179 "parse.y"
- {
- int status;
-
- status = setkeymsg_add(SADB_ADD, (yyvsp[(5) - (9)].num), (yyvsp[(3) - (9)].res), (yyvsp[(4) - (9)].res));
- if (status < 0)
- return -1;
- }
- break;
-
- case 17:
-/* Line 1787 of yacc.c */
-#line 191 "parse.y"
- {
- int status;
-
- if ((yyvsp[(3) - (8)].res)->ai_next || (yyvsp[(4) - (8)].res)->ai_next) {
- yyerror("multiple address specified");
- return -1;
- }
- if (p_mode != IPSEC_MODE_ANY)
- yyerror("WARNING: mode is obsolete");
-
- status = setkeymsg_addr(SADB_DELETE, (yyvsp[(5) - (8)].num), (yyvsp[(3) - (8)].res), (yyvsp[(4) - (8)].res), 0);
- if (status < 0)
- return -1;
- }
- break;
-
- case 18:
-/* Line 1787 of yacc.c */
-#line 210 "parse.y"
- {
-#ifndef __linux__
- if (setkeymsg_addr(SADB_DELETE, (yyvsp[(5) - (6)].num), (yyvsp[(3) - (6)].res), (yyvsp[(4) - (6)].res), 1) < 0)
- return -1;
-#else /* __linux__ */
- /* linux strictly adheres to RFC2367, and returns
- * an error if we send an SADB_DELETE request without
- * an SPI. Therefore, we must first retrieve a list
- * of SPIs for all matching SADB entries, and then
- * delete each one separately. */
- u_int32_t *spi;
- int i, n;
-
- spi = sendkeymsg_spigrep((yyvsp[(5) - (6)].num), (yyvsp[(3) - (6)].res), (yyvsp[(4) - (6)].res), &n);
- for (i = 0; i < n; i++) {
- p_spi = spi[i];
- if (setkeymsg_addr(SADB_DELETE,
- (yyvsp[(5) - (6)].num), (yyvsp[(3) - (6)].res), (yyvsp[(4) - (6)].res), 0) < 0)
- return -1;
- }
- free(spi);
-#endif /* __linux__ */
- }
- break;
-
- case 19:
-/* Line 1787 of yacc.c */
-#line 238 "parse.y"
- {
- int status;
-
- if (p_mode != IPSEC_MODE_ANY)
- yyerror("WARNING: mode is obsolete");
-
- status = setkeymsg_addr(SADB_GET, (yyvsp[(5) - (8)].num), (yyvsp[(3) - (8)].res), (yyvsp[(4) - (8)].res), 0);
- if (status < 0)
- return -1;
- }
- break;
-
- case 20:
-/* Line 1787 of yacc.c */
-#line 253 "parse.y"
- {
- struct sadb_msg msg;
- setkeymsg0(&msg, SADB_FLUSH, (yyvsp[(2) - (3)].num), sizeof(msg));
- sendkeymsg((char *)&msg, sizeof(msg));
- }
- break;
-
- case 21:
-/* Line 1787 of yacc.c */
-#line 263 "parse.y"
- {
- struct sadb_msg msg;
- setkeymsg0(&msg, SADB_DUMP, (yyvsp[(2) - (3)].num), sizeof(msg));
- sendkeymsg((char *)&msg, sizeof(msg));
- }
- break;
-
- case 22:
-/* Line 1787 of yacc.c */
-#line 272 "parse.y"
- {
- (yyval.num) = SADB_SATYPE_UNSPEC;
- }
- break;
-
- case 23:
-/* Line 1787 of yacc.c */
-#line 276 "parse.y"
- {
- (yyval.num) = SADB_SATYPE_ESP;
- if ((yyvsp[(1) - (1)].num) == 1)
- p_ext |= SADB_X_EXT_OLD;
- else
- p_ext &= ~SADB_X_EXT_OLD;
- }
- break;
-
- case 24:
-/* Line 1787 of yacc.c */
-#line 284 "parse.y"
- {
- (yyval.num) = SADB_SATYPE_AH;
- if ((yyvsp[(1) - (1)].num) == 1)
- p_ext |= SADB_X_EXT_OLD;
- else
- p_ext &= ~SADB_X_EXT_OLD;
- }
- break;
-
- case 25:
-/* Line 1787 of yacc.c */
-#line 292 "parse.y"
- {
- (yyval.num) = SADB_X_SATYPE_IPCOMP;
- }
- break;
-
- case 26:
-/* Line 1787 of yacc.c */
-#line 296 "parse.y"
- {
- (yyval.num) = SADB_SATYPE_ESP;
- p_ext &= ~SADB_X_EXT_OLD;
- p_natt_oa = 0;
- p_natt_type = UDP_ENCAP_ESPINUDP;
- }
- break;
-
- case 27:
-/* Line 1787 of yacc.c */
-#line 303 "parse.y"
- {
- (yyval.num) = SADB_SATYPE_ESP;
- p_ext &= ~SADB_X_EXT_OLD;
- p_natt_oa = (yyvsp[(2) - (2)].res);
- p_natt_type = UDP_ENCAP_ESPINUDP;
- }
- break;
-
- case 28:
-/* Line 1787 of yacc.c */
-#line 310 "parse.y"
- {
-#ifdef SADB_X_SATYPE_TCPSIGNATURE
- (yyval.num) = SADB_X_SATYPE_TCPSIGNATURE;
-#endif
- }
- break;
-
- case 29:
-/* Line 1787 of yacc.c */
-#line 318 "parse.y"
- { p_spi = (yyvsp[(1) - (1)].ulnum); }
- break;
-
- case 30:
-/* Line 1787 of yacc.c */
-#line 320 "parse.y"
- {
- char *ep;
- unsigned long v;
-
- ep = NULL;
- v = strtoul((yyvsp[(1) - (1)].val).buf, &ep, 16);
- if (!ep || *ep) {
- yyerror("invalid SPI");
- return -1;
- }
- if (v & ~0xffffffff) {
- yyerror("SPI too big.");
- return -1;
- }
-
- p_spi = v;
- }
- break;
-
- case 37:
-/* Line 1787 of yacc.c */
-#line 356 "parse.y"
- {
- if ((yyvsp[(2) - (2)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_enc = (yyvsp[(2) - (2)].num);
- }
- break;
-
- case 38:
-/* Line 1787 of yacc.c */
-#line 364 "parse.y"
- {
- if ((yyvsp[(2) - (3)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_enc = (yyvsp[(2) - (3)].num);
- p_ext |= SADB_X_EXT_RAWCPI;
- }
- break;
-
- case 39:
-/* Line 1787 of yacc.c */
-#line 375 "parse.y"
- {
- if ((yyvsp[(1) - (1)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_enc = (yyvsp[(1) - (1)].num);
-
- p_key_enc_len = 0;
- p_key_enc = "";
- if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
- p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
- yyerror(ipsec_strerror());
- return -1;
- }
- }
- break;
-
- case 40:
-/* Line 1787 of yacc.c */
-#line 390 "parse.y"
- {
- if ((yyvsp[(1) - (2)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_enc = (yyvsp[(1) - (2)].num);
-
- p_key_enc_len = (yyvsp[(2) - (2)].val).len;
- p_key_enc = (yyvsp[(2) - (2)].val).buf;
- if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
- p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
- yyerror(ipsec_strerror());
- return -1;
- }
- }
- break;
-
- case 41:
-/* Line 1787 of yacc.c */
-#line 405 "parse.y"
- {
- if ((yyvsp[(1) - (1)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- yyerror("WARNING: obsolete algorithm");
- p_alg_enc = (yyvsp[(1) - (1)].num);
-
- p_key_enc_len = 0;
- p_key_enc = "";
- if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
- p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
- yyerror(ipsec_strerror());
- return -1;
- }
- }
- break;
-
- case 42:
-/* Line 1787 of yacc.c */
-#line 422 "parse.y"
- {
- if ((yyvsp[(1) - (2)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_enc = (yyvsp[(1) - (2)].num);
- if (p_ext & SADB_X_EXT_OLD) {
- yyerror("algorithm mismatched");
- return -1;
- }
- p_ext |= SADB_X_EXT_DERIV;
-
- p_key_enc_len = (yyvsp[(2) - (2)].val).len;
- p_key_enc = (yyvsp[(2) - (2)].val).buf;
- if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
- p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
- yyerror(ipsec_strerror());
- return -1;
- }
- }
- break;
-
- case 43:
-/* Line 1787 of yacc.c */
-#line 443 "parse.y"
- {
- if ((yyvsp[(1) - (2)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_enc = (yyvsp[(1) - (2)].num);
- if (!(p_ext & SADB_X_EXT_OLD)) {
- yyerror("algorithm mismatched");
- return -1;
- }
- p_ext |= SADB_X_EXT_IV4B;
-
- p_key_enc_len = (yyvsp[(2) - (2)].val).len;
- p_key_enc = (yyvsp[(2) - (2)].val).buf;
- if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
- p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
- yyerror(ipsec_strerror());
- return -1;
- }
- }
- break;
-
- case 44:
-/* Line 1787 of yacc.c */
-#line 466 "parse.y"
- {
- if ((yyvsp[(1) - (2)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_auth = (yyvsp[(1) - (2)].num);
-
- p_key_auth_len = (yyvsp[(2) - (2)].val).len;
- p_key_auth = (yyvsp[(2) - (2)].val).buf;
-#ifdef SADB_X_AALG_TCP_MD5
- if (p_alg_auth == SADB_X_AALG_TCP_MD5) {
- if ((p_key_auth_len < 1) ||
- (p_key_auth_len > 80))
- return -1;
- } else
-#endif
- {
- if (ipsec_check_keylen(SADB_EXT_SUPPORTED_AUTH,
- p_alg_auth,
- PFKEY_UNUNIT64(p_key_auth_len)) < 0) {
- yyerror(ipsec_strerror());
- return -1;
- }
- }
- }
- break;
-
- case 45:
-/* Line 1787 of yacc.c */
-#line 491 "parse.y"
- {
- if ((yyvsp[(1) - (1)].num) < 0) {
- yyerror("unsupported algorithm");
- return -1;
- }
- p_alg_auth = (yyvsp[(1) - (1)].num);
-
- p_key_auth_len = 0;
- p_key_auth = NULL;
- }
- break;
-
- case 46:
-/* Line 1787 of yacc.c */
-#line 505 "parse.y"
- {
- (yyval.val) = (yyvsp[(1) - (1)].val);
- }
- break;
-
- case 47:
-/* Line 1787 of yacc.c */
-#line 509 "parse.y"
- {
- caddr_t pp_key;
- caddr_t bp;
- caddr_t yp = (yyvsp[(1) - (1)].val).buf;
- int l;
-
- l = strlen(yp) % 2 + strlen(yp) / 2;
- if ((pp_key = malloc(l)) == 0) {
- yyerror("not enough core");
- return -1;
- }
- memset(pp_key, 0, l);
-
- bp = pp_key;
- if (strlen(yp) % 2) {
- *bp = ATOX(yp[0]);
- yp++, bp++;
- }
- while (*yp) {
- *bp = (ATOX(yp[0]) << 4) | ATOX(yp[1]);
- yp += 2, bp++;
- }
-
- (yyval.val).len = l;
- (yyval.val).buf = pp_key;
- }
- break;
-
- case 50:
-/* Line 1787 of yacc.c */
-#line 543 "parse.y"
- { p_ext |= (yyvsp[(2) - (2)].num); }
- break;
-
- case 51:
-/* Line 1787 of yacc.c */
-#line 544 "parse.y"
- { p_ext &= ~SADB_X_EXT_CYCSEQ; }
- break;
-
- case 52:
-/* Line 1787 of yacc.c */
-#line 545 "parse.y"
- { p_mode = (yyvsp[(2) - (2)].num); }
- break;
-
- case 53:
-/* Line 1787 of yacc.c */
-#line 546 "parse.y"
- { p_mode = IPSEC_MODE_ANY; }
- break;
-
- case 54:
-/* Line 1787 of yacc.c */
-#line 547 "parse.y"
- { p_reqid = (yyvsp[(2) - (2)].ulnum); }
- break;
-
- case 55:
-/* Line 1787 of yacc.c */
-#line 549 "parse.y"
- {
- if ((p_ext & SADB_X_EXT_OLD) != 0) {
- yyerror("replay prevention cannot be used with "
- "ah/esp-old");
- return -1;
- }
- p_replay = (yyvsp[(2) - (2)].ulnum);
- }
- break;
-
- case 56:
-/* Line 1787 of yacc.c */
-#line 557 "parse.y"
- { p_lt_hard = (yyvsp[(2) - (2)].ulnum); }
- break;
-
- case 57:
-/* Line 1787 of yacc.c */
-#line 558 "parse.y"
- { p_lt_soft = (yyvsp[(2) - (2)].ulnum); }
- break;
-
- case 58:
-/* Line 1787 of yacc.c */
-#line 559 "parse.y"
- { p_lb_hard = (yyvsp[(2) - (2)].ulnum); }
- break;
-
- case 59:
-/* Line 1787 of yacc.c */
-#line 560 "parse.y"
- { p_lb_soft = (yyvsp[(2) - (2)].ulnum); }
- break;
-
- case 60:
-/* Line 1787 of yacc.c */
-#line 561 "parse.y"
- {
- sec_ctx.doi = (yyvsp[(2) - (4)].ulnum);
- sec_ctx.alg = (yyvsp[(3) - (4)].ulnum);
- sec_ctx.len = (yyvsp[(4) - (4)].val).len+1;
- sec_ctx.buf = (yyvsp[(4) - (4)].val).buf;
- }
- break;
-
- case 61:
-/* Line 1787 of yacc.c */
-#line 574 "parse.y"
- {
- int status;
- struct addrinfo *src, *dst;
-
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
- last_msg_type = SADB_X_SPDADD;
-#endif
-
- /* fixed port fields if ulp is icmp */
- if (fix_portstr((yyvsp[(9) - (13)].num), &(yyvsp[(10) - (13)].val), &(yyvsp[(5) - (13)].val), &(yyvsp[(8) - (13)].val)))
- return -1;
-
- src = parse_addr((yyvsp[(3) - (13)].val).buf, (yyvsp[(5) - (13)].val).buf);
- dst = parse_addr((yyvsp[(6) - (13)].val).buf, (yyvsp[(8) - (13)].val).buf);
- if (!src || !dst) {
- /* yyerror is already called */
- return -1;
- }
- if (src->ai_next || dst->ai_next) {
- yyerror("multiple address specified");
- freeaddrinfo(src);
- freeaddrinfo(dst);
- return -1;
- }
-
- status = setkeymsg_spdaddr(SADB_X_SPDADD, (yyvsp[(9) - (13)].num), &(yyvsp[(12) - (13)].val),
- src, (yyvsp[(4) - (13)].num), dst, (yyvsp[(7) - (13)].num));
- freeaddrinfo(src);
- freeaddrinfo(dst);
- if (status < 0)
- return -1;
- }
- break;
-
- case 62:
-/* Line 1787 of yacc.c */
-#line 607 "parse.y"
- {
- int status;
-
- status = setkeymsg_spdaddr_tag(SADB_X_SPDADD,
- (yyvsp[(3) - (5)].val).buf, &(yyvsp[(4) - (5)].val));
- if (status < 0)
- return -1;
- }
- break;
-
- case 63:
-/* Line 1787 of yacc.c */
-#line 620 "parse.y"
- {
- int status;
- struct addrinfo *src, *dst;
-
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
- last_msg_type = SADB_X_SPDUPDATE;
-#endif
-
- /* fixed port fields if ulp is icmp */
- if (fix_portstr((yyvsp[(9) - (13)].num), &(yyvsp[(10) - (13)].val), &(yyvsp[(5) - (13)].val), &(yyvsp[(8) - (13)].val)))
- return -1;
-
- src = parse_addr((yyvsp[(3) - (13)].val).buf, (yyvsp[(5) - (13)].val).buf);
- dst = parse_addr((yyvsp[(6) - (13)].val).buf, (yyvsp[(8) - (13)].val).buf);
- if (!src || !dst) {
- /* yyerror is already called */
- return -1;
- }
- if (src->ai_next || dst->ai_next) {
- yyerror("multiple address specified");
- freeaddrinfo(src);
- freeaddrinfo(dst);
- return -1;
- }
-
- status = setkeymsg_spdaddr(SADB_X_SPDUPDATE, (yyvsp[(9) - (13)].num), &(yyvsp[(12) - (13)].val),
- src, (yyvsp[(4) - (13)].num), dst, (yyvsp[(7) - (13)].num));
- freeaddrinfo(src);
- freeaddrinfo(dst);
- if (status < 0)
- return -1;
- }
- break;
-
- case 64:
-/* Line 1787 of yacc.c */
-#line 653 "parse.y"
- {
- int status;
-
- status = setkeymsg_spdaddr_tag(SADB_X_SPDUPDATE,
- (yyvsp[(3) - (5)].val).buf, &(yyvsp[(4) - (5)].val));
- if (status < 0)
- return -1;
- }
- break;
-
- case 65:
-/* Line 1787 of yacc.c */
-#line 665 "parse.y"
- {
- int status;
- struct addrinfo *src, *dst;
-
- /* fixed port fields if ulp is icmp */
- if (fix_portstr((yyvsp[(9) - (13)].num), &(yyvsp[(10) - (13)].val), &(yyvsp[(5) - (13)].val), &(yyvsp[(8) - (13)].val)))
- return -1;
-
- src = parse_addr((yyvsp[(3) - (13)].val).buf, (yyvsp[(5) - (13)].val).buf);
- dst = parse_addr((yyvsp[(6) - (13)].val).buf, (yyvsp[(8) - (13)].val).buf);
- if (!src || !dst) {
- /* yyerror is already called */
- return -1;
- }
- if (src->ai_next || dst->ai_next) {
- yyerror("multiple address specified");
- freeaddrinfo(src);
- freeaddrinfo(dst);
- return -1;
- }
-
- status = setkeymsg_spdaddr(SADB_X_SPDDELETE, (yyvsp[(9) - (13)].num), &(yyvsp[(12) - (13)].val),
- src, (yyvsp[(4) - (13)].num), dst, (yyvsp[(7) - (13)].num));
- freeaddrinfo(src);
- freeaddrinfo(dst);
- if (status < 0)
- return -1;
- }
- break;
-
- case 66:
-/* Line 1787 of yacc.c */
-#line 697 "parse.y"
- {
- struct sadb_msg msg;
- setkeymsg0(&msg, SADB_X_SPDDUMP, SADB_SATYPE_UNSPEC,
- sizeof(msg));
- sendkeymsg((char *)&msg, sizeof(msg));
- }
- break;
-
- case 67:
-/* Line 1787 of yacc.c */
-#line 708 "parse.y"
- {
- struct sadb_msg msg;
- setkeymsg0(&msg, SADB_X_SPDFLUSH, SADB_SATYPE_UNSPEC,
- sizeof(msg));
- sendkeymsg((char *)&msg, sizeof(msg));
- }
- break;
-
- case 70:
-/* Line 1787 of yacc.c */
-#line 723 "parse.y"
- {
- char *p;
-
- for (p = (yyvsp[(1) - (1)].val).buf + 1; *p; p++)
- switch (*p) {
- case '4':
- p_aifamily = AF_INET;
- break;
-#ifdef INET6
- case '6':
- p_aifamily = AF_INET6;
- break;
-#endif
- case 'n':
- p_aiflags = AI_NUMERICHOST;
- break;
- default:
- yyerror("invalid flag");
- return -1;
- }
- }
- break;
-
- case 71:
-/* Line 1787 of yacc.c */
-#line 748 "parse.y"
- {
- (yyval.res) = parse_addr((yyvsp[(1) - (1)].val).buf, NULL);
- if ((yyval.res) == NULL) {
- /* yyerror already called by parse_addr */
- return -1;
- }
- }
- break;
-
- case 72:
-/* Line 1787 of yacc.c */
-#line 759 "parse.y"
- {
- (yyval.res) = parse_addr((yyvsp[(1) - (1)].val).buf, NULL);
- if ((yyval.res) == NULL) {
- /* yyerror already called by parse_addr */
- return -1;
- }
- }
- break;
-
- case 73:
-/* Line 1787 of yacc.c */
-#line 767 "parse.y"
- {
- (yyval.res) = parse_addr((yyvsp[(1) - (2)].val).buf, (yyvsp[(2) - (2)].val).buf);
- if ((yyval.res) == NULL) {
- /* yyerror already called by parse_addr */
- return -1;
- }
- }
- break;
-
- case 74:
-/* Line 1787 of yacc.c */
-#line 777 "parse.y"
- { (yyval.num) = -1; }
- break;
-
- case 75:
-/* Line 1787 of yacc.c */
-#line 778 "parse.y"
- { (yyval.num) = (yyvsp[(2) - (2)].ulnum); }
- break;
-
- case 76:
-/* Line 1787 of yacc.c */
-#line 783 "parse.y"
- {
- (yyval.val).buf = strdup("0");
- if (!(yyval.val).buf) {
- yyerror("insufficient memory");
- return -1;
- }
- (yyval.val).len = strlen((yyval.val).buf);
- }
- break;
-
- case 77:
-/* Line 1787 of yacc.c */
-#line 792 "parse.y"
- {
- (yyval.val).buf = strdup("0");
- if (!(yyval.val).buf) {
- yyerror("insufficient memory");
- return -1;
- }
- (yyval.val).len = strlen((yyval.val).buf);
- }
- break;
-
- case 78:
-/* Line 1787 of yacc.c */
-#line 801 "parse.y"
- {
- char buf[20];
- snprintf(buf, sizeof(buf), "%lu", (yyvsp[(2) - (3)].ulnum));
- (yyval.val).buf = strdup(buf);
- if (!(yyval.val).buf) {
- yyerror("insufficient memory");
- return -1;
- }
- (yyval.val).len = strlen((yyval.val).buf);
- }
- break;
-
- case 79:
-/* Line 1787 of yacc.c */
-#line 812 "parse.y"
- {
- (yyval.val) = (yyvsp[(2) - (3)].val);
- }
- break;
-
- case 80:
-/* Line 1787 of yacc.c */
-#line 818 "parse.y"
- { (yyval.num) = (yyvsp[(1) - (1)].ulnum); }
- break;
-
- case 81:
-/* Line 1787 of yacc.c */
-#line 819 "parse.y"
- { (yyval.num) = IPSEC_ULPROTO_ANY; }
- break;
-
- case 82:
-/* Line 1787 of yacc.c */
-#line 820 "parse.y"
- {
- (yyval.num) = IPPROTO_TCP;
- }
- break;
-
- case 83:
-/* Line 1787 of yacc.c */
-#line 824 "parse.y"
- {
- struct protoent *ent;
-
- ent = getprotobyname((yyvsp[(1) - (1)].val).buf);
- if (ent)
- (yyval.num) = ent->p_proto;
- else {
- if (strcmp("icmp6", (yyvsp[(1) - (1)].val).buf) == 0) {
- (yyval.num) = IPPROTO_ICMPV6;
- } else if(strcmp("ip4", (yyvsp[(1) - (1)].val).buf) == 0) {
- (yyval.num) = IPPROTO_IPV4;
- } else {
- yyerror("invalid upper layer protocol");
- return -1;
- }
- }
- endprotoent();
- }
- break;
-
- case 84:
-/* Line 1787 of yacc.c */
-#line 846 "parse.y"
- {
- (yyval.val).buf = NULL;
- (yyval.val).len = 0;
- }
- break;
-
- case 85:
-/* Line 1787 of yacc.c */
-#line 851 "parse.y"
- {
- (yyval.val).buf = strdup((yyvsp[(1) - (1)].val).buf);
- if (!(yyval.val).buf) {
- yyerror("insufficient memory");
- return -1;
- }
- (yyval.val).len = strlen((yyval.val).buf);
- }
- break;
-
- case 87:
-/* Line 1787 of yacc.c */
-#line 863 "parse.y"
- {
- sec_ctx.doi = (yyvsp[(2) - (4)].ulnum);
- sec_ctx.alg = (yyvsp[(3) - (4)].ulnum);
- sec_ctx.len = (yyvsp[(4) - (4)].val).len+1;
- sec_ctx.buf = (yyvsp[(4) - (4)].val).buf;
- }
- break;
-
- case 88:
-/* Line 1787 of yacc.c */
-#line 873 "parse.y"
- {
- char *policy;
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
- struct sadb_x_policy *xpl;
-#endif
-
- policy = ipsec_set_policy((yyvsp[(2) - (2)].val).buf, (yyvsp[(2) - (2)].val).len);
- if (policy == NULL) {
- yyerror(ipsec_strerror());
- return -1;
- }
-
- (yyval.val).buf = policy;
- (yyval.val).len = ipsec_get_policylen(policy);
-
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
- xpl = (struct sadb_x_policy *) (yyval.val).buf;
- last_priority = xpl->sadb_x_policy_priority;
-#endif
- }
- break;
-
- case 89:
-/* Line 1787 of yacc.c */
-#line 896 "parse.y"
- { (yyval.val) = (yyvsp[(1) - (1)].val); }
- break;
-
- case 90:
-/* Line 1787 of yacc.c */
-#line 902 "parse.y"
- {
- exit_now = 1;
- YYACCEPT;
- }
- break;
-
-
-/* Line 1787 of yacc.c */
-#line 2617 "parse.c"
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* 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 - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
-
-
-/* Line 2048 of yacc.c */
-#line 907 "parse.y"
-
+typedef struct {
+ unsigned stacksize;
+ YYINT *s_base;
+ YYINT *s_mark;
+ YYINT *s_last;
+ YYSTYPE *l_base;
+ YYSTYPE *l_mark;
+} YYSTACKDATA;
+/* variables for the parser stack */
+static YYSTACKDATA yystack;
+#line 919 "../../ipsec-tools/src/setkey/parse.y"
int
setkeymsg0(msg, type, satype, l)
@@ -3608,3 +1349,1025 @@ free_buffer()
return;
}
+#line 1353 "setkeyyy.tab.c"
+
+#if YYDEBUG
+#include <stdio.h> /* needed for printf */
+#endif
+
+#include <stdlib.h> /* needed for malloc, etc */
+#include <string.h> /* needed for memset */
+
+/* allocate initial stack or double stack size, up to YYMAXDEPTH */
+static int yygrowstack(YYSTACKDATA *data)
+{
+ int i;
+ unsigned newsize;
+ YYINT *newss;
+ YYSTYPE *newvs;
+
+ if ((newsize = data->stacksize) == 0)
+ newsize = YYINITSTACKSIZE;
+ else if (newsize >= YYMAXDEPTH)
+ return YYENOMEM;
+ else if ((newsize *= 2) > YYMAXDEPTH)
+ newsize = YYMAXDEPTH;
+
+ i = (int) (data->s_mark - data->s_base);
+ newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
+ if (newss == 0)
+ return YYENOMEM;
+
+ data->s_base = newss;
+ data->s_mark = newss + i;
+
+ newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
+ if (newvs == 0)
+ return YYENOMEM;
+
+ data->l_base = newvs;
+ data->l_mark = newvs + i;
+
+ data->stacksize = newsize;
+ data->s_last = data->s_base + newsize - 1;
+ return 0;
+}
+
+#if YYPURE || defined(YY_NO_LEAKS)
+static void yyfreestack(YYSTACKDATA *data)
+{
+ free(data->s_base);
+ free(data->l_base);
+ memset(data, 0, sizeof(*data));
+}
+#else
+#define yyfreestack(data) /* nothing */
+#endif
+
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+
+int
+YYPARSE_DECL()
+{
+ int yym, yyn, yystate;
+#if YYDEBUG
+ const char *yys;
+
+ if ((yys = getenv("YYDEBUG")) != 0)
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+#endif
+
+ yym = 0;
+ yyn = 0;
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = YYEMPTY;
+ yystate = 0;
+
+#if YYPURE
+ memset(&yystack, 0, sizeof(yystack));
+#endif
+
+ if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystack.s_mark = yystack.s_base;
+ yystack.l_mark = yystack.l_base;
+ yystate = 0;
+ *yystack.s_mark = 0;
+
+yyloop:
+ if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ }
+ if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ yychar = YYEMPTY;
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag != 0) goto yyinrecovery;
+
+ YYERROR_CALL("syntax error");
+
+ goto yyerrlab; /* redundant goto avoids 'unused label' warning */
+yyerrlab:
+ ++yynerrs;
+
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ yystate = yytable[yyn];
+ *++yystack.s_mark = yytable[yyn];
+ *++yystack.l_mark = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yystack.s_mark);
+#endif
+ if (yystack.s_mark <= yystack.s_base) goto yyabort;
+ --yystack.s_mark;
+ --yystack.l_mark;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == YYEOF) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = YYEMPTY;
+ goto yyloop;
+ }
+
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ if (yym > 0)
+ yyval = yystack.l_mark[1-yym];
+ else
+ memset(&yyval, 0, sizeof yyval);
+
+ switch (yyn)
+ {
+case 2:
+#line 165 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ free_buffer();
+ parse_init();
+ }
+break;
+case 15:
+#line 190 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+
+ status = setkeymsg_add(SADB_ADD, yystack.l_mark[-4].num, yystack.l_mark[-6].res, yystack.l_mark[-5].res);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 16:
+#line 202 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+
+ if (yystack.l_mark[-5].res->ai_next || yystack.l_mark[-4].res->ai_next) {
+ yyerror("multiple address specified");
+ return -1;
+ }
+ if (p_mode != IPSEC_MODE_ANY)
+ yyerror("WARNING: mode is obsolete");
+
+ status = setkeymsg_addr(SADB_DELETE, yystack.l_mark[-3].num, yystack.l_mark[-5].res, yystack.l_mark[-4].res, 0);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 17:
+#line 221 "../../ipsec-tools/src/setkey/parse.y"
+ {
+#ifndef __linux__
+ if (setkeymsg_addr(SADB_DELETE, yystack.l_mark[-1].num, yystack.l_mark[-3].res, yystack.l_mark[-2].res, 1) < 0)
+ return -1;
+#else /* __linux__ */
+ /* linux strictly adheres to RFC2367, and returns
+ * an error if we send an SADB_DELETE request without
+ * an SPI. Therefore, we must first retrieve a list
+ * of SPIs for all matching SADB entries, and then
+ * delete each one separately. */
+ u_int32_t *spi;
+ int i, n;
+
+ spi = sendkeymsg_spigrep(yystack.l_mark[-1].num, yystack.l_mark[-3].res, yystack.l_mark[-2].res, &n);
+ for (i = 0; i < n; i++) {
+ p_spi = spi[i];
+ if (setkeymsg_addr(SADB_DELETE,
+ yystack.l_mark[-1].num, yystack.l_mark[-3].res, yystack.l_mark[-2].res, 0) < 0)
+ return -1;
+ }
+ free(spi);
+#endif /* __linux__ */
+ }
+break;
+case 18:
+#line 249 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+
+ if (p_mode != IPSEC_MODE_ANY)
+ yyerror("WARNING: mode is obsolete");
+
+ status = setkeymsg_addr(SADB_GET, yystack.l_mark[-3].num, yystack.l_mark[-5].res, yystack.l_mark[-4].res, 0);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 19:
+#line 264 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ struct sadb_msg msg;
+ setkeymsg0(&msg, SADB_FLUSH, yystack.l_mark[-1].num, sizeof(msg));
+ sendkeymsg((char *)&msg, sizeof(msg));
+ }
+break;
+case 20:
+#line 274 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ struct sadb_msg msg;
+ setkeymsg0(&msg, SADB_DUMP, yystack.l_mark[-1].num, sizeof(msg));
+ sendkeymsg((char *)&msg, sizeof(msg));
+ }
+break;
+case 21:
+#line 283 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = SADB_SATYPE_UNSPEC;
+ }
+break;
+case 22:
+#line 287 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = SADB_SATYPE_ESP;
+ if (yystack.l_mark[0].num == 1)
+ p_ext |= SADB_X_EXT_OLD;
+ else
+ p_ext &= ~SADB_X_EXT_OLD;
+ }
+break;
+case 23:
+#line 295 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = SADB_SATYPE_AH;
+ if (yystack.l_mark[0].num == 1)
+ p_ext |= SADB_X_EXT_OLD;
+ else
+ p_ext &= ~SADB_X_EXT_OLD;
+ }
+break;
+case 24:
+#line 303 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = SADB_X_SATYPE_IPCOMP;
+ }
+break;
+case 25:
+#line 307 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = SADB_SATYPE_ESP;
+ p_ext &= ~SADB_X_EXT_OLD;
+ p_natt_oa = 0;
+ p_natt_type = UDP_ENCAP_ESPINUDP;
+ }
+break;
+case 26:
+#line 314 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = SADB_SATYPE_ESP;
+ p_ext &= ~SADB_X_EXT_OLD;
+ p_natt_oa = yystack.l_mark[0].res;
+ p_natt_type = UDP_ENCAP_ESPINUDP;
+ }
+break;
+case 27:
+#line 321 "../../ipsec-tools/src/setkey/parse.y"
+ {
+#ifdef SADB_X_SATYPE_TCPSIGNATURE
+ yyval.num = SADB_X_SATYPE_TCPSIGNATURE;
+#endif
+ }
+break;
+case 28:
+#line 329 "../../ipsec-tools/src/setkey/parse.y"
+ { p_spi = yystack.l_mark[0].ulnum; }
+break;
+case 29:
+#line 331 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ char *ep;
+ unsigned long v;
+
+ ep = NULL;
+ v = strtoul(yystack.l_mark[0].val.buf, &ep, 16);
+ if (!ep || *ep) {
+ yyerror("invalid SPI");
+ return -1;
+ }
+ if (v & ~0xffffffff) {
+ yyerror("SPI too big.");
+ return -1;
+ }
+
+ p_spi = v;
+ }
+break;
+case 36:
+#line 367 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[0].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_enc = yystack.l_mark[0].num;
+ }
+break;
+case 37:
+#line 375 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[-1].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_enc = yystack.l_mark[-1].num;
+ p_ext |= SADB_X_EXT_RAWCPI;
+ }
+break;
+case 38:
+#line 386 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[0].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_enc = yystack.l_mark[0].num;
+
+ p_key_enc_len = 0;
+ p_key_enc = "";
+ if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
+ p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+ }
+break;
+case 39:
+#line 401 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[-1].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_enc = yystack.l_mark[-1].num;
+
+ p_key_enc_len = yystack.l_mark[0].val.len;
+ p_key_enc = yystack.l_mark[0].val.buf;
+ if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
+ p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+ }
+break;
+case 40:
+#line 416 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[0].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ yyerror("WARNING: obsolete algorithm");
+ p_alg_enc = yystack.l_mark[0].num;
+
+ p_key_enc_len = 0;
+ p_key_enc = "";
+ if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
+ p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+ }
+break;
+case 41:
+#line 433 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[-1].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_enc = yystack.l_mark[-1].num;
+ if (p_ext & SADB_X_EXT_OLD) {
+ yyerror("algorithm mismatched");
+ return -1;
+ }
+ p_ext |= SADB_X_EXT_DERIV;
+
+ p_key_enc_len = yystack.l_mark[0].val.len;
+ p_key_enc = yystack.l_mark[0].val.buf;
+ if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
+ p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+ }
+break;
+case 42:
+#line 454 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[-1].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_enc = yystack.l_mark[-1].num;
+ if (!(p_ext & SADB_X_EXT_OLD)) {
+ yyerror("algorithm mismatched");
+ return -1;
+ }
+ p_ext |= SADB_X_EXT_IV4B;
+
+ p_key_enc_len = yystack.l_mark[0].val.len;
+ p_key_enc = yystack.l_mark[0].val.buf;
+ if (ipsec_check_keylen(SADB_EXT_SUPPORTED_ENCRYPT,
+ p_alg_enc, PFKEY_UNUNIT64(p_key_enc_len)) < 0) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+ }
+break;
+case 43:
+#line 477 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[-1].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_auth = yystack.l_mark[-1].num;
+
+ p_key_auth_len = yystack.l_mark[0].val.len;
+ p_key_auth = yystack.l_mark[0].val.buf;
+#ifdef SADB_X_AALG_TCP_MD5
+ if (p_alg_auth == SADB_X_AALG_TCP_MD5) {
+ if ((p_key_auth_len < 1) ||
+ (p_key_auth_len > 80))
+ return -1;
+ } else
+#endif
+ {
+ if (ipsec_check_keylen(SADB_EXT_SUPPORTED_AUTH,
+ p_alg_auth,
+ PFKEY_UNUNIT64(p_key_auth_len)) < 0) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+ }
+ }
+break;
+case 44:
+#line 502 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if (yystack.l_mark[0].num < 0) {
+ yyerror("unsupported algorithm");
+ return -1;
+ }
+ p_alg_auth = yystack.l_mark[0].num;
+
+ p_key_auth_len = 0;
+ p_key_auth = NULL;
+ }
+break;
+case 45:
+#line 516 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.val = yystack.l_mark[0].val;
+ }
+break;
+case 46:
+#line 520 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ caddr_t pp_key;
+ caddr_t bp;
+ caddr_t yp = yystack.l_mark[0].val.buf;
+ int l;
+
+ l = strlen(yp) % 2 + strlen(yp) / 2;
+ if ((pp_key = malloc(l)) == 0) {
+ yyerror("not enough core");
+ return -1;
+ }
+ memset(pp_key, 0, l);
+
+ bp = pp_key;
+ if (strlen(yp) % 2) {
+ *bp = ATOX(yp[0]);
+ yp++, bp++;
+ }
+ while (*yp) {
+ *bp = (ATOX(yp[0]) << 4) | ATOX(yp[1]);
+ yp += 2, bp++;
+ }
+
+ yyval.val.len = l;
+ yyval.val.buf = pp_key;
+ }
+break;
+case 49:
+#line 554 "../../ipsec-tools/src/setkey/parse.y"
+ { p_ext |= yystack.l_mark[0].num; }
+break;
+case 50:
+#line 555 "../../ipsec-tools/src/setkey/parse.y"
+ { p_ext &= ~SADB_X_EXT_CYCSEQ; }
+break;
+case 51:
+#line 556 "../../ipsec-tools/src/setkey/parse.y"
+ { p_mode = yystack.l_mark[0].num; }
+break;
+case 52:
+#line 557 "../../ipsec-tools/src/setkey/parse.y"
+ { p_mode = IPSEC_MODE_ANY; }
+break;
+case 53:
+#line 558 "../../ipsec-tools/src/setkey/parse.y"
+ { p_reqid = yystack.l_mark[0].ulnum; }
+break;
+case 54:
+#line 560 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ if ((p_ext & SADB_X_EXT_OLD) != 0) {
+ yyerror("replay prevention cannot be used with "
+ "ah/esp-old");
+ return -1;
+ }
+ p_replay = yystack.l_mark[0].ulnum;
+ }
+break;
+case 55:
+#line 568 "../../ipsec-tools/src/setkey/parse.y"
+ { p_lt_hard = yystack.l_mark[0].ulnum; }
+break;
+case 56:
+#line 569 "../../ipsec-tools/src/setkey/parse.y"
+ { p_lt_soft = yystack.l_mark[0].ulnum; }
+break;
+case 57:
+#line 570 "../../ipsec-tools/src/setkey/parse.y"
+ { p_lb_hard = yystack.l_mark[0].ulnum; }
+break;
+case 58:
+#line 571 "../../ipsec-tools/src/setkey/parse.y"
+ { p_lb_soft = yystack.l_mark[0].ulnum; }
+break;
+case 59:
+#line 572 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ sec_ctx.doi = yystack.l_mark[-2].ulnum;
+ sec_ctx.alg = yystack.l_mark[-1].ulnum;
+ sec_ctx.len = yystack.l_mark[0].val.len+1;
+ sec_ctx.buf = yystack.l_mark[0].val.buf;
+ }
+break;
+case 60:
+#line 585 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+ struct addrinfo *src, *dst;
+
+#ifdef HAVE_PFKEY_POLICY_PRIORITY
+ last_msg_type = SADB_X_SPDADD;
+#endif
+
+ /* fixed port fields if ulp is icmp */
+ if (fix_portstr(yystack.l_mark[-4].num, &yystack.l_mark[-3].val, &yystack.l_mark[-8].val, &yystack.l_mark[-5].val))
+ return -1;
+
+ src = parse_addr(yystack.l_mark[-10].val.buf, yystack.l_mark[-8].val.buf);
+ dst = parse_addr(yystack.l_mark[-7].val.buf, yystack.l_mark[-5].val.buf);
+ if (!src || !dst) {
+ /* yyerror is already called */
+ return -1;
+ }
+ if (src->ai_next || dst->ai_next) {
+ yyerror("multiple address specified");
+ freeaddrinfo(src);
+ freeaddrinfo(dst);
+ return -1;
+ }
+
+ status = setkeymsg_spdaddr(SADB_X_SPDADD, yystack.l_mark[-4].num, &yystack.l_mark[-1].val,
+ src, yystack.l_mark[-9].num, dst, yystack.l_mark[-6].num);
+ freeaddrinfo(src);
+ freeaddrinfo(dst);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 61:
+#line 618 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+
+ status = setkeymsg_spdaddr_tag(SADB_X_SPDADD,
+ yystack.l_mark[-2].val.buf, &yystack.l_mark[-1].val);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 62:
+#line 631 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+ struct addrinfo *src, *dst;
+
+#ifdef HAVE_PFKEY_POLICY_PRIORITY
+ last_msg_type = SADB_X_SPDUPDATE;
+#endif
+
+ /* fixed port fields if ulp is icmp */
+ if (fix_portstr(yystack.l_mark[-4].num, &yystack.l_mark[-3].val, &yystack.l_mark[-8].val, &yystack.l_mark[-5].val))
+ return -1;
+
+ src = parse_addr(yystack.l_mark[-10].val.buf, yystack.l_mark[-8].val.buf);
+ dst = parse_addr(yystack.l_mark[-7].val.buf, yystack.l_mark[-5].val.buf);
+ if (!src || !dst) {
+ /* yyerror is already called */
+ return -1;
+ }
+ if (src->ai_next || dst->ai_next) {
+ yyerror("multiple address specified");
+ freeaddrinfo(src);
+ freeaddrinfo(dst);
+ return -1;
+ }
+
+ status = setkeymsg_spdaddr(SADB_X_SPDUPDATE, yystack.l_mark[-4].num, &yystack.l_mark[-1].val,
+ src, yystack.l_mark[-9].num, dst, yystack.l_mark[-6].num);
+ freeaddrinfo(src);
+ freeaddrinfo(dst);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 63:
+#line 664 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+
+ status = setkeymsg_spdaddr_tag(SADB_X_SPDUPDATE,
+ yystack.l_mark[-2].val.buf, &yystack.l_mark[-1].val);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 64:
+#line 676 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ int status;
+ struct addrinfo *src, *dst;
+
+ /* fixed port fields if ulp is icmp */
+ if (fix_portstr(yystack.l_mark[-4].num, &yystack.l_mark[-3].val, &yystack.l_mark[-8].val, &yystack.l_mark[-5].val))
+ return -1;
+
+ src = parse_addr(yystack.l_mark[-10].val.buf, yystack.l_mark[-8].val.buf);
+ dst = parse_addr(yystack.l_mark[-7].val.buf, yystack.l_mark[-5].val.buf);
+ if (!src || !dst) {
+ /* yyerror is already called */
+ return -1;
+ }
+ if (src->ai_next || dst->ai_next) {
+ yyerror("multiple address specified");
+ freeaddrinfo(src);
+ freeaddrinfo(dst);
+ return -1;
+ }
+
+ status = setkeymsg_spdaddr(SADB_X_SPDDELETE, yystack.l_mark[-4].num, &yystack.l_mark[-1].val,
+ src, yystack.l_mark[-9].num, dst, yystack.l_mark[-6].num);
+ freeaddrinfo(src);
+ freeaddrinfo(dst);
+ if (status < 0)
+ return -1;
+ }
+break;
+case 65:
+#line 708 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ struct sadb_msg msg;
+ setkeymsg0(&msg, SADB_X_SPDDUMP, SADB_SATYPE_UNSPEC,
+ sizeof(msg));
+ sendkeymsg((char *)&msg, sizeof(msg));
+ }
+break;
+case 66:
+#line 719 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ struct sadb_msg msg;
+ setkeymsg0(&msg, SADB_X_SPDFLUSH, SADB_SATYPE_UNSPEC,
+ sizeof(msg));
+ sendkeymsg((char *)&msg, sizeof(msg));
+ }
+break;
+case 69:
+#line 734 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ char *p;
+
+ for (p = yystack.l_mark[0].val.buf + 1; *p; p++)
+ switch (*p) {
+ case '4':
+ p_aifamily = AF_INET;
+ break;
+#ifdef INET6
+ case '6':
+ p_aifamily = AF_INET6;
+ break;
+#endif
+ case 'n':
+ p_aiflags = AI_NUMERICHOST;
+ break;
+ default:
+ yyerror("invalid flag");
+ return -1;
+ }
+ }
+break;
+case 70:
+#line 759 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.res = parse_addr(yystack.l_mark[0].val.buf, NULL);
+ if (yyval.res == NULL) {
+ /* yyerror already called by parse_addr */
+ return -1;
+ }
+ }
+break;
+case 71:
+#line 770 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.res = parse_addr(yystack.l_mark[0].val.buf, NULL);
+ if (yyval.res == NULL) {
+ /* yyerror already called by parse_addr */
+ return -1;
+ }
+ }
+break;
+case 72:
+#line 778 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.res = parse_addr(yystack.l_mark[-1].val.buf, yystack.l_mark[0].val.buf);
+ if (yyval.res == NULL) {
+ /* yyerror already called by parse_addr */
+ return -1;
+ }
+ }
+break;
+case 73:
+#line 788 "../../ipsec-tools/src/setkey/parse.y"
+ { yyval.num = -1; }
+break;
+case 74:
+#line 789 "../../ipsec-tools/src/setkey/parse.y"
+ { yyval.num = yystack.l_mark[0].ulnum; }
+break;
+case 75:
+#line 794 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.val.buf = strdup("0");
+ if (!yyval.val.buf) {
+ yyerror("insufficient memory");
+ return -1;
+ }
+ yyval.val.len = strlen(yyval.val.buf);
+ }
+break;
+case 76:
+#line 803 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.val.buf = strdup("0");
+ if (!yyval.val.buf) {
+ yyerror("insufficient memory");
+ return -1;
+ }
+ yyval.val.len = strlen(yyval.val.buf);
+ }
+break;
+case 77:
+#line 812 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ char buf[20];
+ snprintf(buf, sizeof(buf), "%lu", yystack.l_mark[-1].ulnum);
+ yyval.val.buf = strdup(buf);
+ if (!yyval.val.buf) {
+ yyerror("insufficient memory");
+ return -1;
+ }
+ yyval.val.len = strlen(yyval.val.buf);
+ }
+break;
+case 78:
+#line 823 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.val = yystack.l_mark[-1].val;
+ }
+break;
+case 79:
+#line 829 "../../ipsec-tools/src/setkey/parse.y"
+ { yyval.num = yystack.l_mark[0].ulnum; }
+break;
+case 80:
+#line 830 "../../ipsec-tools/src/setkey/parse.y"
+ { yyval.num = IPSEC_ULPROTO_ANY; }
+break;
+case 81:
+#line 831 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.num = IPPROTO_TCP;
+ }
+break;
+case 82:
+#line 835 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ struct protoent *ent;
+
+ ent = getprotobyname(yystack.l_mark[0].val.buf);
+ if (ent)
+ yyval.num = ent->p_proto;
+ else {
+ if (strcmp("icmp6", yystack.l_mark[0].val.buf) == 0) {
+ yyval.num = IPPROTO_ICMPV6;
+ } else if(strcmp("ip4", yystack.l_mark[0].val.buf) == 0) {
+ yyval.num = IPPROTO_IPV4;
+ } else {
+ yyerror("invalid upper layer protocol");
+ return -1;
+ }
+ }
+ endprotoent();
+ }
+break;
+case 83:
+#line 857 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.val.buf = NULL;
+ yyval.val.len = 0;
+ }
+break;
+case 84:
+#line 862 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ yyval.val.buf = strdup(yystack.l_mark[0].val.buf);
+ if (!yyval.val.buf) {
+ yyerror("insufficient memory");
+ return -1;
+ }
+ yyval.val.len = strlen(yyval.val.buf);
+ }
+break;
+case 86:
+#line 874 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ sec_ctx.doi = yystack.l_mark[-2].ulnum;
+ sec_ctx.alg = yystack.l_mark[-1].ulnum;
+ sec_ctx.len = yystack.l_mark[0].val.len+1;
+ sec_ctx.buf = yystack.l_mark[0].val.buf;
+ }
+break;
+case 87:
+#line 884 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ char *policy;
+#ifdef HAVE_PFKEY_POLICY_PRIORITY
+ struct sadb_x_policy *xpl;
+#endif
+
+ policy = ipsec_set_policy(yystack.l_mark[0].val.buf, yystack.l_mark[0].val.len);
+ if (policy == NULL) {
+ yyerror(ipsec_strerror());
+ return -1;
+ }
+
+ yyval.val.buf = policy;
+ yyval.val.len = ipsec_get_policylen(policy);
+
+#ifdef HAVE_PFKEY_POLICY_PRIORITY
+ xpl = (struct sadb_x_policy *) yyval.val.buf;
+ last_priority = xpl->sadb_x_policy_priority;
+#endif
+ }
+break;
+case 88:
+#line 907 "../../ipsec-tools/src/setkey/parse.y"
+ { yyval.val = yystack.l_mark[0].val; }
+break;
+case 89:
+#line 913 "../../ipsec-tools/src/setkey/parse.y"
+ {
+ exit_now = 1;
+ YYACCEPT;
+ }
+break;
+#line 2317 "setkeyyy.tab.c"
+ }
+ yystack.s_mark -= yym;
+ yystate = *yystack.s_mark;
+ yystack.l_mark -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yystack.s_mark = YYFINAL;
+ *++yystack.l_mark = yyval;
+ if (yychar < 0)
+ {
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
+#if YYDEBUG
+ if (yydebug)
+ {
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == YYEOF) goto yyaccept;
+ goto yyloop;
+ }
+ if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
+#endif
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
+ *++yystack.s_mark = (YYINT) yystate;
+ *++yystack.l_mark = yyval;
+ goto yyloop;
+
+yyoverflow:
+ YYERROR_CALL("yacc stack overflow");
+
+yyabort:
+ yyfreestack(&yystack);
+ return (1);
+
+yyaccept:
+ yyfreestack(&yystack);
+ return (0);
+}
diff --git a/ipsec-tools/src/setkey/parse.h b/ipsec-tools/src/setkey/parse.h
index 8f93574d..a2ba9b47 100644
--- a/ipsec-tools/src/setkey/parse.h
+++ b/ipsec-tools/src/setkey/parse.h
@@ -1,201 +1,69 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-#ifndef YY_PARSE_H
-# define YY_PARSE_H
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
+#define EOT 257
+#define SLASH 258
+#define BLCL 259
+#define ELCL 260
+#define ADD 261
+#define GET 262
+#define DELETE 263
+#define DELETEALL 264
+#define FLUSH 265
+#define DUMP 266
+#define EXIT 267
+#define PR_ESP 268
+#define PR_AH 269
+#define PR_IPCOMP 270
+#define PR_ESPUDP 271
+#define PR_TCP 272
+#define F_PROTOCOL 273
+#define F_AUTH 274
+#define F_ENC 275
+#define F_REPLAY 276
+#define F_COMP 277
+#define F_RAWCPI 278
+#define F_MODE 279
+#define MODE 280
+#define F_REQID 281
+#define F_EXT 282
+#define EXTENSION 283
+#define NOCYCLICSEQ 284
+#define ALG_AUTH 285
+#define ALG_AUTH_NOKEY 286
+#define ALG_ENC 287
+#define ALG_ENC_NOKEY 288
+#define ALG_ENC_DESDERIV 289
+#define ALG_ENC_DES32IV 290
+#define ALG_ENC_OLD 291
+#define ALG_COMP 292
+#define F_LIFETIME_HARD 293
+#define F_LIFETIME_SOFT 294
+#define F_LIFEBYTE_HARD 295
+#define F_LIFEBYTE_SOFT 296
+#define DECSTRING 297
+#define QUOTEDSTRING 298
+#define HEXSTRING 299
+#define STRING 300
+#define ANY 301
+#define SPDADD 302
+#define SPDUPDATE 303
+#define SPDDELETE 304
+#define SPDDUMP 305
+#define SPDFLUSH 306
+#define F_POLICY 307
+#define PL_REQUESTS 308
+#define F_AIFLAGS 309
+#define TAGGED 310
+#define SECURITY_CTX 311
+#ifdef YYSTYPE
+#undef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
#endif
-#if YYDEBUG
-extern int yydebug;
-#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- EOT = 258,
- SLASH = 259,
- BLCL = 260,
- ELCL = 261,
- ADD = 262,
- GET = 263,
- DELETE = 264,
- DELETEALL = 265,
- FLUSH = 266,
- DUMP = 267,
- EXIT = 268,
- PR_ESP = 269,
- PR_AH = 270,
- PR_IPCOMP = 271,
- PR_ESPUDP = 272,
- PR_TCP = 273,
- F_PROTOCOL = 274,
- F_AUTH = 275,
- F_ENC = 276,
- F_REPLAY = 277,
- F_COMP = 278,
- F_RAWCPI = 279,
- F_MODE = 280,
- MODE = 281,
- F_REQID = 282,
- F_EXT = 283,
- EXTENSION = 284,
- NOCYCLICSEQ = 285,
- ALG_AUTH = 286,
- ALG_AUTH_NOKEY = 287,
- ALG_ENC = 288,
- ALG_ENC_NOKEY = 289,
- ALG_ENC_DESDERIV = 290,
- ALG_ENC_DES32IV = 291,
- ALG_ENC_OLD = 292,
- ALG_COMP = 293,
- F_LIFETIME_HARD = 294,
- F_LIFETIME_SOFT = 295,
- F_LIFEBYTE_HARD = 296,
- F_LIFEBYTE_SOFT = 297,
- DECSTRING = 298,
- QUOTEDSTRING = 299,
- HEXSTRING = 300,
- STRING = 301,
- ANY = 302,
- SPDADD = 303,
- SPDUPDATE = 304,
- SPDDELETE = 305,
- SPDDUMP = 306,
- SPDFLUSH = 307,
- F_POLICY = 308,
- PL_REQUESTS = 309,
- F_AIFLAGS = 310,
- TAGGED = 311,
- SECURITY_CTX = 312
- };
-#endif
-/* Tokens. */
-#define EOT 258
-#define SLASH 259
-#define BLCL 260
-#define ELCL 261
-#define ADD 262
-#define GET 263
-#define DELETE 264
-#define DELETEALL 265
-#define FLUSH 266
-#define DUMP 267
-#define EXIT 268
-#define PR_ESP 269
-#define PR_AH 270
-#define PR_IPCOMP 271
-#define PR_ESPUDP 272
-#define PR_TCP 273
-#define F_PROTOCOL 274
-#define F_AUTH 275
-#define F_ENC 276
-#define F_REPLAY 277
-#define F_COMP 278
-#define F_RAWCPI 279
-#define F_MODE 280
-#define MODE 281
-#define F_REQID 282
-#define F_EXT 283
-#define EXTENSION 284
-#define NOCYCLICSEQ 285
-#define ALG_AUTH 286
-#define ALG_AUTH_NOKEY 287
-#define ALG_ENC 288
-#define ALG_ENC_NOKEY 289
-#define ALG_ENC_DESDERIV 290
-#define ALG_ENC_DES32IV 291
-#define ALG_ENC_OLD 292
-#define ALG_COMP 293
-#define F_LIFETIME_HARD 294
-#define F_LIFETIME_SOFT 295
-#define F_LIFEBYTE_HARD 296
-#define F_LIFEBYTE_SOFT 297
-#define DECSTRING 298
-#define QUOTEDSTRING 299
-#define HEXSTRING 300
-#define STRING 301
-#define ANY 302
-#define SPDADD 303
-#define SPDUPDATE 304
-#define SPDDELETE 305
-#define SPDDUMP 306
-#define SPDFLUSH 307
-#define F_POLICY 308
-#define PL_REQUESTS 309
-#define F_AIFLAGS 310
-#define TAGGED 311
-#define SECURITY_CTX 312
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-/* Line 2049 of yacc.c */
-#line 110 "parse.y"
-
+#ifndef YYSTYPE_IS_DECLARED
+#define YYSTYPE_IS_DECLARED 1
+typedef union {
int num;
unsigned long ulnum;
vchar_t val;
struct addrinfo *res;
-
-
-/* Line 2049 of yacc.c */
-#line 179 "parse.h"
} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !YY_PARSE_H */
+#endif /* !YYSTYPE_IS_DECLARED */
+extern YYSTYPE setkeyyylval;
diff --git a/ipsec-tools/src/setkey/parse.y b/ipsec-tools/src/setkey/parse.y
index fa3c45d3..1d2005ad 100644
--- a/ipsec-tools/src/setkey/parse.y
+++ b/ipsec-tools/src/setkey/parse.y
@@ -67,6 +67,7 @@
(isdigit((int)c) ? (c - '0') : \
(isupper((int)c) ? (c - 'A' + 10) : (c - 'a' + 10)))
+#ifndef __rtems__
u_int32_t p_spi;
u_int p_ext, p_alg_enc, p_alg_auth, p_replay, p_mode;
u_int32_t p_reqid;
@@ -75,6 +76,16 @@ const char *p_key_enc;
const char *p_key_auth;
time_t p_lt_hard, p_lt_soft;
size_t p_lb_hard, p_lb_soft;
+#else /* __rtems__ */
+static u_int32_t p_spi;
+static u_int p_ext, p_alg_enc, p_alg_auth, p_replay, p_mode;
+static u_int32_t p_reqid;
+static u_int p_key_enc_len, p_key_auth_len;
+static const char *p_key_enc;
+static const char *p_key_auth;
+static time_t p_lt_hard, p_lt_soft;
+static size_t p_lb_hard, p_lb_soft;
+#endif /* __rtems__ */
struct security_ctx {
u_int8_t doi;
@@ -83,7 +94,7 @@ struct security_ctx {
char *buf;
};
-struct security_ctx sec_ctx;
+static struct security_ctx sec_ctx;
static u_int p_natt_type;
static struct addrinfo * p_natt_oa = NULL;
diff --git a/ipsec-tools/src/setkey/parse_wrapper.c b/ipsec-tools/src/setkey/parse_wrapper.c
new file mode 100644
index 00000000..7d5f03bf
--- /dev/null
+++ b/ipsec-tools/src/setkey/parse_wrapper.c
@@ -0,0 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-setkey-namespace.h"
+#include "parse.c"
+#include "rtems-bsd-setkey-parse_wrapper-data.h"
diff --git a/ipsec-tools/src/setkey/rtems-bsd-setkey-data.h b/ipsec-tools/src/setkey/rtems-bsd-setkey-data.h
new file mode 100644
index 00000000..adf04e39
--- /dev/null
+++ b/ipsec-tools/src/setkey/rtems-bsd-setkey-data.h
@@ -0,0 +1,34 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+/* parse_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int setkeyyydebug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int setkeyyynerrs);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int setkeyyyerrflag);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int setkeyyychar);
+/* setkey.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_rfcmode);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int lineno);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int last_msg_type);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern u_int32_t last_priority);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int exit_now);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern u_char m_buf[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern u_int m_len);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_debug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int so);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_forever);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_all);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_verbose);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_mode);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_cmddump);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_policy);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_hexdump);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_tflag);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_notreally);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_withports);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int f_rkwarn);
+/* token_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern FILE *setkeyyyin);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern FILE *setkeyyyout);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int setkeyyylineno);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern int setkeyyy_flex_debug);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern char *setkeyyytext);
diff --git a/ipsec-tools/src/setkey/rtems-bsd-setkey-namespace.h b/ipsec-tools/src/setkey/rtems-bsd-setkey-namespace.h
new file mode 100644
index 00000000..7d71da7e
--- /dev/null
+++ b/ipsec-tools/src/setkey/rtems-bsd-setkey-namespace.h
@@ -0,0 +1,81 @@
+/* generated by userspace-header-gen.py */
+/* parse_wrapper.c */
+#define setkeyyydebug _bsd_setkey_setkeyyydebug
+#define setkeyyynerrs _bsd_setkey_setkeyyynerrs
+#define setkeyyyerrflag _bsd_setkey_setkeyyyerrflag
+#define setkeyyychar _bsd_setkey_setkeyyychar
+#define setkeyyyval _bsd_setkey_setkeyyyval
+#define setkeyyylval _bsd_setkey_setkeyyylval
+#define setkeyyyparse _bsd_setkey_setkeyyyparse
+#define free_buffer _bsd_setkey_free_buffer
+#define parse_init _bsd_setkey_parse_init
+#define setkeymsg0 _bsd_setkey_setkeymsg0
+/* setkey.c */
+#define f_rfcmode _bsd_setkey_f_rfcmode
+#define lineno _bsd_setkey_lineno
+#define last_msg_type _bsd_setkey_last_msg_type
+#define last_priority _bsd_setkey_last_priority
+#define exit_now _bsd_setkey_exit_now
+#define m_buf _bsd_setkey_m_buf
+#define m_len _bsd_setkey_m_len
+#define f_debug _bsd_setkey_f_debug
+#define so _bsd_setkey_so
+#define f_forever _bsd_setkey_f_forever
+#define f_all _bsd_setkey_f_all
+#define f_verbose _bsd_setkey_f_verbose
+#define f_mode _bsd_setkey_f_mode
+#define f_cmddump _bsd_setkey_f_cmddump
+#define f_policy _bsd_setkey_f_policy
+#define f_hexdump _bsd_setkey_f_hexdump
+#define f_tflag _bsd_setkey_f_tflag
+#define f_notreally _bsd_setkey_f_notreally
+#define f_withports _bsd_setkey_f_withports
+#define f_rkwarn _bsd_setkey_f_rkwarn
+#define shortdump _bsd_setkey_shortdump
+#define shortdump_hdr _bsd_setkey_shortdump_hdr
+#define numstr _bsd_setkey_numstr
+#define fileproc _bsd_setkey_fileproc
+#define postproc _bsd_setkey_postproc
+#define sendkeymsg _bsd_setkey_sendkeymsg
+#define sendkeymsg_spigrep _bsd_setkey_sendkeymsg_spigrep
+#define promisc _bsd_setkey_promisc
+#define sendkeyshort _bsd_setkey_sendkeyshort
+#define stdin_loop _bsd_setkey_stdin_loop
+#define get_supported _bsd_setkey_get_supported
+#define usage _bsd_setkey_usage
+/* token_wrapper.c */
+#define setkeyyyleng _bsd_setkey_setkeyyyleng
+#define setkeyyyin _bsd_setkey_setkeyyyin
+#define setkeyyyout _bsd_setkey_setkeyyyout
+#define setkeyyylineno _bsd_setkey_setkeyyylineno
+#define setkeyyy_flex_debug _bsd_setkey_setkeyyy_flex_debug
+#define setkeyyytext _bsd_setkey_setkeyyytext
+#define parse_string _bsd_setkey_parse_string
+#define parse _bsd_setkey_parse
+#define yyerror _bsd_setkey_yyerror
+#define yyfatal _bsd_setkey_yyfatal
+#define setkeyyyfree _bsd_setkey_setkeyyyfree
+#define setkeyyyrealloc _bsd_setkey_setkeyyyrealloc
+#define setkeyyyalloc _bsd_setkey_setkeyyyalloc
+#define setkeyyylex_destroy _bsd_setkey_setkeyyylex_destroy
+#define setkeyyyset_debug _bsd_setkey_setkeyyyset_debug
+#define setkeyyyget_debug _bsd_setkey_setkeyyyget_debug
+#define setkeyyyset_out _bsd_setkey_setkeyyyset_out
+#define setkeyyyset_in _bsd_setkey_setkeyyyset_in
+#define setkeyyyset_lineno _bsd_setkey_setkeyyyset_lineno
+#define setkeyyyget_text _bsd_setkey_setkeyyyget_text
+#define setkeyyyget_leng _bsd_setkey_setkeyyyget_leng
+#define setkeyyyget_out _bsd_setkey_setkeyyyget_out
+#define setkeyyyget_in _bsd_setkey_setkeyyyget_in
+#define setkeyyyget_lineno _bsd_setkey_setkeyyyget_lineno
+#define setkeyyy_scan_bytes _bsd_setkey_setkeyyy_scan_bytes
+#define setkeyyy_scan_string _bsd_setkey_setkeyyy_scan_string
+#define setkeyyy_scan_buffer _bsd_setkey_setkeyyy_scan_buffer
+#define setkeyyypop_buffer_state _bsd_setkey_setkeyyypop_buffer_state
+#define setkeyyypush_buffer_state _bsd_setkey_setkeyyypush_buffer_state
+#define setkeyyy_flush_buffer _bsd_setkey_setkeyyy_flush_buffer
+#define setkeyyy_delete_buffer _bsd_setkey_setkeyyy_delete_buffer
+#define setkeyyy_create_buffer _bsd_setkey_setkeyyy_create_buffer
+#define setkeyyy_switch_to_buffer _bsd_setkey_setkeyyy_switch_to_buffer
+#define setkeyyyrestart _bsd_setkey_setkeyyyrestart
+#define setkeyyylex _bsd_setkey_setkeyyylex
diff --git a/ipsec-tools/src/setkey/rtems-bsd-setkey-parse_wrapper-data.h b/ipsec-tools/src/setkey/rtems-bsd-setkey-parse_wrapper-data.h
new file mode 100644
index 00000000..050924fb
--- /dev/null
+++ b/ipsec-tools/src/setkey/rtems-bsd-setkey-parse_wrapper-data.h
@@ -0,0 +1,25 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-setkey-data.h"
+/* parse_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int32_t p_spi);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_ext);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_alg_enc);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_alg_auth);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_replay);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_mode);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int32_t p_reqid);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_key_enc_len);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_key_auth_len);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char const *p_key_enc);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char const *p_key_auth);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static time_t p_lt_hard);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static time_t p_lt_soft);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static size_t p_lb_hard);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static size_t p_lb_soft);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static struct security_ctx sec_ctx);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static u_int p_natt_type);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static struct addrinfo *p_natt_oa);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int p_aiflags);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int p_aifamily);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static YYSTACKDATA yystack);
diff --git a/ipsec-tools/src/setkey/rtems-bsd-setkey-setkey-data.h b/ipsec-tools/src/setkey/rtems-bsd-setkey-setkey-data.h
new file mode 100644
index 00000000..b0aa4803
--- /dev/null
+++ b/ipsec-tools/src/setkey/rtems-bsd-setkey-setkey-data.h
@@ -0,0 +1,8 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-setkey-data.h"
+/* setkey.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static time_t thiszone);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char const *satype[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char const *sastate[]);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char const *ipproto[]);
diff --git a/ipsec-tools/src/setkey/rtems-bsd-setkey-token_wrapper-data.h b/ipsec-tools/src/setkey/rtems-bsd-setkey-token_wrapper-data.h
new file mode 100644
index 00000000..41691d79
--- /dev/null
+++ b/ipsec-tools/src/setkey/rtems-bsd-setkey-token_wrapper-data.h
@@ -0,0 +1,18 @@
+/* generated by userspace-header-gen.py */
+#include <rtems/linkersets.h>
+#include "rtems-bsd-setkey-data.h"
+/* token_wrapper.c */
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static size_t yy_buffer_stack_top);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static size_t yy_buffer_stack_max);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static YY_BUFFER_STATE *yy_buffer_stack);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char yy_hold_char);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static yy_size_t yy_n_chars);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, extern yy_size_t setkeyyyleng);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char *yy_c_buf_p);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int yy_init);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int yy_start);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int yy_did_buffer_switch_on_eof);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static yy_state_type yy_last_accepting_state);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static char *yy_last_accepting_cpos);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int yy_more_flag);
+RTEMS_LINKER_RWSET_CONTENT(bsd_prog_setkey, static int yy_more_len);
diff --git a/ipsec-tools/src/setkey/setkey.c b/ipsec-tools/src/setkey/setkey.c
index c400faa6..15b1c438 100644
--- a/ipsec-tools/src/setkey/setkey.c
+++ b/ipsec-tools/src/setkey/setkey.c
@@ -1,3 +1,10 @@
+#include <machine/rtems-bsd-user-space.h>
+
+#ifdef __rtems__
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-setkey-namespace.h"
+#endif /* __rtems__ */
+
/* $NetBSD: setkey.c,v 1.14 2009/08/06 04:44:43 tteras Exp $ */
/* $KAME: setkey.c,v 1.36 2003/09/24 23:52:51 itojun Exp $ */
@@ -35,6 +42,12 @@
#include "config.h"
#endif
+#ifdef __rtems__
+#define __need_getopt_newlib
+#include <getopt.h>
+#include <machine/rtems-bsd-commands.h>
+#include <rtems/linkersets.h>
+#endif /* __rtems__ */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -68,11 +81,16 @@
#include "package_version.h"
#define extern /* so that variables in extern.h are not extern... */
#include "extern.h"
+#ifdef __rtems__
+#undef extern /* so that we can rely on the C-standard again... */
+#endif /* __rtems__ */
#define strlcpy(d,s,l) (strncpy(d,s,l), (d)[(l)-1] = '\0')
void usage __P((int));
+#ifndef __rtems__
int main __P((int, char **));
+#endif /* __rtems__ */
int get_supported __P((void));
void sendkeyshort __P((u_int));
void promisc __P((void));
@@ -139,6 +157,29 @@ usage(int only_version)
exit(1);
}
+#ifdef __rtems__
+static int main(int argc, char *argv[]);
+
+RTEMS_LINKER_RWSET(bsd_prog_setkey, char);
+
+int
+rtems_bsd_command_setkey(int argc, char *argv[])
+{
+ int exit_code;
+ void *data_begin;
+ size_t data_size;
+
+ data_begin = RTEMS_LINKER_SET_BEGIN(bsd_prog_setkey);
+ data_size = RTEMS_LINKER_SET_SIZE(bsd_prog_setkey);
+
+ rtems_bsd_program_lock();
+ exit_code = rtems_bsd_program_call_main_with_data_restore("setkey",
+ main, argc, argv, data_begin, data_size);
+ rtems_bsd_program_unlock();
+
+ return exit_code;
+}
+#endif /* __rtems__ */
int
main(argc, argv)
int argc;
@@ -146,6 +187,15 @@ main(argc, argv)
{
FILE *fp = stdin;
int c;
+#ifdef __rtems__
+ struct getopt_data getopt_data;
+ memset(&getopt_data, 0, sizeof(getopt_data));
+#define optind getopt_data.optind
+#define optarg getopt_data.optarg
+#define opterr getopt_data.opterr
+#define optopt getopt_data.optopt
+#define getopt(argc, argv, opt) getopt_r(argc, argv, "+" opt, &getopt_data)
+#endif /* __rtems__ */
if (argc == 1) {
usage(0);
@@ -382,7 +432,11 @@ void
promisc()
{
struct sadb_msg msg;
+#ifndef __rtems__
u_char rbuf[1024 * 32]; /* XXX: Enough ? Should I do MSG_PEEK ? */
+#else /* __rtems__ */
+ u_char rbuf[1024 * 20];
+#endif /* __rtems__ */
ssize_t l;
msg.sadb_msg_version = PF_KEY_V2;
@@ -460,7 +514,11 @@ sendkeymsg_spigrep(satype, srcs, dsts, num_spi)
char *buf;
size_t len;
ssize_t l;
+#ifndef __rtems__
u_char rbuf[1024 * 32];
+#else /* __rtems__ */
+ u_char rbuf[1024 * 20];
+#endif /* __rtems__ */
caddr_t mhp[SADB_EXT_MAX + 1];
struct sadb_address *saddr;
struct sockaddr *s;
@@ -610,7 +668,11 @@ sendkeymsg(buf, len)
char *buf;
size_t len;
{
+#ifndef __rtems__
u_char rbuf[1024 * 32]; /* XXX: Enough ? Should I do MSG_PEEK ? */
+#else /* __rtems__ */
+ u_char rbuf[1024 * 20];
+#endif /* __rtems__ */
ssize_t l;
struct sadb_msg *msg;
@@ -837,7 +899,11 @@ fileproc(filename)
ssize_t len, l;
u_char *p, *ep;
struct sadb_msg *msg;
+#ifndef __rtems__
u_char rbuf[1024 * 32]; /* XXX: Enough ? Should I do MSG_PEEK ? */
+#else /* __rtems__ */
+ u_char rbuf[1024 * 20];
+#endif /* __rtems__ */
fd = open(filename, O_RDONLY);
if (fd < 0)
@@ -1060,3 +1126,6 @@ gmt2local(time_t t)
return (dt);
}
+#ifdef __rtems__
+#include "rtems-bsd-setkey-setkey-data.h"
+#endif /* __rtems__ */
diff --git a/ipsec-tools/src/setkey/token.c b/ipsec-tools/src/setkey/token.c
index f533cfc1..fb2c2574 100644
--- a/ipsec-tools/src/setkey/token.c
+++ b/ipsec-tools/src/setkey/token.c
@@ -1,10 +1,29 @@
-#line 3 "token.c"
+#line 3 "<stdout>"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
+#define yy_create_buffer setkeyyy_create_buffer
+#define yy_delete_buffer setkeyyy_delete_buffer
+#define yy_flex_debug setkeyyy_flex_debug
+#define yy_init_buffer setkeyyy_init_buffer
+#define yy_flush_buffer setkeyyy_flush_buffer
+#define yy_load_buffer_state setkeyyy_load_buffer_state
+#define yy_switch_to_buffer setkeyyy_switch_to_buffer
+#define yyin setkeyyyin
+#define yyleng setkeyyyleng
+#define yylex setkeyyylex
+#define yylineno setkeyyylineno
+#define yyout setkeyyyout
+#define yyrestart setkeyyyrestart
+#define yytext setkeyyytext
+#define yywrap setkeyyywrap
+#define yyalloc setkeyyyalloc
+#define yyrealloc setkeyyyrealloc
+#define yyfree setkeyyyfree
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
@@ -15,6 +34,16 @@
/* First, we deal with platform-specific or compiler-specific issues. */
+#if defined(__FreeBSD__)
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+#include <sys/cdefs.h>
+#include <stdint.h>
+#else
+#define __dead2
+#endif
+
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
@@ -30,7 +59,8 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__FreeBSD__) || \
+ (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -135,13 +165,13 @@ typedef unsigned int flex_uint32_t;
#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_NEW_FILE setkeyyyrestart(setkeyyyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
+#define YY_BUF_SIZE 1024
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -158,9 +188,9 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t yyleng;
+extern yy_size_t setkeyyyleng;
-extern FILE *yyin, *yyout;
+extern FILE *setkeyyyin, *setkeyyyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
@@ -172,13 +202,13 @@ extern FILE *yyin, *yyout;
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up setkeyyytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up setkeyyytext again */ \
} \
while ( 0 )
@@ -241,8 +271,8 @@ struct yy_buffer_state
* 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.
+ * (via setkeyyyrestart()), so that the user can continue scanning by
+ * just pointing setkeyyyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -263,57 +293,58 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
+#define yy_current_buffer YY_CURRENT_BUFFER
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when yytext is formed. */
+/* yy_hold_char holds the character lost when setkeyyytext is formed. */
static char yy_hold_char;
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+yy_size_t setkeyyyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* 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 ...
+/* Flag which is used to allow setkeyyywrap()'s to do buffer switches
+ * instead of setting up a fresh setkeyyyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
+void setkeyyyrestart (FILE *input_file );
+void setkeyyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE setkeyyy_create_buffer (FILE *file,int size );
+void setkeyyy_delete_buffer (YY_BUFFER_STATE b );
+void setkeyyy_flush_buffer (YY_BUFFER_STATE b );
+void setkeyyypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void setkeyyypop_buffer_state (void );
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void setkeyyyensure_buffer_stack (void );
+static void setkeyyy_load_buffer_state (void );
+static void setkeyyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER setkeyyy_flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE setkeyyy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE setkeyyy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE setkeyyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+void *setkeyyyalloc (yy_size_t );
+void *setkeyyyrealloc (void *,yy_size_t );
+void setkeyyyfree (void * );
-#define yy_new_buffer yy_create_buffer
+#define yy_new_buffer setkeyyy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ setkeyyyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ setkeyyy_create_buffer(setkeyyyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
@@ -321,9 +352,9 @@ void yyfree (void * );
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
+ setkeyyyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ setkeyyy_create_buffer(setkeyyyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
@@ -334,29 +365,29 @@ void yyfree (void * );
typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+FILE *setkeyyyin = (FILE *) 0, *setkeyyyout = (FILE *) 0;
typedef int yy_state_type;
-extern int yylineno;
+extern int setkeyyylineno;
-int yylineno = 1;
+int setkeyyylineno = 1;
-extern char *yytext;
-#define yytext_ptr yytext
+extern char *setkeyyytext;
+#define yytext_ptr setkeyyytext
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static void yy_fatal_error (yyconst char msg[] ) __dead2;
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up setkeyyytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
(yytext_ptr) -= (yy_more_len); \
- yyleng = (size_t) (yy_cp - (yytext_ptr)); \
+ setkeyyyleng = (size_t) (yy_cp - (yytext_ptr)); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
@@ -977,8 +1008,8 @@ static yyconst flex_int16_t yy_chk[1613] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+extern int setkeyyy_flex_debug;
+int setkeyyy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -989,8 +1020,8 @@ 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 "token.l"
+char *setkeyyytext;
+#line 1 "../../ipsec-tools/src/setkey/token.l"
/* $NetBSD: token.l,v 1.15 2010/06/04 13:06:03 vanhu Exp $ */
/* $KAME: token.l,v 1.44 2003/10/21 07:20:58 itojun Exp $ */
/*
@@ -1021,7 +1052,7 @@ char *yytext;
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#line 35 "token.l"
+#line 35 "../../ipsec-tools/src/setkey/token.l"
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1079,7 +1110,7 @@ char *yytext;
/* common section */
#define YY_NO_INPUT 1
-#line 1083 "token.c"
+#line 1114 "<stdout>"
#define INITIAL 0
#define S_PL 1
@@ -1103,31 +1134,31 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy (void );
+int setkeyyylex_destroy (void );
-int yyget_debug (void );
+int setkeyyyget_debug (void );
-void yyset_debug (int debug_flag );
+void setkeyyyset_debug (int debug_flag );
-YY_EXTRA_TYPE yyget_extra (void );
+YY_EXTRA_TYPE setkeyyyget_extra (void );
-void yyset_extra (YY_EXTRA_TYPE user_defined );
+void setkeyyyset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in (void );
+FILE *setkeyyyget_in (void );
-void yyset_in (FILE * in_str );
+void setkeyyyset_in (FILE * in_str );
-FILE *yyget_out (void );
+FILE *setkeyyyget_out (void );
-void yyset_out (FILE * out_str );
+void setkeyyyset_out (FILE * out_str );
-yy_size_t yyget_leng (void );
+yy_size_t setkeyyyget_leng (void );
-char *yyget_text (void );
+char *setkeyyyget_text (void );
-int yyget_lineno (void );
+int setkeyyyget_lineno (void );
-void yyset_lineno (int line_number );
+void setkeyyyset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1135,9 +1166,9 @@ void yyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int setkeyyywrap (void );
#else
-extern int yywrap (void );
+extern int setkeyyywrap (void );
#endif
#endif
@@ -1169,7 +1200,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( setkeyyytext, setkeyyyleng, 1, setkeyyyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1182,18 +1213,18 @@ static int input (void );
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( setkeyyyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
+ if ( c == EOF && ferror( setkeyyyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = fread(buf, 1, max_size, setkeyyyin))==0 && ferror(setkeyyyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1201,7 +1232,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(yyin); \
+ clearerr(setkeyyyin); \
} \
}\
\
@@ -1234,12 +1265,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int yylex (void);
+extern int setkeyyylex (void);
-#define YY_DECL int yylex (void)
+#define YY_DECL int setkeyyylex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after setkeyyytext and setkeyyyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1258,15 +1289,15 @@ extern int yylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
-#line 115 "token.l"
+#line 115 "../../ipsec-tools/src/setkey/token.l"
-#line 1270 "token.c"
+#line 1301 "<stdout>"
if ( !(yy_init) )
{
@@ -1279,19 +1310,19 @@ YY_DECL
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! yyin )
- yyin = stdin;
+ if ( ! setkeyyyin )
+ setkeyyyin = stdin;
- if ( ! yyout )
- yyout = stdout;
+ if ( ! setkeyyyout )
+ setkeyyyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
+ setkeyyyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ setkeyyy_create_buffer(setkeyyyin,YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ setkeyyy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
@@ -1304,7 +1335,7 @@ YY_DECL
}
yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
+ /* Support of setkeyyytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1316,7 +1347,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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;
@@ -1357,102 +1388,102 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 118 "token.l"
+#line 118 "../../ipsec-tools/src/setkey/token.l"
{ return(ADD); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 119 "token.l"
+#line 119 "../../ipsec-tools/src/setkey/token.l"
{ return(DELETE); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 120 "token.l"
+#line 120 "../../ipsec-tools/src/setkey/token.l"
{ return(DELETEALL); }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 121 "token.l"
+#line 121 "../../ipsec-tools/src/setkey/token.l"
{ return(GET); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 122 "token.l"
+#line 122 "../../ipsec-tools/src/setkey/token.l"
{ return(FLUSH); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 123 "token.l"
+#line 123 "../../ipsec-tools/src/setkey/token.l"
{ return(DUMP); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 124 "token.l"
+#line 124 "../../ipsec-tools/src/setkey/token.l"
{ return(EXIT); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 125 "token.l"
+#line 125 "../../ipsec-tools/src/setkey/token.l"
{ return(EXIT); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 126 "token.l"
+#line 126 "../../ipsec-tools/src/setkey/token.l"
{ return(EXIT); }
YY_BREAK
/* for management SPD */
case 10:
YY_RULE_SETUP
-#line 129 "token.l"
+#line 129 "../../ipsec-tools/src/setkey/token.l"
{ return(SPDADD); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 130 "token.l"
+#line 130 "../../ipsec-tools/src/setkey/token.l"
{ return(SPDUPDATE); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 131 "token.l"
+#line 131 "../../ipsec-tools/src/setkey/token.l"
{ return(SPDDELETE); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 132 "token.l"
+#line 132 "../../ipsec-tools/src/setkey/token.l"
{ return(SPDDUMP); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 133 "token.l"
+#line 133 "../../ipsec-tools/src/setkey/token.l"
{ return(SPDFLUSH); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 134 "token.l"
+#line 134 "../../ipsec-tools/src/setkey/token.l"
{ return(TAGGED); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 135 "token.l"
+#line 135 "../../ipsec-tools/src/setkey/token.l"
{ BEGIN S_PL; return(F_POLICY); }
YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 136 "token.l"
+#line 136 "../../ipsec-tools/src/setkey/token.l"
{
yymore();
/* count up for nl */
{
char *p;
- for (p = yytext; *p != '\0'; p++)
+ for (p = setkeyyytext; *p != '\0'; p++)
if (*p == '\n')
lineno++;
}
- yylval.val.len = strlen(yytext);
- yylval.val.buf = strdup(yytext);
+ yylval.val.len = strlen(setkeyyytext);
+ yylval.val.buf = strdup(setkeyyytext);
if (!yylval.val.buf)
yyfatal("insufficient memory");
@@ -1461,16 +1492,16 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 154 "token.l"
+#line 154 "../../ipsec-tools/src/setkey/token.l"
{ BEGIN INITIAL; return(EOT); }
YY_BREAK
/* address resolution flags */
case 19:
YY_RULE_SETUP
-#line 157 "token.l"
+#line 157 "../../ipsec-tools/src/setkey/token.l"
{
- yylval.val.len = strlen(yytext);
- yylval.val.buf = strdup(yytext);
+ yylval.val.len = strlen(setkeyyytext);
+ yylval.val.buf = strdup(setkeyyytext);
if (!yylval.val.buf)
yyfatal("insufficient memory");
return(F_AIFLAGS);
@@ -1479,37 +1510,37 @@ YY_RULE_SETUP
/* security protocols */
case 20:
YY_RULE_SETUP
-#line 166 "token.l"
+#line 166 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = 0; return(PR_AH); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 167 "token.l"
+#line 167 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = 0; return(PR_ESP); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 168 "token.l"
+#line 168 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = 1; return(PR_AH); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 169 "token.l"
+#line 169 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = 1; return(PR_ESP); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 170 "token.l"
+#line 170 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = 0; return(PR_ESPUDP); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 171 "token.l"
+#line 171 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = 0; return(PR_IPCOMP); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 172 "token.l"
+#line 172 "../../ipsec-tools/src/setkey/token.l"
{
yylval.num = 0; return(PR_TCP);
}
@@ -1517,72 +1548,72 @@ YY_RULE_SETUP
/* authentication alogorithm */
case 27:
YY_RULE_SETUP
-#line 177 "token.l"
+#line 177 "../../ipsec-tools/src/setkey/token.l"
{ BEGIN S_AUTHALG; return(F_AUTH); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 178 "token.l"
+#line 178 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_AALG_MD5HMAC; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 179 "token.l"
+#line 179 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_AALG_SHA1HMAC; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 180 "token.l"
+#line 180 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_MD5; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 181 "token.l"
+#line 181 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 182 "token.l"
+#line 182 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA2_256; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 183 "token.l"
+#line 183 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA2_256; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 184 "token.l"
+#line 184 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA2_384; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 185 "token.l"
+#line 185 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA2_384; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 186 "token.l"
+#line 186 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA2_512; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 187 "token.l"
+#line 187 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_SHA2_512; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 188 "token.l"
+#line 188 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_RIPEMD160HMAC; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 189 "token.l"
+#line 189 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_AES_XCBC_MAC; BEGIN INITIAL; return(ALG_AUTH); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 190 "token.l"
+#line 190 "../../ipsec-tools/src/setkey/token.l"
{
#ifdef SADB_X_AALG_TCP_MD5
yylval.num = SADB_X_AALG_TCP_MD5;
@@ -1593,63 +1624,63 @@ YY_RULE_SETUP
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 197 "token.l"
+#line 197 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_AALG_NULL; BEGIN INITIAL; return(ALG_AUTH_NOKEY); }
YY_BREAK
/* encryption alogorithm */
case 42:
YY_RULE_SETUP
-#line 200 "token.l"
+#line 200 "../../ipsec-tools/src/setkey/token.l"
{ BEGIN S_ENCALG; return(F_ENC); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 201 "token.l"
+#line 201 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 202 "token.l"
+#line 202 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_EALG_3DESCBC; BEGIN INITIAL; return(ALG_ENC); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 203 "token.l"
+#line 203 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC_NOKEY); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 204 "token.l"
+#line 204 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC_OLD); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 205 "token.l"
+#line 205 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EALG_BLOWFISHCBC; BEGIN INITIAL; return(ALG_ENC); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 206 "token.l"
+#line 206 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EALG_CAST128CBC; BEGIN INITIAL; return(ALG_ENC); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 207 "token.l"
+#line 207 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC_DESDERIV); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 208 "token.l"
+#line 208 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC_DES32IV); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 209 "token.l"
+#line 209 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EALG_TWOFISHCBC; BEGIN INITIAL; return(ALG_ENC); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 210 "token.l"
+#line 210 "../../ipsec-tools/src/setkey/token.l"
{
#ifdef SADB_X_EALG_AESCBC
yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; return(ALG_ENC);
@@ -1658,7 +1689,7 @@ YY_RULE_SETUP
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 215 "token.l"
+#line 215 "../../ipsec-tools/src/setkey/token.l"
{
#ifdef SADB_X_EALG_AESCBC
yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; return(ALG_ENC);
@@ -1667,12 +1698,12 @@ YY_RULE_SETUP
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 220 "token.l"
+#line 220 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EALG_AESCTR; BEGIN INITIAL; return(ALG_ENC); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 221 "token.l"
+#line 221 "../../ipsec-tools/src/setkey/token.l"
{
#ifdef SADB_X_EALG_CAMELLIACBC
yylval.num = SADB_X_EALG_CAMELLIACBC; BEGIN INITIAL; return(ALG_ENC);
@@ -1682,164 +1713,164 @@ YY_RULE_SETUP
/* compression algorithms */
case 56:
YY_RULE_SETUP
-#line 228 "token.l"
+#line 228 "../../ipsec-tools/src/setkey/token.l"
{ return(F_COMP); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 229 "token.l"
+#line 229 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_CALG_OUI; return(ALG_COMP); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 230 "token.l"
+#line 230 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_CALG_DEFLATE; return(ALG_COMP); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 231 "token.l"
+#line 231 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_CALG_LZS; return(ALG_COMP); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 232 "token.l"
+#line 232 "../../ipsec-tools/src/setkey/token.l"
{ return(F_RAWCPI); }
YY_BREAK
/* extension */
case 61:
YY_RULE_SETUP
-#line 235 "token.l"
+#line 235 "../../ipsec-tools/src/setkey/token.l"
{ return(F_MODE); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 236 "token.l"
+#line 236 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = IPSEC_MODE_TRANSPORT; return(MODE); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 237 "token.l"
+#line 237 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = IPSEC_MODE_TUNNEL; return(MODE); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 238 "token.l"
+#line 238 "../../ipsec-tools/src/setkey/token.l"
{ return(F_REQID); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 239 "token.l"
+#line 239 "../../ipsec-tools/src/setkey/token.l"
{ return(F_EXT); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 240 "token.l"
+#line 240 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EXT_PRAND; return(EXTENSION); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 241 "token.l"
+#line 241 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EXT_PSEQ; return(EXTENSION); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 242 "token.l"
+#line 242 "../../ipsec-tools/src/setkey/token.l"
{ yylval.num = SADB_X_EXT_PZERO; return(EXTENSION); }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 243 "token.l"
+#line 243 "../../ipsec-tools/src/setkey/token.l"
{ return(NOCYCLICSEQ); }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 244 "token.l"
+#line 244 "../../ipsec-tools/src/setkey/token.l"
{ return(F_REPLAY); }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 245 "token.l"
+#line 245 "../../ipsec-tools/src/setkey/token.l"
{ return(F_LIFETIME_HARD); }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 246 "token.l"
+#line 246 "../../ipsec-tools/src/setkey/token.l"
{ return(F_LIFETIME_SOFT); }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 247 "token.l"
+#line 247 "../../ipsec-tools/src/setkey/token.l"
{ return(F_LIFEBYTE_HARD); }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 248 "token.l"
+#line 248 "../../ipsec-tools/src/setkey/token.l"
{ return(F_LIFEBYTE_SOFT); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 249 "token.l"
+#line 249 "../../ipsec-tools/src/setkey/token.l"
{ return(SECURITY_CTX); }
YY_BREAK
/* ... */
case 76:
YY_RULE_SETUP
-#line 252 "token.l"
+#line 252 "../../ipsec-tools/src/setkey/token.l"
{ return(ANY); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 253 "token.l"
+#line 253 "../../ipsec-tools/src/setkey/token.l"
{ }
YY_BREAK
case 78:
/* rule 78 can match eol */
YY_RULE_SETUP
-#line 254 "token.l"
+#line 254 "../../ipsec-tools/src/setkey/token.l"
{ lineno++; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 255 "token.l"
+#line 255 "../../ipsec-tools/src/setkey/token.l"
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 256 "token.l"
+#line 256 "../../ipsec-tools/src/setkey/token.l"
{ return(EOT); }
YY_BREAK
/* for address parameters: /prefix, [port] */
case 81:
YY_RULE_SETUP
-#line 259 "token.l"
+#line 259 "../../ipsec-tools/src/setkey/token.l"
{ return SLASH; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 260 "token.l"
+#line 260 "../../ipsec-tools/src/setkey/token.l"
{ return BLCL; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 261 "token.l"
+#line 261 "../../ipsec-tools/src/setkey/token.l"
{ return ELCL; }
YY_BREAK
/* parameter */
case 84:
YY_RULE_SETUP
-#line 264 "token.l"
+#line 264 "../../ipsec-tools/src/setkey/token.l"
{
char *bp;
- yylval.ulnum = strtoul(yytext, &bp, 10);
+ yylval.ulnum = strtoul(setkeyyytext, &bp, 10);
return(DECSTRING);
}
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 271 "token.l"
+#line 271 "../../ipsec-tools/src/setkey/token.l"
{
- yylval.val.buf = strdup(yytext + 2);
+ yylval.val.buf = strdup(setkeyyytext + 2);
if (!yylval.val.buf)
yyfatal("insufficient memory");
yylval.val.len = strlen(yylval.val.buf);
@@ -1850,14 +1881,14 @@ YY_RULE_SETUP
case 86:
/* rule 86 can match eol */
YY_RULE_SETUP
-#line 280 "token.l"
+#line 280 "../../ipsec-tools/src/setkey/token.l"
{
- char *p = yytext;
+ char *p = setkeyyytext;
while (*++p != '"') ;
*p = '\0';
- yytext++;
- yylval.val.len = yyleng - 2;
- yylval.val.buf = strdup(yytext);
+ setkeyyytext++;
+ yylval.val.len = setkeyyyleng - 2;
+ yylval.val.buf = strdup(setkeyyytext);
if (!yylval.val.buf)
yyfatal("insufficient memory");
@@ -1866,10 +1897,10 @@ YY_RULE_SETUP
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 293 "token.l"
+#line 293 "../../ipsec-tools/src/setkey/token.l"
{
- yylval.val.len = yyleng;
- yylval.val.buf = strdup(yytext);
+ yylval.val.len = setkeyyyleng;
+ yylval.val.buf = strdup(setkeyyytext);
if (!yylval.val.buf)
yyfatal("insufficient memory");
return(STRING);
@@ -1877,10 +1908,10 @@ YY_RULE_SETUP
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 301 "token.l"
+#line 301 "../../ipsec-tools/src/setkey/token.l"
{
- yylval.val.len = yyleng;
- yylval.val.buf = strdup(yytext);
+ yylval.val.len = setkeyyyleng;
+ yylval.val.buf = strdup(setkeyyytext);
if (!yylval.val.buf)
yyfatal("insufficient memory");
return(STRING);
@@ -1888,7 +1919,7 @@ YY_RULE_SETUP
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 309 "token.l"
+#line 309 "../../ipsec-tools/src/setkey/token.l"
{
yyfatal("Syntax error");
/*NOTREACHED*/
@@ -1896,10 +1927,10 @@ YY_RULE_SETUP
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 314 "token.l"
+#line 314 "../../ipsec-tools/src/setkey/token.l"
ECHO;
YY_BREAK
-#line 1903 "token.c"
+#line 1934 "<stdout>"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(S_PL):
case YY_STATE_EOF(S_AUTHALG):
@@ -1919,15 +1950,15 @@ case YY_STATE_EOF(S_ENCALG):
{
/* 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
+ * just pointed setkeyyyin at a new source and called
+ * setkeyyylex(). 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_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = setkeyyyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1980,11 +2011,11 @@ case YY_STATE_EOF(S_ENCALG):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( setkeyyywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * yytext, we can now set up
+ * setkeyyytext, 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
@@ -2033,7 +2064,7 @@ case YY_STATE_EOF(S_ENCALG):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of yylex */
+} /* end of setkeyyylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -2044,9 +2075,9 @@ case YY_STATE_EOF(S_ENCALG):
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -2111,7 +2142,7 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ setkeyyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -2143,7 +2174,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ setkeyyyrestart(setkeyyyin );
}
else
@@ -2160,7 +2191,7 @@ static int yy_get_next_buffer (void)
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) setkeyyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
@@ -2178,14 +2209,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ 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);
+ 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;
@@ -2210,10 +2241,10 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -2272,13 +2303,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ setkeyyyrestart(setkeyyyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( setkeyyywrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -2298,7 +2329,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ *(yy_c_buf_p) = '\0'; /* preserve setkeyyytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -2310,32 +2341,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file )
+ void setkeyyyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+ setkeyyyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ setkeyyy_create_buffer(setkeyyyin,YY_BUF_SIZE );
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
+ setkeyyy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ setkeyyy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void setkeyyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
+ * setkeyyypop_buffer_state();
+ * setkeyyypush_buffer_state(new_buffer);
*/
- yyensure_buffer_stack ();
+ setkeyyyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -2348,21 +2379,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ setkeyyy_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
+ * EOF (setkeyyywrap()) processing, but the only time this flag
+ * is looked at is after setkeyyywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void yy_load_buffer_state (void)
+static void setkeyyy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ setkeyyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -2372,35 +2403,35 @@ static void yy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE setkeyyy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) setkeyyyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in setkeyyy_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 *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) setkeyyyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in setkeyyy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ setkeyyy_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with setkeyyy_create_buffer()
*
*/
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ void setkeyyy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -2410,27 +2441,27 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ setkeyyyfree((void *) b->yy_ch_buf );
- yyfree((void *) b );
+ setkeyyyfree((void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a setkeyyyrestart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void setkeyyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- yy_flush_buffer(b );
+ setkeyyy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then setkeyyy_init_buffer was _probably_
+ * called from setkeyyyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -2447,7 +2478,7 @@ static void yy_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ void setkeyyy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -2467,7 +2498,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ setkeyyy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -2476,14 +2507,14 @@ static void yy_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void setkeyyypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- yyensure_buffer_stack();
+ setkeyyyensure_buffer_stack();
- /* This block is copied from yy_switch_to_buffer. */
+ /* This block is copied from setkeyyy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -2497,8 +2528,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ /* copied from setkeyyy_switch_to_buffer. */
+ setkeyyy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -2506,18 +2537,18 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void yypop_buffer_state (void)
+void setkeyyypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ setkeyyy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
+ setkeyyy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2525,7 +2556,7 @@ void yypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void yyensure_buffer_stack (void)
+static void setkeyyyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
@@ -2536,11 +2567,11 @@ static void yyensure_buffer_stack (void)
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)setkeyyyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in setkeyyyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -2555,12 +2586,12 @@ static void yyensure_buffer_stack (void)
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)setkeyyyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in setkeyyyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2574,7 +2605,7 @@ static void yyensure_buffer_stack (void)
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE setkeyyy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -2584,9 +2615,9 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) setkeyyyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in setkeyyy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -2598,53 +2629,53 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ setkeyyy_switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to setkeyyylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
+ * setkeyyy_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE setkeyyy_scan_string (yyconst char * yystr )
{
- return yy_scan_bytes(yystr,strlen(yystr) );
+ return setkeyyy_scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to setkeyyylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE setkeyyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) yyalloc(n );
+ buf = (char *) setkeyyyalloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in setkeyyy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer(buf,n );
+ b = setkeyyy_scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in setkeyyy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2670,14 +2701,14 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up setkeyyytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ setkeyyytext[setkeyyyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = setkeyyytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
+ setkeyyyleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -2686,85 +2717,85 @@ static void yy_fatal_error (yyconst char* msg )
/** Get the current line number.
*
*/
-int yyget_lineno (void)
+int setkeyyyget_lineno (void)
{
- return yylineno;
+ return setkeyyylineno;
}
/** Get the input stream.
*
*/
-FILE *yyget_in (void)
+FILE *setkeyyyget_in (void)
{
- return yyin;
+ return setkeyyyin;
}
/** Get the output stream.
*
*/
-FILE *yyget_out (void)
+FILE *setkeyyyget_out (void)
{
- return yyout;
+ return setkeyyyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t yyget_leng (void)
+yy_size_t setkeyyyget_leng (void)
{
- return yyleng;
+ return setkeyyyleng;
}
/** Get the current token.
*
*/
-char *yyget_text (void)
+char *setkeyyyget_text (void)
{
- return yytext;
+ return setkeyyytext;
}
/** Set the current line number.
* @param line_number
*
*/
-void yyset_lineno (int line_number )
+void setkeyyyset_lineno (int line_number )
{
- yylineno = line_number;
+ setkeyyylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
- * @see yy_switch_to_buffer
+ * @see setkeyyy_switch_to_buffer
*/
-void yyset_in (FILE * in_str )
+void setkeyyyset_in (FILE * in_str )
{
- yyin = in_str ;
+ setkeyyyin = in_str ;
}
-void yyset_out (FILE * out_str )
+void setkeyyyset_out (FILE * out_str )
{
- yyout = out_str ;
+ setkeyyyout = out_str ;
}
-int yyget_debug (void)
+int setkeyyyget_debug (void)
{
- return yy_flex_debug;
+ return setkeyyy_flex_debug;
}
-void yyset_debug (int bdebug )
+void setkeyyyset_debug (int bdebug )
{
- yy_flex_debug = bdebug ;
+ setkeyyy_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from yylex_destroy(), so don't allocate here.
+ * This function is called from setkeyyylex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
@@ -2776,36 +2807,36 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ setkeyyyin = stdin;
+ setkeyyyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ setkeyyyin = (FILE *) 0;
+ setkeyyyout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * yylex_init()
+ * setkeyyylex_init()
*/
return 0;
}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
+/* setkeyyylex_destroy is for both reentrant and non-reentrant scanners. */
+int setkeyyylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ setkeyyy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
+ setkeyyypop_buffer_state();
}
/* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
+ setkeyyyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * yylex() is called, initialization will occur. */
+ * setkeyyylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2818,7 +2849,7 @@ int yylex_destroy (void)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2827,7 +2858,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2835,12 +2866,12 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+void *setkeyyyalloc (yy_size_t size )
{
return (void *) malloc( size );
}
-void *yyrealloc (void * ptr, yy_size_t size )
+void *setkeyyyrealloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
@@ -2852,14 +2883,14 @@ void *yyrealloc (void * ptr, yy_size_t size )
return (void *) realloc( (char *) ptr, size );
}
-void yyfree (void * ptr )
+void setkeyyyfree (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see setkeyyyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 314 "token.l"
+#line 314 "../../ipsec-tools/src/setkey/token.l"
@@ -2875,14 +2906,14 @@ void
yyerror(s)
const char *s;
{
- printf("line %d: %s at [%s]\n", lineno, s, yytext);
+ printf("line %d: %s at [%s]\n", lineno, s, setkeyyytext);
}
int
parse(fp)
FILE **fp;
{
- yyin = *fp;
+ setkeyyyin = *fp;
lineno = 1;
parse_init();
@@ -2901,9 +2932,9 @@ parse_string (char *src)
int result;
YY_BUFFER_STATE buf_state;
- buf_state = yy_scan_string(src);
+ buf_state = setkeyyy_scan_string(src);
result = yyparse();
- yy_delete_buffer(buf_state);
+ setkeyyy_delete_buffer(buf_state);
return result;
}
diff --git a/ipsec-tools/src/setkey/token_wrapper.c b/ipsec-tools/src/setkey/token_wrapper.c
new file mode 100644
index 00000000..92c7c5f1
--- /dev/null
+++ b/ipsec-tools/src/setkey/token_wrapper.c
@@ -0,0 +1,12 @@
+#include <machine/rtems-bsd-user-space.h>
+#include <machine/rtems-bsd-program.h>
+#include "rtems-bsd-setkey-namespace.h"
+#define yylval setkeyyylval
+#define yyparse setkeyyyparse
+static int
+setkeyyywrap(void)
+{
+ return 1;
+}
+#include "token.c"
+#include "rtems-bsd-setkey-token_wrapper-data.h"