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