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