Nftables  0.9
Nftables like the firewall for Linux but next generation
parser_bison.h
1 /* A Bison parser, made by GNU Bison 3.0.4. */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 
7  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.
11 
12  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.
16 
17  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.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 #ifndef YY_NFT_PARSER_BISON_H_INCLUDED
34 # define YY_NFT_PARSER_BISON_H_INCLUDED
35 /* Debug traces. */
36 #ifndef YYDEBUG
37 # define YYDEBUG 1
38 #endif
39 #if YYDEBUG
40 extern int nft_debug;
41 #endif
42 
43 /* Token type. */
44 #ifndef YYTOKENTYPE
45 # define YYTOKENTYPE
46  enum yytokentype
47  {
48  TOKEN_EOF = 0,
49  JUNK = 258,
50  NEWLINE = 259,
51  COLON = 260,
52  SEMICOLON = 261,
53  COMMA = 262,
54  DOT = 263,
55  EQ = 264,
56  NEQ = 265,
57  LT = 266,
58  GT = 267,
59  GTE = 268,
60  LTE = 269,
61  LSHIFT = 270,
62  RSHIFT = 271,
63  AMPERSAND = 272,
64  CARET = 273,
65  NOT = 274,
66  SLASH = 275,
67  ASTERISK = 276,
68  DASH = 277,
69  AT = 278,
70  VMAP = 279,
71  LOOKUP = 280,
72  INCLUDE = 281,
73  DEFINE = 282,
74  FIB = 283,
75  HOOK = 284,
76  DEVICE = 285,
77  TABLE = 286,
78  TABLES = 287,
79  CHAIN = 288,
80  CHAINS = 289,
81  RULE = 290,
82  RULES = 291,
83  SETS = 292,
84  SET = 293,
85  ELEMENT = 294,
86  MAP = 295,
87  MAPS = 296,
88  HANDLE = 297,
89  RULESET = 298,
90  TRACE = 299,
91  INET = 300,
92  NETDEV = 301,
93  ADD = 302,
94  UPDATE = 303,
95  REPLACE = 304,
96  CREATE = 305,
97  INSERT = 306,
98  DELETE = 307,
99  LIST = 308,
100  RESET = 309,
101  FLUSH = 310,
102  RENAME = 311,
103  DESCRIBE = 312,
104  EXPORT = 313,
105  MONITOR = 314,
106  ALL = 315,
107  ACCEPT = 316,
108  DROP = 317,
109  CONTINUE = 318,
110  JUMP = 319,
111  GOTO = 320,
112  RETURN = 321,
113  TO = 322,
114  CONSTANT = 323,
115  INTERVAL = 324,
116  TIMEOUT = 325,
117  GC_INTERVAL = 326,
118  ELEMENTS = 327,
119  POLICY = 328,
120  MEMORY = 329,
121  PERFORMANCE = 330,
122  SIZE = 331,
123  FLOW = 332,
124  NUM = 333,
125  STRING = 334,
126  QUOTED_STRING = 335,
127  ASTERISK_STRING = 336,
128  LL_HDR = 337,
129  NETWORK_HDR = 338,
130  TRANSPORT_HDR = 339,
131  BRIDGE = 340,
132  ETHER = 341,
133  SADDR = 342,
134  DADDR = 343,
135  TYPE = 344,
136  VLAN = 345,
137  ID = 346,
138  CFI = 347,
139  PCP = 348,
140  ARP = 349,
141  HTYPE = 350,
142  PTYPE = 351,
143  HLEN = 352,
144  PLEN = 353,
145  OPERATION = 354,
146  IP = 355,
147  HDRVERSION = 356,
148  HDRLENGTH = 357,
149  DSCP = 358,
150  ECN = 359,
151  LENGTH = 360,
152  FRAG_OFF = 361,
153  TTL = 362,
154  PROTOCOL = 363,
155  CHECKSUM = 364,
156  ICMP = 365,
157  CODE = 366,
158  SEQUENCE = 367,
159  GATEWAY = 368,
160  MTU = 369,
161  OPTIONS = 370,
162  IP6 = 371,
163  PRIORITY = 372,
164  FLOWLABEL = 373,
165  NEXTHDR = 374,
166  HOPLIMIT = 375,
167  ICMP6 = 376,
168  PPTR = 377,
169  MAXDELAY = 378,
170  AH = 379,
171  RESERVED = 380,
172  SPI = 381,
173  ESP = 382,
174  COMP = 383,
175  FLAGS = 384,
176  CPI = 385,
177  UDP = 386,
178  SPORT = 387,
179  DPORT = 388,
180  UDPLITE = 389,
181  CSUMCOV = 390,
182  TCP = 391,
183  ACKSEQ = 392,
184  DOFF = 393,
185  WINDOW = 394,
186  URGPTR = 395,
187  OPTION = 396,
188  ECHO = 397,
189  EOL = 398,
190  MAXSEG = 399,
191  NOOP = 400,
192  SACK = 401,
193  SACK0 = 402,
194  SACK1 = 403,
195  SACK2 = 404,
196  SACK3 = 405,
197  SACK_PERMITTED = 406,
198  TIMESTAMP = 407,
199  KIND = 408,
200  COUNT = 409,
201  LEFT = 410,
202  RIGHT = 411,
203  TSVAL = 412,
204  TSECR = 413,
205  DCCP = 414,
206  SCTP = 415,
207  VTAG = 416,
208  RT = 417,
209  RT0 = 418,
210  RT2 = 419,
211  SEG_LEFT = 420,
212  ADDR = 421,
213  HBH = 422,
214  FRAG = 423,
215  RESERVED2 = 424,
216  MORE_FRAGMENTS = 425,
217  DST = 426,
218  MH = 427,
219  META = 428,
220  MARK = 429,
221  IIF = 430,
222  IIFNAME = 431,
223  IIFTYPE = 432,
224  OIF = 433,
225  OIFNAME = 434,
226  OIFTYPE = 435,
227  SKUID = 436,
228  SKGID = 437,
229  NFTRACE = 438,
230  RTCLASSID = 439,
231  IBRIPORT = 440,
232  OBRIPORT = 441,
233  PKTTYPE = 442,
234  CPU = 443,
235  IIFGROUP = 444,
236  OIFGROUP = 445,
237  CGROUP = 446,
238  CLASSID = 447,
239  NEXTHOP = 448,
240  CT = 449,
241  L3PROTOCOL = 450,
242  PROTO_SRC = 451,
243  PROTO_DST = 452,
244  ZONE = 453,
245  COUNTER = 454,
246  NAME = 455,
247  PACKETS = 456,
248  BYTES = 457,
249  AVGPKT = 458,
250  COUNTERS = 459,
251  QUOTAS = 460,
252  LOG = 461,
253  PREFIX = 462,
254  GROUP = 463,
255  SNAPLEN = 464,
256  QUEUE_THRESHOLD = 465,
257  LEVEL = 466,
258  LIMIT = 467,
259  RATE = 468,
260  BURST = 469,
261  OVER = 470,
262  UNTIL = 471,
263  QUOTA = 472,
264  USED = 473,
265  NANOSECOND = 474,
266  MICROSECOND = 475,
267  MILLISECOND = 476,
268  SECOND = 477,
269  MINUTE = 478,
270  HOUR = 479,
271  DAY = 480,
272  WEEK = 481,
273  _REJECT = 482,
274  WITH = 483,
275  ICMPX = 484,
276  SNAT = 485,
277  DNAT = 486,
278  MASQUERADE = 487,
279  REDIRECT = 488,
280  RANDOM = 489,
281  FULLY_RANDOM = 490,
282  PERSISTENT = 491,
283  QUEUE = 492,
284  QUEUENUM = 493,
285  BYPASS = 494,
286  FANOUT = 495,
287  DUP = 496,
288  FWD = 497,
289  NUMGEN = 498,
290  INC = 499,
291  MOD = 500,
292  OFFSET = 501,
293  JHASH = 502,
294  SYMHASH = 503,
295  SEED = 504,
296  POSITION = 505,
297  COMMENT = 506,
298  XML = 507,
299  JSON = 508,
300  NOTRACK = 509,
301  EXISTS = 510,
302  MISSING = 511,
303  EXTHDR = 512
304  };
305 #endif
306 /* Tokens. */
307 #define TOKEN_EOF 0
308 #define JUNK 258
309 #define NEWLINE 259
310 #define COLON 260
311 #define SEMICOLON 261
312 #define COMMA 262
313 #define DOT 263
314 #define EQ 264
315 #define NEQ 265
316 #define LT 266
317 #define GT 267
318 #define GTE 268
319 #define LTE 269
320 #define LSHIFT 270
321 #define RSHIFT 271
322 #define AMPERSAND 272
323 #define CARET 273
324 #define NOT 274
325 #define SLASH 275
326 #define ASTERISK 276
327 #define DASH 277
328 #define AT 278
329 #define VMAP 279
330 #define LOOKUP 280
331 #define INCLUDE 281
332 #define DEFINE 282
333 #define FIB 283
334 #define HOOK 284
335 #define DEVICE 285
336 #define TABLE 286
337 #define TABLES 287
338 #define CHAIN 288
339 #define CHAINS 289
340 #define RULE 290
341 #define RULES 291
342 #define SETS 292
343 #define SET 293
344 #define ELEMENT 294
345 #define MAP 295
346 #define MAPS 296
347 #define HANDLE 297
348 #define RULESET 298
349 #define TRACE 299
350 #define INET 300
351 #define NETDEV 301
352 #define ADD 302
353 #define UPDATE 303
354 #define REPLACE 304
355 #define CREATE 305
356 #define INSERT 306
357 #define DELETE 307
358 #define LIST 308
359 #define RESET 309
360 #define FLUSH 310
361 #define RENAME 311
362 #define DESCRIBE 312
363 #define EXPORT 313
364 #define MONITOR 314
365 #define ALL 315
366 #define ACCEPT 316
367 #define DROP 317
368 #define CONTINUE 318
369 #define JUMP 319
370 #define GOTO 320
371 #define RETURN 321
372 #define TO 322
373 #define CONSTANT 323
374 #define INTERVAL 324
375 #define TIMEOUT 325
376 #define GC_INTERVAL 326
377 #define ELEMENTS 327
378 #define POLICY 328
379 #define MEMORY 329
380 #define PERFORMANCE 330
381 #define SIZE 331
382 #define FLOW 332
383 #define NUM 333
384 #define STRING 334
385 #define QUOTED_STRING 335
386 #define ASTERISK_STRING 336
387 #define LL_HDR 337
388 #define NETWORK_HDR 338
389 #define TRANSPORT_HDR 339
390 #define BRIDGE 340
391 #define ETHER 341
392 #define SADDR 342
393 #define DADDR 343
394 #define TYPE 344
395 #define VLAN 345
396 #define ID 346
397 #define CFI 347
398 #define PCP 348
399 #define ARP 349
400 #define HTYPE 350
401 #define PTYPE 351
402 #define HLEN 352
403 #define PLEN 353
404 #define OPERATION 354
405 #define IP 355
406 #define HDRVERSION 356
407 #define HDRLENGTH 357
408 #define DSCP 358
409 #define ECN 359
410 #define LENGTH 360
411 #define FRAG_OFF 361
412 #define TTL 362
413 #define PROTOCOL 363
414 #define CHECKSUM 364
415 #define ICMP 365
416 #define CODE 366
417 #define SEQUENCE 367
418 #define GATEWAY 368
419 #define MTU 369
420 #define OPTIONS 370
421 #define IP6 371
422 #define PRIORITY 372
423 #define FLOWLABEL 373
424 #define NEXTHDR 374
425 #define HOPLIMIT 375
426 #define ICMP6 376
427 #define PPTR 377
428 #define MAXDELAY 378
429 #define AH 379
430 #define RESERVED 380
431 #define SPI 381
432 #define ESP 382
433 #define COMP 383
434 #define FLAGS 384
435 #define CPI 385
436 #define UDP 386
437 #define SPORT 387
438 #define DPORT 388
439 #define UDPLITE 389
440 #define CSUMCOV 390
441 #define TCP 391
442 #define ACKSEQ 392
443 #define DOFF 393
444 #define WINDOW 394
445 #define URGPTR 395
446 #define OPTION 396
447 #define ECHO 397
448 #define EOL 398
449 #define MAXSEG 399
450 #define NOOP 400
451 #define SACK 401
452 #define SACK0 402
453 #define SACK1 403
454 #define SACK2 404
455 #define SACK3 405
456 #define SACK_PERMITTED 406
457 #define TIMESTAMP 407
458 #define KIND 408
459 #define COUNT 409
460 #define LEFT 410
461 #define RIGHT 411
462 #define TSVAL 412
463 #define TSECR 413
464 #define DCCP 414
465 #define SCTP 415
466 #define VTAG 416
467 #define RT 417
468 #define RT0 418
469 #define RT2 419
470 #define SEG_LEFT 420
471 #define ADDR 421
472 #define HBH 422
473 #define FRAG 423
474 #define RESERVED2 424
475 #define MORE_FRAGMENTS 425
476 #define DST 426
477 #define MH 427
478 #define META 428
479 #define MARK 429
480 #define IIF 430
481 #define IIFNAME 431
482 #define IIFTYPE 432
483 #define OIF 433
484 #define OIFNAME 434
485 #define OIFTYPE 435
486 #define SKUID 436
487 #define SKGID 437
488 #define NFTRACE 438
489 #define RTCLASSID 439
490 #define IBRIPORT 440
491 #define OBRIPORT 441
492 #define PKTTYPE 442
493 #define CPU 443
494 #define IIFGROUP 444
495 #define OIFGROUP 445
496 #define CGROUP 446
497 #define CLASSID 447
498 #define NEXTHOP 448
499 #define CT 449
500 #define L3PROTOCOL 450
501 #define PROTO_SRC 451
502 #define PROTO_DST 452
503 #define ZONE 453
504 #define COUNTER 454
505 #define NAME 455
506 #define PACKETS 456
507 #define BYTES 457
508 #define AVGPKT 458
509 #define COUNTERS 459
510 #define QUOTAS 460
511 #define LOG 461
512 #define PREFIX 462
513 #define GROUP 463
514 #define SNAPLEN 464
515 #define QUEUE_THRESHOLD 465
516 #define LEVEL 466
517 #define LIMIT 467
518 #define RATE 468
519 #define BURST 469
520 #define OVER 470
521 #define UNTIL 471
522 #define QUOTA 472
523 #define USED 473
524 #define NANOSECOND 474
525 #define MICROSECOND 475
526 #define MILLISECOND 476
527 #define SECOND 477
528 #define MINUTE 478
529 #define HOUR 479
530 #define DAY 480
531 #define WEEK 481
532 #define _REJECT 482
533 #define WITH 483
534 #define ICMPX 484
535 #define SNAT 485
536 #define DNAT 486
537 #define MASQUERADE 487
538 #define REDIRECT 488
539 #define RANDOM 489
540 #define FULLY_RANDOM 490
541 #define PERSISTENT 491
542 #define QUEUE 492
543 #define QUEUENUM 493
544 #define BYPASS 494
545 #define FANOUT 495
546 #define DUP 496
547 #define FWD 497
548 #define NUMGEN 498
549 #define INC 499
550 #define MOD 500
551 #define OFFSET 501
552 #define JHASH 502
553 #define SYMHASH 503
554 #define SEED 504
555 #define POSITION 505
556 #define COMMENT 506
557 #define XML 507
558 #define JSON 508
559 #define NOTRACK 509
560 #define EXISTS 510
561 #define MISSING 511
562 #define EXTHDR 512
563 
564 /* Value type. */
565 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
566 
567 union YYSTYPE
568 {
569 #line 128 "parser_bison.y" /* yacc.c:1909 */
570 
571  uint64_t val;
572  const char * string;
573 
574  struct list_head *list;
575  struct cmd *cmd;
576  struct handle handle;
577  struct table *table;
578  struct chain *chain;
579  struct rule *rule;
580  struct stmt *stmt;
581  struct expr *expr;
582  struct set *set;
583  struct obj *obj;
584  struct counter *counter;
585  struct quota *quota;
586  struct ct *ct;
587  const struct datatype *datatype;
588  struct handle_spec handle_spec;
589  struct position_spec position_spec;
590  const struct exthdr_desc *exthdr_desc;
591 
592 #line 593 "parser_bison.h" /* yacc.c:1909 */
593 };
594 
595 typedef union YYSTYPE YYSTYPE;
596 # define YYSTYPE_IS_TRIVIAL 1
597 # define YYSTYPE_IS_DECLARED 1
598 #endif
599 
600 /* Location type. */
601 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
602 typedef struct YYLTYPE YYLTYPE;
603 struct YYLTYPE
604 {
605  int first_line;
606  int first_column;
607  int last_line;
608  int last_column;
609 };
610 # define YYLTYPE_IS_DECLARED 1
611 # define YYLTYPE_IS_TRIVIAL 1
612 #endif
613 
614 
615 
616 int nft_parse (void *scanner, struct parser_state *state);
617 
618 #endif /* !YY_NFT_PARSER_BISON_H_INCLUDED */