blob: f4297c8a42fe4a500833fe13d5a89bdc3f677941 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __LINUX_PKT_CLS_H
2#define __LINUX_PKT_CLS_H
3
Jaswinder Singh Rajputed307442009-01-30 22:05:32 +05304#include <linux/types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <linux/pkt_sched.h>
6
Florian Westphalbd5850d2015-05-21 02:26:24 +02007#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -07008/* I think i could have done better macros ; for now this is stolen from
9 * some arch/mips code - jhs
10*/
11#define _TC_MAKE32(x) ((x))
12
13#define _TC_MAKEMASK1(n) (_TC_MAKE32(1) << _TC_MAKE32(n))
14#define _TC_MAKEMASK(v,n) (_TC_MAKE32((_TC_MAKE32(1)<<(v))-1) << _TC_MAKE32(n))
15#define _TC_MAKEVALUE(v,n) (_TC_MAKE32(v) << _TC_MAKE32(n))
16#define _TC_GETVALUE(v,n,m) ((_TC_MAKE32(v) & _TC_MAKE32(m)) >> _TC_MAKE32(n))
17
18/* verdict bit breakdown
19 *
20bit 0: when set -> this packet has been munged already
21
22bit 1: when set -> It is ok to munge this packet
23
24bit 2,3,4,5: Reclassify counter - sort of reverse TTL - if exceeded
25assume loop
26
27bit 6,7: Where this packet was last seen
280: Above the transmit example at the socket level
291: on the Ingress
302: on the Egress
31
32bit 8: when set --> Request not to classify on ingress.
33
34bits 9,10,11: redirect counter - redirect TTL. Loop avoidance
35
36 *
37 * */
38
Linus Torvalds1da177e2005-04-16 15:20:36 -070039#define S_TC_FROM _TC_MAKE32(6)
40#define M_TC_FROM _TC_MAKEMASK(2,S_TC_FROM)
41#define G_TC_FROM(x) _TC_GETVALUE(x,S_TC_FROM,M_TC_FROM)
42#define V_TC_FROM(x) _TC_MAKEVALUE(x,S_TC_FROM)
43#define SET_TC_FROM(v,n) ((V_TC_FROM(n)) | (v & ~M_TC_FROM))
44#define AT_STACK 0x0
45#define AT_INGRESS 0x1
46#define AT_EGRESS 0x2
47
48#define TC_NCLS _TC_MAKEMASK1(8)
49#define SET_TC_NCLS(v) ( TC_NCLS | (v & ~TC_NCLS))
50#define CLR_TC_NCLS(v) ( v & ~TC_NCLS)
51
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#define S_TC_AT _TC_MAKE32(12)
53#define M_TC_AT _TC_MAKEMASK(2,S_TC_AT)
54#define G_TC_AT(x) _TC_GETVALUE(x,S_TC_AT,M_TC_AT)
55#define V_TC_AT(x) _TC_MAKEVALUE(x,S_TC_AT)
56#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT))
57
Florian Westphalbd5850d2015-05-21 02:26:24 +020058#define MAX_REC_LOOP 4
59#define MAX_RED_LOOP 4
60#endif
61
Linus Torvalds1da177e2005-04-16 15:20:36 -070062/* Action attributes */
Eric Dumazetd94d9fe2009-11-04 09:50:58 -080063enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 TCA_ACT_UNSPEC,
65 TCA_ACT_KIND,
66 TCA_ACT_OPTIONS,
67 TCA_ACT_INDEX,
68 TCA_ACT_STATS,
Nicolas Dichtel98545182016-04-26 10:06:18 +020069 TCA_ACT_PAD,
Linus Torvalds1da177e2005-04-16 15:20:36 -070070 __TCA_ACT_MAX
71};
72
73#define TCA_ACT_MAX __TCA_ACT_MAX
74#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
75#define TCA_ACT_MAX_PRIO 32
76#define TCA_ACT_BIND 1
77#define TCA_ACT_NOBIND 0
78#define TCA_ACT_UNBIND 1
79#define TCA_ACT_NOUNBIND 0
80#define TCA_ACT_REPLACE 1
81#define TCA_ACT_NOREPLACE 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070082
83#define TC_ACT_UNSPEC (-1)
84#define TC_ACT_OK 0
85#define TC_ACT_RECLASSIFY 1
86#define TC_ACT_SHOT 2
87#define TC_ACT_PIPE 3
88#define TC_ACT_STOLEN 4
89#define TC_ACT_QUEUED 5
90#define TC_ACT_REPEAT 6
Alexei Starovoitov27b29f62015-09-15 23:05:43 -070091#define TC_ACT_REDIRECT 7
Linus Torvalds1da177e2005-04-16 15:20:36 -070092#define TC_ACT_JUMP 0x10000000
93
94/* Action type identifiers*/
Eric Dumazetd94d9fe2009-11-04 09:50:58 -080095enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -070096 TCA_ID_UNSPEC=0,
97 TCA_ID_POLICE=1,
98 /* other actions go here */
99 __TCA_ID_MAX=255
100};
101
102#define TCA_ID_MAX __TCA_ID_MAX
103
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800104struct tc_police {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105 __u32 index;
106 int action;
107#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
108#define TC_POLICE_OK TC_ACT_OK
109#define TC_POLICE_RECLASSIFY TC_ACT_RECLASSIFY
110#define TC_POLICE_SHOT TC_ACT_SHOT
111#define TC_POLICE_PIPE TC_ACT_PIPE
112
113 __u32 limit;
114 __u32 burst;
115 __u32 mtu;
116 struct tc_ratespec rate;
117 struct tc_ratespec peakrate;
118 int refcnt;
119 int bindcnt;
120 __u32 capab;
121};
122
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800123struct tcf_t {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124 __u64 install;
125 __u64 lastuse;
126 __u64 expires;
127};
128
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800129struct tc_cnt {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130 int refcnt;
131 int bindcnt;
132};
133
134#define tc_gen \
135 __u32 index; \
136 __u32 capab; \
137 int action; \
138 int refcnt; \
139 int bindcnt
140
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800141enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142 TCA_POLICE_UNSPEC,
143 TCA_POLICE_TBF,
144 TCA_POLICE_RATE,
145 TCA_POLICE_PEAKRATE,
146 TCA_POLICE_AVRATE,
147 TCA_POLICE_RESULT,
Jamal Hadi Salim3d3ed182016-05-23 21:07:20 -0400148 TCA_POLICE_TM,
149 TCA_POLICE_PAD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 __TCA_POLICE_MAX
151#define TCA_POLICE_RESULT TCA_POLICE_RESULT
152};
153
154#define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
155
Samudrala, Sridhar760edee2016-05-12 17:08:22 -0700156/* tca flags definitions */
157#define TCA_CLS_FLAGS_SKIP_HW (1 << 0)
Samudrala, Sridhard34e3e12016-05-12 17:08:23 -0700158#define TCA_CLS_FLAGS_SKIP_SW (1 << 1)
Samudrala, Sridhar760edee2016-05-12 17:08:22 -0700159
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160/* U32 filters */
161
162#define TC_U32_HTID(h) ((h)&0xFFF00000)
163#define TC_U32_USERHTID(h) (TC_U32_HTID(h)>>20)
164#define TC_U32_HASH(h) (((h)>>12)&0xFF)
165#define TC_U32_NODE(h) ((h)&0xFFF)
166#define TC_U32_KEY(h) ((h)&0xFFFFF)
167#define TC_U32_UNSPEC 0
168#define TC_U32_ROOT (0xFFF00000)
169
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800170enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171 TCA_U32_UNSPEC,
172 TCA_U32_CLASSID,
173 TCA_U32_HASH,
174 TCA_U32_LINK,
175 TCA_U32_DIVISOR,
176 TCA_U32_SEL,
177 TCA_U32_POLICE,
Jamal Hadi Salim3d3ed182016-05-23 21:07:20 -0400178 TCA_U32_ACT,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700179 TCA_U32_INDEV,
180 TCA_U32_PCNT,
181 TCA_U32_MARK,
John Fastabend9e8ce792016-02-26 07:54:39 -0800182 TCA_U32_FLAGS,
Nicolas Dichtel98545182016-04-26 10:06:18 +0200183 TCA_U32_PAD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700184 __TCA_U32_MAX
185};
186
187#define TCA_U32_MAX (__TCA_U32_MAX - 1)
188
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800189struct tc_u32_key {
Al Viro0382b9c2008-03-17 22:46:46 -0700190 __be32 mask;
191 __be32 val;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192 int off;
193 int offmask;
194};
195
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800196struct tc_u32_sel {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197 unsigned char flags;
198 unsigned char offshift;
199 unsigned char nkeys;
200
Al Viro0382b9c2008-03-17 22:46:46 -0700201 __be16 offmask;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202 __u16 off;
203 short offoff;
204
205 short hoff;
Al Viro0382b9c2008-03-17 22:46:46 -0700206 __be32 hmask;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207 struct tc_u32_key keys[0];
208};
209
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800210struct tc_u32_mark {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700211 __u32 val;
212 __u32 mask;
213 __u32 success;
214};
215
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800216struct tc_u32_pcnt {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217 __u64 rcnt;
218 __u64 rhit;
219 __u64 kcnts[0];
220};
221
222/* Flags */
223
224#define TC_U32_TERMINAL 1
225#define TC_U32_OFFSET 2
226#define TC_U32_VAROFFSET 4
227#define TC_U32_EAT 8
228
229#define TC_U32_MAXDEPTH 8
230
231
232/* RSVP filter */
233
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800234enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700235 TCA_RSVP_UNSPEC,
236 TCA_RSVP_CLASSID,
237 TCA_RSVP_DST,
238 TCA_RSVP_SRC,
239 TCA_RSVP_PINFO,
240 TCA_RSVP_POLICE,
241 TCA_RSVP_ACT,
242 __TCA_RSVP_MAX
243};
244
245#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
246
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800247struct tc_rsvp_gpi {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248 __u32 key;
249 __u32 mask;
250 int offset;
251};
252
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800253struct tc_rsvp_pinfo {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700254 struct tc_rsvp_gpi dpi;
255 struct tc_rsvp_gpi spi;
256 __u8 protocol;
257 __u8 tunnelid;
258 __u8 tunnelhdr;
Patrick McHardy8a470772005-06-28 12:56:45 -0700259 __u8 pad;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700260};
261
262/* ROUTE filter */
263
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800264enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265 TCA_ROUTE4_UNSPEC,
266 TCA_ROUTE4_CLASSID,
267 TCA_ROUTE4_TO,
268 TCA_ROUTE4_FROM,
269 TCA_ROUTE4_IIF,
270 TCA_ROUTE4_POLICE,
271 TCA_ROUTE4_ACT,
272 __TCA_ROUTE4_MAX
273};
274
275#define TCA_ROUTE4_MAX (__TCA_ROUTE4_MAX - 1)
276
277
278/* FW filter */
279
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800280enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281 TCA_FW_UNSPEC,
282 TCA_FW_CLASSID,
283 TCA_FW_POLICE,
284 TCA_FW_INDEV, /* used by CONFIG_NET_CLS_IND */
285 TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */
Patrick McHardyb4e9b522006-08-25 16:11:42 -0700286 TCA_FW_MASK,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700287 __TCA_FW_MAX
288};
289
290#define TCA_FW_MAX (__TCA_FW_MAX - 1)
291
292/* TC index filter */
293
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800294enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700295 TCA_TCINDEX_UNSPEC,
296 TCA_TCINDEX_HASH,
297 TCA_TCINDEX_MASK,
298 TCA_TCINDEX_SHIFT,
299 TCA_TCINDEX_FALL_THROUGH,
300 TCA_TCINDEX_CLASSID,
301 TCA_TCINDEX_POLICE,
302 TCA_TCINDEX_ACT,
303 __TCA_TCINDEX_MAX
304};
305
306#define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1)
307
Patrick McHardye5dfb812008-01-31 18:37:42 -0800308/* Flow filter */
309
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800310enum {
Patrick McHardye5dfb812008-01-31 18:37:42 -0800311 FLOW_KEY_SRC,
312 FLOW_KEY_DST,
313 FLOW_KEY_PROTO,
314 FLOW_KEY_PROTO_SRC,
315 FLOW_KEY_PROTO_DST,
316 FLOW_KEY_IIF,
317 FLOW_KEY_PRIORITY,
318 FLOW_KEY_MARK,
319 FLOW_KEY_NFCT,
320 FLOW_KEY_NFCT_SRC,
321 FLOW_KEY_NFCT_DST,
322 FLOW_KEY_NFCT_PROTO_SRC,
323 FLOW_KEY_NFCT_PROTO_DST,
324 FLOW_KEY_RTCLASSID,
325 FLOW_KEY_SKUID,
326 FLOW_KEY_SKGID,
Patrick McHardy9ec13812008-02-05 16:21:04 -0800327 FLOW_KEY_VLAN_TAG,
Changli Gao739a91e2010-08-21 06:23:15 +0000328 FLOW_KEY_RXHASH,
Patrick McHardye5dfb812008-01-31 18:37:42 -0800329 __FLOW_KEY_MAX,
330};
331
332#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1)
333
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800334enum {
Patrick McHardye5dfb812008-01-31 18:37:42 -0800335 FLOW_MODE_MAP,
336 FLOW_MODE_HASH,
337};
338
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800339enum {
Patrick McHardye5dfb812008-01-31 18:37:42 -0800340 TCA_FLOW_UNSPEC,
341 TCA_FLOW_KEYS,
342 TCA_FLOW_MODE,
343 TCA_FLOW_BASECLASS,
344 TCA_FLOW_RSHIFT,
345 TCA_FLOW_ADDEND,
346 TCA_FLOW_MASK,
347 TCA_FLOW_XOR,
348 TCA_FLOW_DIVISOR,
349 TCA_FLOW_ACT,
350 TCA_FLOW_POLICE,
351 TCA_FLOW_EMATCHES,
Patrick McHardy72d97942008-07-14 20:36:32 -0700352 TCA_FLOW_PERTURB,
Patrick McHardye5dfb812008-01-31 18:37:42 -0800353 __TCA_FLOW_MAX
354};
355
356#define TCA_FLOW_MAX (__TCA_FLOW_MAX - 1)
357
Linus Torvalds1da177e2005-04-16 15:20:36 -0700358/* Basic filter */
359
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800360enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700361 TCA_BASIC_UNSPEC,
362 TCA_BASIC_CLASSID,
363 TCA_BASIC_EMATCHES,
364 TCA_BASIC_ACT,
365 TCA_BASIC_POLICE,
366 __TCA_BASIC_MAX
367};
368
369#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1)
370
Thomas Graff4009232008-11-07 22:56:00 -0800371
372/* Cgroup classifier */
373
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800374enum {
Thomas Graff4009232008-11-07 22:56:00 -0800375 TCA_CGROUP_UNSPEC,
376 TCA_CGROUP_ACT,
377 TCA_CGROUP_POLICE,
378 TCA_CGROUP_EMATCHES,
379 __TCA_CGROUP_MAX,
380};
381
382#define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1)
383
Daniel Borkmann7d1d65c2013-10-28 16:43:02 +0100384/* BPF classifier */
385
Daniel Borkmann045efa82015-09-15 23:05:42 -0700386#define TCA_BPF_FLAG_ACT_DIRECT (1 << 0)
387
Daniel Borkmann7d1d65c2013-10-28 16:43:02 +0100388enum {
389 TCA_BPF_UNSPEC,
390 TCA_BPF_ACT,
391 TCA_BPF_POLICE,
392 TCA_BPF_CLASSID,
393 TCA_BPF_OPS_LEN,
394 TCA_BPF_OPS,
Daniel Borkmanne2e9b652015-03-01 12:31:48 +0100395 TCA_BPF_FD,
396 TCA_BPF_NAME,
Daniel Borkmann045efa82015-09-15 23:05:42 -0700397 TCA_BPF_FLAGS,
Daniel Borkmann7d1d65c2013-10-28 16:43:02 +0100398 __TCA_BPF_MAX,
399};
400
401#define TCA_BPF_MAX (__TCA_BPF_MAX - 1)
402
Jiri Pirko77b99002015-05-12 14:56:21 +0200403/* Flower classifier */
404
405enum {
406 TCA_FLOWER_UNSPEC,
407 TCA_FLOWER_CLASSID,
408 TCA_FLOWER_INDEV,
409 TCA_FLOWER_ACT,
410 TCA_FLOWER_KEY_ETH_DST, /* ETH_ALEN */
411 TCA_FLOWER_KEY_ETH_DST_MASK, /* ETH_ALEN */
412 TCA_FLOWER_KEY_ETH_SRC, /* ETH_ALEN */
413 TCA_FLOWER_KEY_ETH_SRC_MASK, /* ETH_ALEN */
414 TCA_FLOWER_KEY_ETH_TYPE, /* be16 */
415 TCA_FLOWER_KEY_IP_PROTO, /* u8 */
416 TCA_FLOWER_KEY_IPV4_SRC, /* be32 */
417 TCA_FLOWER_KEY_IPV4_SRC_MASK, /* be32 */
418 TCA_FLOWER_KEY_IPV4_DST, /* be32 */
419 TCA_FLOWER_KEY_IPV4_DST_MASK, /* be32 */
420 TCA_FLOWER_KEY_IPV6_SRC, /* struct in6_addr */
421 TCA_FLOWER_KEY_IPV6_SRC_MASK, /* struct in6_addr */
422 TCA_FLOWER_KEY_IPV6_DST, /* struct in6_addr */
423 TCA_FLOWER_KEY_IPV6_DST_MASK, /* struct in6_addr */
424 TCA_FLOWER_KEY_TCP_SRC, /* be16 */
425 TCA_FLOWER_KEY_TCP_DST, /* be16 */
426 TCA_FLOWER_KEY_UDP_SRC, /* be16 */
427 TCA_FLOWER_KEY_UDP_DST, /* be16 */
Amir Vadai5b33f482016-03-08 12:42:29 +0200428
429 TCA_FLOWER_FLAGS,
Jiri Pirko77b99002015-05-12 14:56:21 +0200430 __TCA_FLOWER_MAX,
431};
432
433#define TCA_FLOWER_MAX (__TCA_FLOWER_MAX - 1)
434
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435/* Extended Matches */
436
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800437struct tcf_ematch_tree_hdr {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438 __u16 nmatches;
439 __u16 progid;
440};
441
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800442enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443 TCA_EMATCH_TREE_UNSPEC,
444 TCA_EMATCH_TREE_HDR,
445 TCA_EMATCH_TREE_LIST,
446 __TCA_EMATCH_TREE_MAX
447};
448#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
449
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800450struct tcf_ematch_hdr {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451 __u16 matchid;
452 __u16 kind;
453 __u16 flags;
454 __u16 pad; /* currently unused */
455};
456
457/* 0 1
458 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
459 * +-----------------------+-+-+---+
460 * | Unused |S|I| R |
461 * +-----------------------+-+-+---+
462 *
463 * R(2) ::= relation to next ematch
464 * where: 0 0 END (last ematch)
465 * 0 1 AND
466 * 1 0 OR
467 * 1 1 Unused (invalid)
468 * I(1) ::= invert result
469 * S(1) ::= simple payload
470 */
471#define TCF_EM_REL_END 0
472#define TCF_EM_REL_AND (1<<0)
473#define TCF_EM_REL_OR (1<<1)
474#define TCF_EM_INVERT (1<<2)
475#define TCF_EM_SIMPLE (1<<3)
476
477#define TCF_EM_REL_MASK 3
478#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
479
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800480enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700481 TCF_LAYER_LINK,
482 TCF_LAYER_NETWORK,
483 TCF_LAYER_TRANSPORT,
484 __TCF_LAYER_MAX
485};
486#define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1)
487
488/* Ematch type assignments
489 * 1..32767 Reserved for ematches inside kernel tree
490 * 32768..65535 Free to use, not reliable
491 */
Patrick McHardydb3d99c2007-07-11 19:46:26 -0700492#define TCF_EM_CONTAINER 0
493#define TCF_EM_CMP 1
494#define TCF_EM_NBYTE 2
495#define TCF_EM_U32 3
496#define TCF_EM_META 4
497#define TCF_EM_TEXT 5
Rostislav Lisovyf057bbb2012-07-04 05:32:03 +0200498#define TCF_EM_VLAN 6
499#define TCF_EM_CANID 7
Florian Westphal6d4fa852012-07-11 10:56:57 +0000500#define TCF_EM_IPSET 8
501#define TCF_EM_MAX 8
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800503enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700504 TCF_EM_PROG_TC
505};
506
Eric Dumazetd94d9fe2009-11-04 09:50:58 -0800507enum {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700508 TCF_EM_OPND_EQ,
509 TCF_EM_OPND_GT,
510 TCF_EM_OPND_LT
511};
512
513#endif