summaryrefslogtreecommitdiffstats
path: root/ipsec-tools/src/setkey/token.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipsec-tools/src/setkey/token.c')
-rw-r--r--ipsec-tools/src/setkey/token.c673
1 files changed, 352 insertions, 321 deletions
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;
}