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