Lines Matching +full:- +full:- +full:without +full:- +full:host +full:- +full:scanner
1 #line 2 "scanner.c"
10 * Flex-generated scanners may only include <inttypes.h> if __STDC_VERSION__
12 * define it with that value, because it isn't 100% C99-compliant, even
14 * scanner needs.
18 * scanner.c, and then include <stdint.h>, which may define them differently
21 * If we include it here, and they're defined, that'll prevent scanner.c
22 * from defining them. So we include <pcap/pcap-inttypes.h>, to get
25 #include <pcap/pcap-inttypes.h>
27 #include "diag-control.h"
29 #line 30 "scanner.c"
33 /* A lexical scanner generated by flex */
43 /* First, we deal with platform-specific or compiler-specific issues. */
58 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
86 #define INT8_MIN (-128)
89 #define INT16_MIN (-32767-1)
92 #define INT32_MIN (-2147483647-1)
126 /* Returned upon end-of-file. */
131 * we want to instead treat it as an 8-bit unsigned char, hence the
143 are macros in the reentrant scanner. */
144 #define yyin yyg->yyin_r
145 #define yyout yyg->yyout_r
146 #define yyextra yyg->yyextra_r
147 #define yyleng yyg->yyleng_r
148 #define yytext yyg->yytext_r
149 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
150 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
151 #define yy_flex_debug yyg->yy_flex_debug_r
154 * but we do it the disgusting crufty way forced on us by the ()-less
157 #define BEGIN yyg->yy_start = 1 + 2 *
163 #define YY_START ((yyg->yy_start - 1) / 2)
177 /* On IA-64, the buffer size is 16k, not 8k.
215 *yy_cp = yyg->yy_hold_char; \
217 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
222 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
243 /* Whether we "own" the buffer - i.e., we know we created it,
278 * possible backing-up.
291 * "scanner state".
295 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
296 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
302 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
348 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
367 * corresponding action - sets up yytext.
370 yyg->yytext_ptr = yy_bp; \
371 yyleng = (int) (yy_cp - yy_bp); \
372 yyg->yy_hold_char = *yy_cp; \
374 yyg->yy_c_buf_p = yy_cp;
378 /* This struct is not used in this scanner,
2864 #line 1 "scanner.l"
2867 * We want a reentrant scanner.
2870 * And we need to pass the compiler state to the scanner.
2889 #line 67 "scanner.l"
2894 * Redistribution and use in source and binary forms, with or without
2904 * or promote products derived from this software without specific prior
2906 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
2907 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
2914 #include "pcap-int.h"
2935 * https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx
2970 #include "os-proto.h"
2981 #line 2982 "scanner.c"
2986 /* Special case for "unistd.h", since it is non-ANSI. We include it way
2995 /* Holds the entire state of the reentrant scanner. */
2999 /* User-defined. Not touched by flex. */
3002 /* The rest are the same as the globals declared in the non-reentrant scanner. */
3035 # define yylval yyg->yylval_r
3037 int pcap_lex_init (yyscan_t* scanner);
3039 int pcap_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
3042 These are made visible to non-reentrant scanners for convenience. */
3115 /* On IA-64, the buffer size is 16k, not 8k */
3135 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
3145 YY_FATAL_ERROR( "input in flex scanner failed" ); \
3155 YY_FATAL_ERROR( "input in flex scanner failed" ); \
3166 /* No semi-colon after return; correct usage is to write "yyterminate();" -
3174 /* Number of entries by which start-condition stack grows. */
3186 /* Default declaration of generated scanner - a define so the user can
3214 /** The main scanner function which does all the work.
3225 if ( !yyg->yy_init )
3227 yyg->yy_init = 1;
3233 if ( ! yyg->yy_start )
3234 yyg->yy_start = 1; /* first start state */
3252 #line 254 "scanner.l"
3254 #line 3255 "scanner.c"
3256 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
3258 yy_cp = yyg->yy_c_buf_p;
3261 *yy_cp = yyg->yy_hold_char;
3268 yy_current_state = yyg->yy_start;
3275 yyg->yy_last_accepting_state = yy_current_state;
3276 yyg->yy_last_accepting_cpos = yy_cp;
3288 yy_cp = yyg->yy_last_accepting_cpos;
3289 yy_current_state = yyg->yy_last_accepting_state;
3302 *yy_cp = yyg->yy_hold_char;
3303 yy_cp = yyg->yy_last_accepting_cpos;
3304 yy_current_state = yyg->yy_last_accepting_state;
3309 #line 255 "scanner.l"
3314 #line 256 "scanner.l"
3319 #line 258 "scanner.l"
3324 #line 259 "scanner.l"
3329 #line 260 "scanner.l"
3334 #line 261 "scanner.l"
3339 #line 262 "scanner.l"
3344 #line 263 "scanner.l"
3349 #line 264 "scanner.l"
3354 #line 265 "scanner.l"
3359 #line 266 "scanner.l"
3364 #line 267 "scanner.l"
3369 #line 268 "scanner.l"
3374 #line 269 "scanner.l"
3379 #line 270 "scanner.l"
3384 #line 271 "scanner.l"
3389 #line 272 "scanner.l"
3394 #line 274 "scanner.l"
3399 #line 275 "scanner.l"
3404 #line 276 "scanner.l"
3409 #line 277 "scanner.l"
3414 #line 279 "scanner.l"
3419 #line 280 "scanner.l"
3424 #line 281 "scanner.l"
3429 #line 282 "scanner.l"
3434 #line 283 "scanner.l"
3439 #line 284 "scanner.l"
3444 #line 285 "scanner.l"
3449 #line 287 "scanner.l"
3454 #line 288 "scanner.l"
3459 #line 289 "scanner.l"
3464 #line 290 "scanner.l"
3469 #line 291 "scanner.l"
3474 #line 292 "scanner.l"
3479 #line 293 "scanner.l"
3484 #line 294 "scanner.l"
3489 #line 295 "scanner.l"
3494 #line 296 "scanner.l"
3499 #line 297 "scanner.l"
3504 #line 298 "scanner.l"
3509 #line 300 "scanner.l"
3514 #line 302 "scanner.l"
3519 #line 304 "scanner.l"
3524 #line 306 "scanner.l"
3529 #line 308 "scanner.l"
3530 return HOST;
3534 #line 309 "scanner.l"
3539 #line 310 "scanner.l"
3544 #line 311 "scanner.l"
3549 #line 312 "scanner.l"
3554 #line 313 "scanner.l"
3559 #line 314 "scanner.l"
3570 #line 322 "scanner.l"
3575 #line 324 "scanner.l"
3580 #line 325 "scanner.l"
3585 #line 326 "scanner.l"
3590 #line 327 "scanner.l"
3595 #line 328 "scanner.l"
3600 #line 329 "scanner.l"
3605 #line 330 "scanner.l"
3610 #line 331 "scanner.l"
3615 #line 332 "scanner.l"
3620 #line 334 "scanner.l"
3625 #line 335 "scanner.l"
3630 #line 336 "scanner.l"
3635 #line 337 "scanner.l"
3640 #line 338 "scanner.l"
3645 #line 340 "scanner.l"
3650 #line 341 "scanner.l"
3655 #line 342 "scanner.l"
3660 #line 344 "scanner.l"
3665 #line 345 "scanner.l"
3670 #line 346 "scanner.l"
3675 #line 348 "scanner.l"
3680 #line 349 "scanner.l"
3685 #line 350 "scanner.l"
3690 #line 351 "scanner.l"
3695 #line 352 "scanner.l"
3700 #line 354 "scanner.l"
3705 #line 355 "scanner.l"
3710 #line 356 "scanner.l"
3715 #line 357 "scanner.l"
3720 #line 358 "scanner.l"
3725 #line 359 "scanner.l"
3730 #line 360 "scanner.l"
3735 #line 361 "scanner.l"
3740 #line 362 "scanner.l"
3745 #line 363 "scanner.l"
3750 #line 364 "scanner.l"
3755 #line 365 "scanner.l"
3760 #line 366 "scanner.l"
3765 #line 367 "scanner.l"
3770 #line 369 "scanner.l"
3775 #line 370 "scanner.l"
3780 #line 371 "scanner.l"
3785 #line 372 "scanner.l"
3790 #line 373 "scanner.l"
3795 #line 374 "scanner.l"
3800 #line 376 "scanner.l"
3805 #line 377 "scanner.l"
3810 #line 378 "scanner.l"
3815 #line 379 "scanner.l"
3820 #line 380 "scanner.l"
3825 #line 381 "scanner.l"
3830 #line 382 "scanner.l"
3835 #line 383 "scanner.l"
3840 #line 384 "scanner.l"
3845 #line 385 "scanner.l"
3850 #line 386 "scanner.l"
3855 #line 387 "scanner.l"
3860 #line 388 "scanner.l"
3865 #line 389 "scanner.l"
3870 #line 390 "scanner.l"
3876 #line 392 "scanner.l"
3881 #line 393 "scanner.l"
3886 #line 394 "scanner.l"
3891 #line 395 "scanner.l"
3896 #line 396 "scanner.l"
3901 #line 397 "scanner.l"
3906 #line 398 "scanner.l"
3911 #line 399 "scanner.l"
3916 #line 400 "scanner.l"
3917 { yylval->e = pcap_ether_aton(((char *)yytext)+1);
3918 if (yylval->e == NULL)
3924 #line 404 "scanner.l"
3925 { yylval->e = pcap_ether_aton((char *)yytext);
3926 if (yylval->e == NULL)
3932 #line 408 "scanner.l"
3933 { yylval->i = stoi((char *)yytext); return NUM; }
3937 #line 409 "scanner.l"
3939 yylval->s = sdup(yyextra, (char *)yytext); return HID; }
3943 #line 411 "scanner.l"
3954 yylval->s = sdup(yyextra, (char *)yytext); return HID6;
3963 #line 427 "scanner.l"
3968 #line 428 "scanner.l"
3969 { yylval->i = 0; return NUM; }
3973 #line 429 "scanner.l"
3974 { yylval->i = 1; return NUM; }
3978 #line 430 "scanner.l"
3979 { yylval->i = 0; return NUM; }
3983 #line 431 "scanner.l"
3984 { yylval->i = 3; return NUM; }
3988 #line 432 "scanner.l"
3989 { yylval->i = 4; return NUM; }
3993 #line 433 "scanner.l"
3994 { yylval->i = 5; return NUM; }
3998 #line 434 "scanner.l"
3999 { yylval->i = 8; return NUM; }
4003 #line 435 "scanner.l"
4004 { yylval->i = 9; return NUM; }
4008 #line 436 "scanner.l"
4009 { yylval->i = 10; return NUM; }
4013 #line 437 "scanner.l"
4014 { yylval->i = 11; return NUM; }
4018 #line 438 "scanner.l"
4019 { yylval->i = 12; return NUM; }
4023 #line 439 "scanner.l"
4024 { yylval->i = 13; return NUM; }
4028 #line 440 "scanner.l"
4029 { yylval->i = 14; return NUM; }
4033 #line 441 "scanner.l"
4034 { yylval->i = 15; return NUM; }
4038 #line 442 "scanner.l"
4039 { yylval->i = 16; return NUM; }
4043 #line 443 "scanner.l"
4044 { yylval->i = 17; return NUM; }
4048 #line 444 "scanner.l"
4049 { yylval->i = 18; return NUM; }
4053 #line 446 "scanner.l"
4054 { yylval->i = 0; return NUM; }
4058 #line 447 "scanner.l"
4059 { yylval->i = 1; return NUM; }
4063 #line 449 "scanner.l"
4064 { yylval->i = 128; return NUM; }
4068 #line 450 "scanner.l"
4069 { yylval->i = 129; return NUM; }
4073 #line 451 "scanner.l"
4074 { yylval->i = 130; return NUM; }
4078 #line 452 "scanner.l"
4079 { yylval->i = 131; return NUM; }
4083 #line 453 "scanner.l"
4084 { yylval->i = 132; return NUM; }
4088 #line 454 "scanner.l"
4089 { yylval->i = 133; return NUM; }
4093 #line 455 "scanner.l"
4094 { yylval->i = 134; return NUM; }
4098 #line 456 "scanner.l"
4099 { yylval->i = 135; return NUM; }
4103 #line 457 "scanner.l"
4104 { yylval->i = 136; return NUM; }
4108 #line 458 "scanner.l"
4109 { yylval->i = 137; return NUM; }
4113 #line 459 "scanner.l"
4114 { yylval->i = 138; return NUM; }
4118 #line 460 "scanner.l"
4119 { yylval->i = 139; return NUM; }
4123 #line 461 "scanner.l"
4124 { yylval->i = 140; return NUM; }
4128 #line 462 "scanner.l"
4129 { yylval->i = 141; return NUM; }
4133 #line 463 "scanner.l"
4134 { yylval->i = 142; return NUM; }
4138 #line 464 "scanner.l"
4139 { yylval->i = 143; return NUM; }
4143 #line 465 "scanner.l"
4144 { yylval->i = 144; return NUM; }
4148 #line 466 "scanner.l"
4149 { yylval->i = 145; return NUM; }
4153 #line 467 "scanner.l"
4154 { yylval->i = 146; return NUM; }
4158 #line 468 "scanner.l"
4159 { yylval->i = 147; return NUM; }
4163 #line 469 "scanner.l"
4164 { yylval->i = 148; return NUM; }
4168 #line 470 "scanner.l"
4169 { yylval->i = 149; return NUM; }
4173 #line 471 "scanner.l"
4174 { yylval->i = 151; return NUM; }
4178 #line 472 "scanner.l"
4179 { yylval->i = 152; return NUM; }
4183 #line 473 "scanner.l"
4184 { yylval->i = 153; return NUM; }
4188 #line 475 "scanner.l"
4189 { yylval->i = 13; return NUM; }
4193 #line 476 "scanner.l"
4194 { yylval->i = 0x01; return NUM; }
4198 #line 477 "scanner.l"
4199 { yylval->i = 0x02; return NUM; }
4203 #line 478 "scanner.l"
4204 { yylval->i = 0x04; return NUM; }
4208 #line 479 "scanner.l"
4209 { yylval->i = 0x08; return NUM; }
4213 #line 480 "scanner.l"
4214 { yylval->i = 0x10; return NUM; }
4218 #line 481 "scanner.l"
4219 { yylval->i = 0x20; return NUM; }
4223 #line 482 "scanner.l"
4224 { yylval->i = 0x40; return NUM; }
4228 #line 483 "scanner.l"
4229 { yylval->i = 0x80; return NUM; }
4233 #line 484 "scanner.l"
4235 yylval->s = sdup(yyextra, (char *)yytext); return ID; }
4239 #line 486 "scanner.l"
4240 { yylval->s = sdup(yyextra, (char *)yytext + 1); return ID; }
4244 #line 487 "scanner.l"
4250 #line 489 "scanner.l"
4255 #line 490 "scanner.l"
4258 #line 4259 "scanner.c"
4265 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
4268 *yy_cp = yyg->yy_hold_char;
4271 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
4280 * back-up) that will match for the new input source.
4282 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4283 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
4284 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
4291 * end-of-buffer state). Contrast this with the test
4294 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
4298 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
4313 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
4318 yy_cp = ++yyg->yy_c_buf_p;
4325 yy_cp = yyg->yy_last_accepting_cpos;
4326 yy_current_state = yyg->yy_last_accepting_state;
4335 yyg->yy_did_buffer_switch_on_eof = 0;
4344 * call the scanner after we return the
4345 * YY_NULL, it'll still work - another
4348 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
4356 if ( ! yyg->yy_did_buffer_switch_on_eof )
4363 yyg->yy_c_buf_p =
4364 yyg->yytext_ptr + yy_amount_of_matched_text;
4368 yy_cp = yyg->yy_c_buf_p;
4369 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
4373 yyg->yy_c_buf_p =
4374 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
4378 yy_cp = yyg->yy_c_buf_p;
4379 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
4387 "fatal flex scanner internal error--no action found" );
4393 /* yy_get_next_buffer - try to read in a new buffer
4396 * EOB_ACT_LAST_MATCH -
4397 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
4398 * EOB_ACT_END_OF_FILE - end of file
4403 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; in yy_get_next_buffer()
4404 char *source = yyg->yytext_ptr; in yy_get_next_buffer()
4408 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) in yy_get_next_buffer()
4410 "fatal flex scanner internal error--end of buffer missed" ); in yy_get_next_buffer()
4412 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) in yy_get_next_buffer()
4414 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) in yy_get_next_buffer()
4434 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); in yy_get_next_buffer()
4439 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) in yy_get_next_buffer()
4443 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; in yy_get_next_buffer()
4448 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; in yy_get_next_buffer()
4451 { /* Not enough room in the buffer - grow it. */ in yy_get_next_buffer()
4457 (int) (yyg->yy_c_buf_p - b->yy_ch_buf); in yy_get_next_buffer()
4459 if ( b->yy_is_our_buffer ) in yy_get_next_buffer()
4461 int new_size = b->yy_buf_size * 2; in yy_get_next_buffer()
4464 b->yy_buf_size += b->yy_buf_size / 8; in yy_get_next_buffer()
4466 b->yy_buf_size *= 2; in yy_get_next_buffer()
4468 b->yy_ch_buf = (char *) in yy_get_next_buffer()
4470 pcap_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); in yy_get_next_buffer()
4474 b->yy_ch_buf = NULL; in yy_get_next_buffer()
4476 if ( ! b->yy_ch_buf ) in yy_get_next_buffer()
4478 "fatal error - scanner input buffer overflow" ); in yy_get_next_buffer()
4480 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; in yy_get_next_buffer()
4482 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - in yy_get_next_buffer()
4483 number_to_move - 1; in yy_get_next_buffer()
4491 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), in yy_get_next_buffer()
4492 yyg->yy_n_chars, num_to_read ); in yy_get_next_buffer()
4494 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; in yy_get_next_buffer()
4497 if ( yyg->yy_n_chars == 0 ) in yy_get_next_buffer()
4508 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = in yy_get_next_buffer()
4516 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { in yy_get_next_buffer()
4518 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); in yy_get_next_buffer()
4519 …YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pcap_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_… in yy_get_next_buffer()
4520 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) in yy_get_next_buffer()
4524 yyg->yy_n_chars += number_to_move; in yy_get_next_buffer()
4525 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; in yy_get_next_buffer()
4526 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; in yy_get_next_buffer()
4528 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; in yy_get_next_buffer()
4533 /* yy_get_previous_state - get the state just before the EOB char was reached */
4541 yy_current_state = yyg->yy_start; in yy_get_previous_state()
4543 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) in yy_get_previous_state()
4548 yyg->yy_last_accepting_state = yy_current_state; in yy_get_previous_state()
4549 yyg->yy_last_accepting_cpos = yy_cp; in yy_get_previous_state()
4563 /* yy_try_NUL_trans - try to make a transition on the NUL character
4572 char *yy_cp = yyg->yy_c_buf_p; in yy_try_NUL_trans()
4577 yyg->yy_last_accepting_state = yy_current_state; in yy_try_NUL_trans()
4578 yyg->yy_last_accepting_cpos = yy_cp; in yy_try_NUL_trans()
4608 *yyg->yy_c_buf_p = yyg->yy_hold_char; in yyinput()
4610 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) in yyinput()
4616 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) in yyinput()
4618 *yyg->yy_c_buf_p = '\0'; in yyinput()
4622 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; in yyinput()
4623 ++yyg->yy_c_buf_p; in yyinput()
4648 if ( ! yyg->yy_did_buffer_switch_on_eof ) in yyinput()
4658 yyg->yy_c_buf_p = yyg->yytext_ptr + offset; in yyinput()
4664 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ in yyinput()
4665 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ in yyinput()
4666 yyg->yy_hold_char = *++yyg->yy_c_buf_p; in yyinput()
4674 * @param yyscanner The scanner object.
4693 * @param yyscanner The scanner object.
4711 *yyg->yy_c_buf_p = yyg->yy_hold_char; in pcap__switch_to_buffer()
4712 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; in pcap__switch_to_buffer()
4713 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; in pcap__switch_to_buffer()
4724 yyg->yy_did_buffer_switch_on_eof = 1; in pcap__switch_to_buffer()
4730 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; in pcap__load_buffer_state()
4731 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; in pcap__load_buffer_state()
4732 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; in pcap__load_buffer_state()
4733 yyg->yy_hold_char = *yyg->yy_c_buf_p; in pcap__load_buffer_state()
4739 * @param yyscanner The scanner object.
4750 b->yy_buf_size = (yy_size_t)size; in pcap__create_buffer()
4753 * we need to put in 2 end-of-buffer characters. in pcap__create_buffer()
4755 b->yy_ch_buf = (char *) pcap_alloc(b->yy_buf_size + 2 ,yyscanner ); in pcap__create_buffer()
4756 if ( ! b->yy_ch_buf ) in pcap__create_buffer()
4759 b->yy_is_our_buffer = 1; in pcap__create_buffer()
4768 * @param yyscanner The scanner object.
4780 if ( b->yy_is_our_buffer ) in pcap__delete_buffer()
4781 pcap_free((void *) b->yy_ch_buf ,yyscanner ); in pcap__delete_buffer()
4798 b->yy_input_file = file; in pcap__init_buffer()
4799 b->yy_fill_buffer = 1; in pcap__init_buffer()
4806 b->yy_bs_lineno = 1; in pcap__init_buffer()
4807 b->yy_bs_column = 0; in pcap__init_buffer()
4810 b->yy_is_interactive = 0; in pcap__init_buffer()
4817 * @param yyscanner The scanner object.
4825 b->yy_n_chars = 0; in pcap__flush_buffer()
4827 /* We always need two end-of-buffer characters. The first causes in pcap__flush_buffer()
4828 * a transition to the end-of-buffer state. The second causes in pcap__flush_buffer()
4831 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; in pcap__flush_buffer()
4832 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; in pcap__flush_buffer()
4834 b->yy_buf_pos = &b->yy_ch_buf[0]; in pcap__flush_buffer()
4836 b->yy_at_bol = 1; in pcap__flush_buffer()
4837 b->yy_buffer_status = YY_BUFFER_NEW; in pcap__flush_buffer()
4847 * @param yyscanner The scanner object.
4861 *yyg->yy_c_buf_p = yyg->yy_hold_char; in pcap_push_buffer_state()
4862 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; in pcap_push_buffer_state()
4863 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; in pcap_push_buffer_state()
4868 yyg->yy_buffer_stack_top++; in pcap_push_buffer_state()
4873 yyg->yy_did_buffer_switch_on_eof = 1; in pcap_push_buffer_state()
4878 * @param yyscanner The scanner object.
4888 if (yyg->yy_buffer_stack_top > 0) in pcap_pop_buffer_state()
4889 --yyg->yy_buffer_stack_top; in pcap_pop_buffer_state()
4893 yyg->yy_did_buffer_switch_on_eof = 1; in pcap_pop_buffer_state()
4905 if (!yyg->yy_buffer_stack) { in pcap_ensure_buffer_stack()
4908 * scanner will even need a stack. We use 2 instead of 1 to avoid an in pcap_ensure_buffer_stack()
4912 yyg->yy_buffer_stack = (struct yy_buffer_state**)pcap_alloc in pcap_ensure_buffer_stack()
4915 if ( ! yyg->yy_buffer_stack ) in pcap_ensure_buffer_stack()
4918 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); in pcap_ensure_buffer_stack()
4920 yyg->yy_buffer_stack_max = num_to_alloc; in pcap_ensure_buffer_stack()
4921 yyg->yy_buffer_stack_top = 0; in pcap_ensure_buffer_stack()
4925 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ in pcap_ensure_buffer_stack()
4930 num_to_alloc = yyg->yy_buffer_stack_max + grow_size; in pcap_ensure_buffer_stack()
4931 yyg->yy_buffer_stack = (struct yy_buffer_state**)pcap_realloc in pcap_ensure_buffer_stack()
4932 (yyg->yy_buffer_stack, in pcap_ensure_buffer_stack()
4935 if ( ! yyg->yy_buffer_stack ) in pcap_ensure_buffer_stack()
4939 …memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_sta… in pcap_ensure_buffer_stack()
4940 yyg->yy_buffer_stack_max = num_to_alloc; in pcap_ensure_buffer_stack()
4944 /** Setup the input buffer state to scan directly from a user-specified character buffer.
4947 * @param yyscanner The scanner object.
4955 base[size-2] != YY_END_OF_BUFFER_CHAR || in pcap__scan_buffer()
4956 base[size-1] != YY_END_OF_BUFFER_CHAR ) in pcap__scan_buffer()
4964 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ in pcap__scan_buffer()
4965 b->yy_buf_pos = b->yy_ch_buf = base; in pcap__scan_buffer()
4966 b->yy_is_our_buffer = 0; in pcap__scan_buffer()
4967 b->yy_input_file = NULL; in pcap__scan_buffer()
4968 b->yy_n_chars = b->yy_buf_size; in pcap__scan_buffer()
4969 b->yy_is_interactive = 0; in pcap__scan_buffer()
4970 b->yy_at_bol = 1; in pcap__scan_buffer()
4971 b->yy_fill_buffer = 0; in pcap__scan_buffer()
4972 b->yy_buffer_status = YY_BUFFER_NEW; in pcap__scan_buffer()
4981 * @param yystr a NUL-terminated string to scan
4982 * @param yyscanner The scanner object.
4997 * @param yyscanner The scanner object.
5025 b->yy_is_our_buffer = 1; in pcap__scan_bytes()
5051 yytext[yyleng] = yyg->yy_hold_char; \
5052 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
5053 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
5054 *yyg->yy_c_buf_p = '\0'; \
5061 /** Get the user-defined data for this scanner.
5062 * @param yyscanner The scanner object.
5071 * @param yyscanner The scanner object.
5084 * @param yyscanner The scanner object.
5097 * @param yyscanner The scanner object.
5106 * @param yyscanner The scanner object.
5115 * @param yyscanner The scanner object.
5124 * @param yyscanner The scanner object.
5133 /** Set the user-defined data. This data is never touched by the scanner.
5134 * @param user_defined The data to be associated with this scanner.
5135 * @param yyscanner The scanner object.
5145 * @param yyscanner The scanner object.
5160 * @param yyscanner The scanner object.
5176 * @param yyscanner The scanner object.
5217 /* User-visible API */
5219 /* pcap_lex_init is special because it creates the scanner itself, so it is
5220 * the ONLY reentrant function that doesn't take the scanner as the last argument.
5246 * convention of taking the scanner as the last argument. Note however, that
5247 * this is a *pointer* to a scanner, as it will be allocated by this call (and
5284 /* Initialization is the same as for the non-reentrant scanner. in yy_init_globals()
5288 yyg->yy_buffer_stack = NULL; in yy_init_globals()
5289 yyg->yy_buffer_stack_top = 0; in yy_init_globals()
5290 yyg->yy_buffer_stack_max = 0; in yy_init_globals()
5291 yyg->yy_c_buf_p = NULL; in yy_init_globals()
5292 yyg->yy_init = 0; in yy_init_globals()
5293 yyg->yy_start = 0; in yy_init_globals()
5295 yyg->yy_start_stack_ptr = 0; in yy_init_globals()
5296 yyg->yy_start_stack_depth = 0; in yy_init_globals()
5297 yyg->yy_start_stack = NULL; in yy_init_globals()
5314 /* pcap_lex_destroy is for both reentrant and non-reentrant scanners. */
5327 pcap_free(yyg->yy_buffer_stack ,yyscanner); in pcap_lex_destroy()
5328 yyg->yy_buffer_stack = NULL; in pcap_lex_destroy()
5331 pcap_free(yyg->yy_start_stack ,yyscanner ); in pcap_lex_destroy()
5332 yyg->yy_start_stack = NULL; in pcap_lex_destroy()
5334 /* Reset the globals. This is important in a non-reentrant scanner so the next time in pcap_lex_destroy()
5402 #line 490 "scanner.l"
5416 return c - '0'; in xdtoi()
5418 return c - 'a' + 10; in xdtoi()
5420 return c - 'A' + 10; in xdtoi()