• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* A Bison parser, made by GNU Bison 3.5.1.  */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6    Inc.
7 
8    This program is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation, either version 3 of the License, or
11    (at your option) any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20 
21 /* As a special exception, you may create a larger work that contains
22    part or all of the Bison parser skeleton and distribute that work
23    under terms of your choice, so long as that work isn't itself a
24    parser generator using the skeleton or a modified version thereof
25    as a parser skeleton.  Alternatively, if you modify or redistribute
26    the parser skeleton itself, you may (at your option) remove this
27    special exception, which will cause the skeleton and the resulting
28    Bison output files to be licensed under the GNU General Public
29    License without this special exception.
30 
31    This special exception was added by the Free Software Foundation in
32    version 2.2 of Bison.  */
33 
34 /* Undocumented macros, especially those whose name start with YY_,
35    are private implementation details.  Do not rely on them.  */
36 
37 #ifndef YY_PCAP_GRAMMAR_H_INCLUDED
38 # define YY_PCAP_GRAMMAR_H_INCLUDED
39 /* Debug traces.  */
40 #ifndef YYDEBUG
41 # define YYDEBUG 0
42 #endif
43 #if YYDEBUG
44 extern int pcap_debug;
45 #endif
46 
47 /* Token type.  */
48 #ifndef YYTOKENTYPE
49 # define YYTOKENTYPE
50   enum yytokentype
51   {
52     DST = 258,
53     SRC = 259,
54     HOST = 260,
55     GATEWAY = 261,
56     NET = 262,
57     NETMASK = 263,
58     PORT = 264,
59     PORTRANGE = 265,
60     LESS = 266,
61     GREATER = 267,
62     PROTO = 268,
63     PROTOCHAIN = 269,
64     CBYTE = 270,
65     ARP = 271,
66     RARP = 272,
67     IP = 273,
68     SCTP = 274,
69     TCP = 275,
70     UDP = 276,
71     ICMP = 277,
72     IGMP = 278,
73     IGRP = 279,
74     PIM = 280,
75     VRRP = 281,
76     CARP = 282,
77     ATALK = 283,
78     AARP = 284,
79     DECNET = 285,
80     LAT = 286,
81     SCA = 287,
82     MOPRC = 288,
83     MOPDL = 289,
84     TK_BROADCAST = 290,
85     TK_MULTICAST = 291,
86     NUM = 292,
87     INBOUND = 293,
88     OUTBOUND = 294,
89     PF_IFNAME = 295,
90     PF_RSET = 296,
91     PF_RNR = 297,
92     PF_SRNR = 298,
93     PF_REASON = 299,
94     PF_ACTION = 300,
95     TYPE = 301,
96     SUBTYPE = 302,
97     DIR = 303,
98     ADDR1 = 304,
99     ADDR2 = 305,
100     ADDR3 = 306,
101     ADDR4 = 307,
102     RA = 308,
103     TA = 309,
104     LINK = 310,
105     GEQ = 311,
106     LEQ = 312,
107     NEQ = 313,
108     ID = 314,
109     EID = 315,
110     HID = 316,
111     HID6 = 317,
112     AID = 318,
113     LSH = 319,
114     RSH = 320,
115     LEN = 321,
116     IPV6 = 322,
117     ICMPV6 = 323,
118     AH = 324,
119     ESP = 325,
120     VLAN = 326,
121     MPLS = 327,
122     PPPOED = 328,
123     PPPOES = 329,
124     GENEVE = 330,
125     ISO = 331,
126     ESIS = 332,
127     CLNP = 333,
128     ISIS = 334,
129     L1 = 335,
130     L2 = 336,
131     IIH = 337,
132     LSP = 338,
133     SNP = 339,
134     CSNP = 340,
135     PSNP = 341,
136     STP = 342,
137     IPX = 343,
138     NETBEUI = 344,
139     LANE = 345,
140     LLC = 346,
141     METAC = 347,
142     BCC = 348,
143     SC = 349,
144     ILMIC = 350,
145     OAMF4EC = 351,
146     OAMF4SC = 352,
147     OAM = 353,
148     OAMF4 = 354,
149     CONNECTMSG = 355,
150     METACONNECT = 356,
151     VPI = 357,
152     VCI = 358,
153     RADIO = 359,
154     FISU = 360,
155     LSSU = 361,
156     MSU = 362,
157     HFISU = 363,
158     HLSSU = 364,
159     HMSU = 365,
160     SIO = 366,
161     OPC = 367,
162     DPC = 368,
163     SLS = 369,
164     HSIO = 370,
165     HOPC = 371,
166     HDPC = 372,
167     HSLS = 373,
168     LEX_ERROR = 374,
169     OR = 375,
170     AND = 376,
171     UMINUS = 377
172   };
173 #endif
174 /* Tokens.  */
175 #define DST 258
176 #define SRC 259
177 #define HOST 260
178 #define GATEWAY 261
179 #define NET 262
180 #define NETMASK 263
181 #define PORT 264
182 #define PORTRANGE 265
183 #define LESS 266
184 #define GREATER 267
185 #define PROTO 268
186 #define PROTOCHAIN 269
187 #define CBYTE 270
188 #define ARP 271
189 #define RARP 272
190 #define IP 273
191 #define SCTP 274
192 #define TCP 275
193 #define UDP 276
194 #define ICMP 277
195 #define IGMP 278
196 #define IGRP 279
197 #define PIM 280
198 #define VRRP 281
199 #define CARP 282
200 #define ATALK 283
201 #define AARP 284
202 #define DECNET 285
203 #define LAT 286
204 #define SCA 287
205 #define MOPRC 288
206 #define MOPDL 289
207 #define TK_BROADCAST 290
208 #define TK_MULTICAST 291
209 #define NUM 292
210 #define INBOUND 293
211 #define OUTBOUND 294
212 #define PF_IFNAME 295
213 #define PF_RSET 296
214 #define PF_RNR 297
215 #define PF_SRNR 298
216 #define PF_REASON 299
217 #define PF_ACTION 300
218 #define TYPE 301
219 #define SUBTYPE 302
220 #define DIR 303
221 #define ADDR1 304
222 #define ADDR2 305
223 #define ADDR3 306
224 #define ADDR4 307
225 #define RA 308
226 #define TA 309
227 #define LINK 310
228 #define GEQ 311
229 #define LEQ 312
230 #define NEQ 313
231 #define ID 314
232 #define EID 315
233 #define HID 316
234 #define HID6 317
235 #define AID 318
236 #define LSH 319
237 #define RSH 320
238 #define LEN 321
239 #define IPV6 322
240 #define ICMPV6 323
241 #define AH 324
242 #define ESP 325
243 #define VLAN 326
244 #define MPLS 327
245 #define PPPOED 328
246 #define PPPOES 329
247 #define GENEVE 330
248 #define ISO 331
249 #define ESIS 332
250 #define CLNP 333
251 #define ISIS 334
252 #define L1 335
253 #define L2 336
254 #define IIH 337
255 #define LSP 338
256 #define SNP 339
257 #define CSNP 340
258 #define PSNP 341
259 #define STP 342
260 #define IPX 343
261 #define NETBEUI 344
262 #define LANE 345
263 #define LLC 346
264 #define METAC 347
265 #define BCC 348
266 #define SC 349
267 #define ILMIC 350
268 #define OAMF4EC 351
269 #define OAMF4SC 352
270 #define OAM 353
271 #define OAMF4 354
272 #define CONNECTMSG 355
273 #define METACONNECT 356
274 #define VPI 357
275 #define VCI 358
276 #define RADIO 359
277 #define FISU 360
278 #define LSSU 361
279 #define MSU 362
280 #define HFISU 363
281 #define HLSSU 364
282 #define HMSU 365
283 #define SIO 366
284 #define OPC 367
285 #define DPC 368
286 #define SLS 369
287 #define HSIO 370
288 #define HOPC 371
289 #define HDPC 372
290 #define HSLS 373
291 #define LEX_ERROR 374
292 #define OR 375
293 #define AND 376
294 #define UMINUS 377
295 
296 /* Value type.  */
297 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
298 union YYSTYPE
299 {
300 #line 291 "grammar.y"
301 
302 	int i;
303 	bpf_u_int32 h;
304 	char *s;
305 	struct stmt *stmt;
306 	struct arth *a;
307 	struct {
308 		struct qual q;
309 		int atmfieldtype;
310 		int mtp3fieldtype;
311 		struct block *b;
312 	} blk;
313 	struct block *rblk;
314 
315 #line 316 "grammar.h"
316 
317 };
318 typedef union YYSTYPE YYSTYPE;
319 # define YYSTYPE_IS_TRIVIAL 1
320 # define YYSTYPE_IS_DECLARED 1
321 #endif
322 
323 
324 
325 int pcap_parse (void *yyscanner, compiler_state_t *cstate);
326 
327 #endif /* !YY_PCAP_GRAMMAR_H_INCLUDED  */
328