source: rtems-libbsd/freebsd/contrib/libpcap/scanner.h @ 97c5f8e8

55-freebsd-126-freebsd-12
Last change on this file since 97c5f8e8 was 97c5f8e8, checked in by Sebastian Huber <sebastian.huber@…>, on 10/09/17 at 07:59:36

Update libpcap to FreeBSD head 2017-04-04

Update libpcap from Git mirror commit
99a648a912e81e29d9c4c159cbbe263462f2d719 to
642b174daddbd0efd9bb5f242c43f4ab4db6869f.

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