libnl: /data/src/libnl/lib/route/cls/ematch_syntax.h Source File

libnl 3.12.0

ematch_syntax.h
1/* A Bison parser, made by GNU Bison 3.8.2. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 <https://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/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35 especially those whose name start with YY_ or yy_. They are
36 private implementation details that can be changed or removed. */
37
38#ifndef YY_EMATCH_LIB_ROUTE_CLS_EMATCH_SYNTAX_H_INCLUDED
39# define YY_EMATCH_LIB_ROUTE_CLS_EMATCH_SYNTAX_H_INCLUDED
40/* Debug traces. */
41#ifndef YYDEBUG
42# define YYDEBUG 0
43#endif
44#if YYDEBUG
45extern int ematch_debug;
46#endif
47/* "%code requires" blocks. */
48#line 29 "lib/route/cls/ematch_syntax.y"
49
50
51 struct ematch_quoted {
52 char * data;
53 size_t len;
54 int index;
55};
56
57
58#line 59 "lib/route/cls/ematch_syntax.h"
59
60/* Token kinds. */
61#ifndef YYTOKENTYPE
62# define YYTOKENTYPE
63 enum yytokentype
64 {
65 YYEMPTY = -2,
66 YYEOF = 0, /* "end of file" */
67 YYerror = 256, /* error */
68 YYUNDEF = 257, /* "invalid token" */
69 ERROR = 258, /* ERROR */
70 LOGIC = 259, /* LOGIC */
71 NOT = 260, /* NOT */
72 OPERAND = 261, /* OPERAND */
73 NUMBER = 262, /* NUMBER */
74 ALIGN = 263, /* ALIGN */
75 LAYER = 264, /* LAYER */
76 KW_OPEN = 265, /* "(" */
77 KW_CLOSE = 266, /* ")" */
78 KW_PLUS = 267, /* "+" */
79 KW_MASK = 268, /* "mask" */
80 KW_SHIFT = 269, /* ">>" */
81 KW_AT = 270, /* "at" */
82 EMATCH_CMP = 271, /* "cmp" */
83 EMATCH_NBYTE = 272, /* "pattern" */
84 EMATCH_TEXT = 273, /* "text" */
85 EMATCH_META = 274, /* "meta" */
86 KW_EQ = 275, /* "=" */
87 KW_GT = 276, /* ">" */
88 KW_LT = 277, /* "<" */
89 KW_FROM = 278, /* "from" */
90 KW_TO = 279, /* "to" */
91 META_RANDOM = 280, /* "random" */
92 META_LOADAVG_0 = 281, /* "loadavg_0" */
93 META_LOADAVG_1 = 282, /* "loadavg_1" */
94 META_LOADAVG_2 = 283, /* "loadavg_2" */
95 META_DEV = 284, /* "dev" */
96 META_PRIO = 285, /* "prio" */
97 META_PROTO = 286, /* "proto" */
98 META_PKTTYPE = 287, /* "pkttype" */
99 META_PKTLEN = 288, /* "pktlen" */
100 META_DATALEN = 289, /* "datalen" */
101 META_MACLEN = 290, /* "maclen" */
102 META_MARK = 291, /* "mark" */
103 META_TCINDEX = 292, /* "tcindex" */
104 META_RTCLASSID = 293, /* "rtclassid" */
105 META_RTIIF = 294, /* "rtiif" */
106 META_SK_FAMILY = 295, /* "sk_family" */
107 META_SK_STATE = 296, /* "sk_state" */
108 META_SK_REUSE = 297, /* "sk_reuse" */
109 META_SK_REFCNT = 298, /* "sk_refcnt" */
110 META_SK_RCVBUF = 299, /* "sk_rcvbuf" */
111 META_SK_SNDBUF = 300, /* "sk_sndbuf" */
112 META_SK_SHUTDOWN = 301, /* "sk_shutdown" */
113 META_SK_PROTO = 302, /* "sk_proto" */
114 META_SK_TYPE = 303, /* "sk_type" */
115 META_SK_RMEM_ALLOC = 304, /* "sk_rmem_alloc" */
116 META_SK_WMEM_ALLOC = 305, /* "sk_wmem_alloc" */
117 META_SK_WMEM_QUEUED = 306, /* "sk_wmem_queued" */
118 META_SK_RCV_QLEN = 307, /* "sk_rcv_qlen" */
119 META_SK_SND_QLEN = 308, /* "sk_snd_qlen" */
120 META_SK_ERR_QLEN = 309, /* "sk_err_qlen" */
121 META_SK_FORWARD_ALLOCS = 310, /* "sk_forward_allocs" */
122 META_SK_ALLOCS = 311, /* "sk_allocs" */
123 META_SK_ROUTE_CAPS = 312, /* "sk_route_caps" */
124 META_SK_HASH = 313, /* "sk_hash" */
125 META_SK_LINGERTIME = 314, /* "sk_lingertime" */
126 META_SK_ACK_BACKLOG = 315, /* "sk_ack_backlog" */
127 META_SK_MAX_ACK_BACKLOG = 316, /* "sk_max_ack_backlog" */
128 META_SK_PRIO = 317, /* "sk_prio" */
129 META_SK_RCVLOWAT = 318, /* "sk_rcvlowat" */
130 META_SK_RCVTIMEO = 319, /* "sk_rcvtimeo" */
131 META_SK_SNDTIMEO = 320, /* "sk_sndtimeo" */
132 META_SK_SENDMSG_OFF = 321, /* "sk_sendmsg_off" */
133 META_SK_WRITE_PENDING = 322, /* "sk_write_pending" */
134 META_VLAN = 323, /* "vlan" */
135 META_RXHASH = 324, /* "rxhash" */
136 META_DEVNAME = 325, /* "devname" */
137 META_SK_BOUND_IF = 326, /* "sk_bound_if" */
138 STR = 327, /* STR */
139 QUOTED = 328 /* QUOTED */
140 };
141 typedef enum yytokentype yytoken_kind_t;
142#endif
143/* Token kinds. */
144#define YYEMPTY -2
145#define YYEOF 0
146#define YYerror 256
147#define YYUNDEF 257
148#define ERROR 258
149#define LOGIC 259
150#define NOT 260
151#define OPERAND 261
152#define NUMBER 262
153#define ALIGN 263
154#define LAYER 264
155#define KW_OPEN 265
156#define KW_CLOSE 266
157#define KW_PLUS 267
158#define KW_MASK 268
159#define KW_SHIFT 269
160#define KW_AT 270
161#define EMATCH_CMP 271
162#define EMATCH_NBYTE 272
163#define EMATCH_TEXT 273
164#define EMATCH_META 274
165#define KW_EQ 275
166#define KW_GT 276
167#define KW_LT 277
168#define KW_FROM 278
169#define KW_TO 279
170#define META_RANDOM 280
171#define META_LOADAVG_0 281
172#define META_LOADAVG_1 282
173#define META_LOADAVG_2 283
174#define META_DEV 284
175#define META_PRIO 285
176#define META_PROTO 286
177#define META_PKTTYPE 287
178#define META_PKTLEN 288
179#define META_DATALEN 289
180#define META_MACLEN 290
181#define META_MARK 291
182#define META_TCINDEX 292
183#define META_RTCLASSID 293
184#define META_RTIIF 294
185#define META_SK_FAMILY 295
186#define META_SK_STATE 296
187#define META_SK_REUSE 297
188#define META_SK_REFCNT 298
189#define META_SK_RCVBUF 299
190#define META_SK_SNDBUF 300
191#define META_SK_SHUTDOWN 301
192#define META_SK_PROTO 302
193#define META_SK_TYPE 303
194#define META_SK_RMEM_ALLOC 304
195#define META_SK_WMEM_ALLOC 305
196#define META_SK_WMEM_QUEUED 306
197#define META_SK_RCV_QLEN 307
198#define META_SK_SND_QLEN 308
199#define META_SK_ERR_QLEN 309
200#define META_SK_FORWARD_ALLOCS 310
201#define META_SK_ALLOCS 311
202#define META_SK_ROUTE_CAPS 312
203#define META_SK_HASH 313
204#define META_SK_LINGERTIME 314
205#define META_SK_ACK_BACKLOG 315
206#define META_SK_MAX_ACK_BACKLOG 316
207#define META_SK_PRIO 317
208#define META_SK_RCVLOWAT 318
209#define META_SK_RCVTIMEO 319
210#define META_SK_SNDTIMEO 320
211#define META_SK_SENDMSG_OFF 321
212#define META_SK_WRITE_PENDING 322
213#define META_VLAN 323
214#define META_RXHASH 324
215#define META_DEVNAME 325
216#define META_SK_BOUND_IF 326
217#define STR 327
218#define QUOTED 328
219
220/* Value type. */
221#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
222 union YYSTYPE
223{
224#line 48 "lib/route/cls/ematch_syntax.y"
225
226 struct tcf_em_cmp cmp;
227 struct ematch_quoted q;
228 struct rtnl_ematch * e;
229 struct rtnl_pktloc * loc;
230 struct rtnl_meta_value *mv;
231 uint32_t i;
232 uint64_t i64;
233 char * s;
234
235#line 236 "lib/route/cls/ematch_syntax.h"
236
237};
238typedef union YYSTYPE YYSTYPE;
239# define YYSTYPE_IS_TRIVIAL 1
240# define YYSTYPE_IS_DECLARED 1
241#endif
242
243
244
245
246int ematch_parse (void *scanner, char **errp, struct nl_list_head *root);
247
248
249#endif /* !YY_EMATCH_LIB_ROUTE_CLS_EMATCH_SYNTAX_H_INCLUDED */
ematch_quoted
Definition ematch_syntax.h:51
nl_list_head
Definition list.h:19
rtnl_meta_value
Definition meta.c:24
rtnl_pktloc
Definition pktloc.h:20
YYSTYPE
Definition ematch_syntax.h:223