Home | History | Annotate | Download | only in libpcap
      1 #ifndef pcap_HEADER_H
      2 #define pcap_HEADER_H 1
      3 #define pcap_IN_HEADER 1
      4 
      5 #line 6 "scanner.h"
      6 #line 2 "scanner.l"
      7 /* Must come first for _LARGE_FILE_API on AIX. */
      8 #ifdef HAVE_CONFIG_H
      9 #include "config.h"
     10 #endif
     11 
     12 
     13 
     14 #line 15 "scanner.h"
     15 
     16 #define  YY_INT_ALIGNED short int
     17 
     18 /* A lexical scanner generated by flex */
     19 
     20 #define FLEX_SCANNER
     21 #define YY_FLEX_MAJOR_VERSION 2
     22 #define YY_FLEX_MINOR_VERSION 5
     23 #define YY_FLEX_SUBMINOR_VERSION 39
     24 #if YY_FLEX_SUBMINOR_VERSION > 0
     25 #define FLEX_BETA
     26 #endif
     27 
     28 /* First, we deal with  platform-specific or compiler-specific issues. */
     29 
     30 /* begin standard C headers. */
     31 #include <stdio.h>
     32 #include <string.h>
     33 #include <errno.h>
     34 #include <stdlib.h>
     35 
     36 /* end standard C headers. */
     37 
     38 /* flex integer type definitions */
     39 
     40 #ifndef FLEXINT_H
     41 #define FLEXINT_H
     42 
     43 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
     44 
     45 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     46 
     47 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
     48  * if you want the limit (max/min) macros for int types.
     49  */
     50 #ifndef __STDC_LIMIT_MACROS
     51 #define __STDC_LIMIT_MACROS 1
     52 #endif
     53 
     54 #include <inttypes.h>
     55 typedef int8_t flex_int8_t;
     56 typedef uint8_t flex_uint8_t;
     57 typedef int16_t flex_int16_t;
     58 typedef uint16_t flex_uint16_t;
     59 typedef int32_t flex_int32_t;
     60 typedef uint32_t flex_uint32_t;
     61 #else
     62 typedef signed char flex_int8_t;
     63 typedef short int flex_int16_t;
     64 typedef int flex_int32_t;
     65 typedef unsigned char flex_uint8_t;
     66 typedef unsigned short int flex_uint16_t;
     67 typedef unsigned int flex_uint32_t;
     68 
     69 /* Limits of integral types. */
     70 #ifndef INT8_MIN
     71 #define INT8_MIN               (-128)
     72 #endif
     73 #ifndef INT16_MIN
     74 #define INT16_MIN              (-32767-1)
     75 #endif
     76 #ifndef INT32_MIN
     77 #define INT32_MIN              (-2147483647-1)
     78 #endif
     79 #ifndef INT8_MAX
     80 #define INT8_MAX               (127)
     81 #endif
     82 #ifndef INT16_MAX
     83 #define INT16_MAX              (32767)
     84 #endif
     85 #ifndef INT32_MAX
     86 #define INT32_MAX              (2147483647)
     87 #endif
     88 #ifndef UINT8_MAX
     89 #define UINT8_MAX              (255U)
     90 #endif
     91 #ifndef UINT16_MAX
     92 #define UINT16_MAX             (65535U)
     93 #endif
     94 #ifndef UINT32_MAX
     95 #define UINT32_MAX             (4294967295U)
     96 #endif
     97 
     98 #endif /* ! C99 */
     99 
    100 #endif /* ! FLEXINT_H */
    101 
    102 #ifdef __cplusplus
    103 
    104 /* The "const" storage-class-modifier is valid. */
    105 #define YY_USE_CONST
    106 
    107 #else	/* ! __cplusplus */
    108 
    109 /* C99 requires __STDC__ to be defined as 1. */
    110 #if defined (__STDC__)
    111 
    112 #define YY_USE_CONST
    113 
    114 #endif	/* defined (__STDC__) */
    115 #endif	/* ! __cplusplus */
    116 
    117 #ifdef YY_USE_CONST
    118 #define yyconst const
    119 #else
    120 #define yyconst
    121 #endif
    122 
    123 /* An opaque pointer. */
    124 #ifndef YY_TYPEDEF_YY_SCANNER_T
    125 #define YY_TYPEDEF_YY_SCANNER_T
    126 typedef void* yyscan_t;
    127 #endif
    128 
    129 /* For convenience, these vars (plus the bison vars far below)
    130    are macros in the reentrant scanner. */
    131 #define yyin yyg->yyin_r
    132 #define yyout yyg->yyout_r
    133 #define yyextra yyg->yyextra_r
    134 #define yyleng yyg->yyleng_r
    135 #define yytext yyg->yytext_r
    136 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
    137 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
    138 #define yy_flex_debug yyg->yy_flex_debug_r
    139 
    140 /* Size of default input buffer. */
    141 #ifndef YY_BUF_SIZE
    142 #ifdef __ia64__
    143 /* On IA-64, the buffer size is 16k, not 8k.
    144  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
    145  * Ditto for the __ia64__ case accordingly.
    146  */
    147 #define YY_BUF_SIZE 32768
    148 #else
    149 #define YY_BUF_SIZE 16384
    150 #endif /* __ia64__ */
    151 #endif
    152 
    153 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
    154 #define YY_TYPEDEF_YY_BUFFER_STATE
    155 typedef struct yy_buffer_state *YY_BUFFER_STATE;
    156 #endif
    157 
    158 #ifndef YY_TYPEDEF_YY_SIZE_T
    159 #define YY_TYPEDEF_YY_SIZE_T
    160 typedef size_t yy_size_t;
    161 #endif
    162 
    163 #ifndef YY_STRUCT_YY_BUFFER_STATE
    164 #define YY_STRUCT_YY_BUFFER_STATE
    165 struct yy_buffer_state
    166 	{
    167 	FILE *yy_input_file;
    168 
    169 	char *yy_ch_buf;		/* input buffer */
    170 	char *yy_buf_pos;		/* current position in input buffer */
    171 
    172 	/* Size of input buffer in bytes, not including room for EOB
    173 	 * characters.
    174 	 */
    175 	yy_size_t yy_buf_size;
    176 
    177 	/* Number of characters read into yy_ch_buf, not including EOB
    178 	 * characters.
    179 	 */
    180 	yy_size_t yy_n_chars;
    181 
    182 	/* Whether we "own" the buffer - i.e., we know we created it,
    183 	 * and can realloc() it to grow it, and should free() it to
    184 	 * delete it.
    185 	 */
    186 	int yy_is_our_buffer;
    187 
    188 	/* Whether this is an "interactive" input source; if so, and
    189 	 * if we're using stdio for input, then we want to use getc()
    190 	 * instead of fread(), to make sure we stop fetching input after
    191 	 * each newline.
    192 	 */
    193 	int yy_is_interactive;
    194 
    195 	/* Whether we're considered to be at the beginning of a line.
    196 	 * If so, '^' rules will be active on the next match, otherwise
    197 	 * not.
    198 	 */
    199 	int yy_at_bol;
    200 
    201     int yy_bs_lineno; /**< The line count. */
    202     int yy_bs_column; /**< The column count. */
    203 
    204 	/* Whether to try to fill the input buffer when we reach the
    205 	 * end of it.
    206 	 */
    207 	int yy_fill_buffer;
    208 
    209 	int yy_buffer_status;
    210 
    211 	};
    212 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
    213 
    214 void pcap_restart (FILE *input_file ,yyscan_t yyscanner );
    215 void pcap__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
    216 YY_BUFFER_STATE pcap__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
    217 void pcap__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
    218 void pcap__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
    219 void pcap_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
    220 void pcap_pop_buffer_state (yyscan_t yyscanner );
    221 
    222 YY_BUFFER_STATE pcap__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
    223 YY_BUFFER_STATE pcap__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
    224 YY_BUFFER_STATE pcap__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
    225 
    226 void *pcap_alloc (yy_size_t ,yyscan_t yyscanner );
    227 void *pcap_realloc (void *,yy_size_t ,yyscan_t yyscanner );
    228 void pcap_free (void * ,yyscan_t yyscanner );
    229 
    230 /* Begin user sect3 */
    231 
    232 #define pcap_wrap(yyscanner) 1
    233 #define YY_SKIP_YYWRAP
    234 
    235 #define yytext_ptr yytext_r
    236 
    237 #ifdef YY_HEADER_EXPORT_START_CONDITIONS
    238 #define INITIAL 0
    239 
    240 #endif
    241 
    242 #ifndef YY_NO_UNISTD_H
    243 /* Special case for "unistd.h", since it is non-ANSI. We include it way
    244  * down here because we want the user's section 1 to have been scanned first.
    245  * The user has a chance to override it with an option.
    246  */
    247 #include <unistd.h>
    248 #endif
    249 
    250 #define YY_EXTRA_TYPE compiler_state_t *
    251 
    252 int pcap_lex_init (yyscan_t* scanner);
    253 
    254 int pcap_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
    255 
    256 /* Accessor methods to globals.
    257    These are made visible to non-reentrant scanners for convenience. */
    258 
    259 int pcap_lex_destroy (yyscan_t yyscanner );
    260 
    261 int pcap_get_debug (yyscan_t yyscanner );
    262 
    263 void pcap_set_debug (int debug_flag ,yyscan_t yyscanner );
    264 
    265 YY_EXTRA_TYPE pcap_get_extra (yyscan_t yyscanner );
    266 
    267 void pcap_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
    268 
    269 FILE *pcap_get_in (yyscan_t yyscanner );
    270 
    271 void pcap_set_in  (FILE * in_str ,yyscan_t yyscanner );
    272 
    273 FILE *pcap_get_out (yyscan_t yyscanner );
    274 
    275 void pcap_set_out  (FILE * out_str ,yyscan_t yyscanner );
    276 
    277 yy_size_t pcap_get_leng (yyscan_t yyscanner );
    278 
    279 char *pcap_get_text (yyscan_t yyscanner );
    280 
    281 int pcap_get_lineno (yyscan_t yyscanner );
    282 
    283 void pcap_set_lineno (int line_number ,yyscan_t yyscanner );
    284 
    285 int pcap_get_column  (yyscan_t yyscanner );
    286 
    287 void pcap_set_column (int column_no ,yyscan_t yyscanner );
    288 
    289 YYSTYPE * pcap_get_lval (yyscan_t yyscanner );
    290 
    291 void pcap_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
    292 
    293 /* Macros after this point can all be overridden by user definitions in
    294  * section 1.
    295  */
    296 
    297 #ifndef YY_SKIP_YYWRAP
    298 #ifdef __cplusplus
    299 extern "C" int pcap_wrap (yyscan_t yyscanner );
    300 #else
    301 extern int pcap_wrap (yyscan_t yyscanner );
    302 #endif
    303 #endif
    304 
    305 #ifndef yytext_ptr
    306 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
    307 #endif
    308 
    309 #ifdef YY_NEED_STRLEN
    310 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
    311 #endif
    312 
    313 #ifndef YY_NO_INPUT
    314 
    315 #endif
    316 
    317 /* Amount of stuff to slurp up with each read. */
    318 #ifndef YY_READ_BUF_SIZE
    319 #ifdef __ia64__
    320 /* On IA-64, the buffer size is 16k, not 8k */
    321 #define YY_READ_BUF_SIZE 16384
    322 #else
    323 #define YY_READ_BUF_SIZE 8192
    324 #endif /* __ia64__ */
    325 #endif
    326 
    327 /* Number of entries by which start-condition stack grows. */
    328 #ifndef YY_START_STACK_INCR
    329 #define YY_START_STACK_INCR 25
    330 #endif
    331 
    332 /* Default declaration of generated scanner - a define so the user can
    333  * easily add parameters.
    334  */
    335 #ifndef YY_DECL
    336 #define YY_DECL_IS_OURS 1
    337 
    338 extern int pcap_lex \
    339                (YYSTYPE * yylval_param ,yyscan_t yyscanner);
    340 
    341 #define YY_DECL int pcap_lex \
    342                (YYSTYPE * yylval_param , yyscan_t yyscanner)
    343 #endif /* !YY_DECL */
    344 
    345 /* yy_get_previous_state - get the state just before the EOB char was reached */
    346 
    347 #undef YY_NEW_FILE
    348 #undef YY_FLUSH_BUFFER
    349 #undef yy_set_bol
    350 #undef yy_new_buffer
    351 #undef yy_set_interactive
    352 #undef YY_DO_BEFORE_ACTION
    353 
    354 #ifdef YY_DECL_IS_OURS
    355 #undef YY_DECL_IS_OURS
    356 #undef YY_DECL
    357 #endif
    358 
    359 #line 443 "scanner.l"
    360 
    361 
    362 #line 363 "scanner.h"
    363 #undef pcap_IN_HEADER
    364 #endif /* pcap_HEADER_H */
    365