blob: c50d2ba5caf004ea9b8a33a12d27fa859a4e4864 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __LINUX_TC_EM_META_H
2#define __LINUX_TC_EM_META_H
3
4#include <linux/pkt_cls.h>
5
6enum
7{
8 TCA_EM_META_UNSPEC,
9 TCA_EM_META_HDR,
10 TCA_EM_META_LVALUE,
11 TCA_EM_META_RVALUE,
12 __TCA_EM_META_MAX
13};
14#define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1)
15
16struct tcf_meta_val
17{
18 __u16 kind;
19 __u8 shift;
20 __u8 op;
21};
22
23#define TCF_META_TYPE_MASK (0xf << 12)
24#define TCF_META_TYPE(kind) (((kind) & TCF_META_TYPE_MASK) >> 12)
25#define TCF_META_ID_MASK 0x7ff
26#define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK)
27
28enum
29{
30 TCF_META_TYPE_VAR,
31 TCF_META_TYPE_INT,
32 __TCF_META_TYPE_MAX
33};
34#define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1)
35
36enum
37{
38 TCF_META_ID_VALUE,
39 TCF_META_ID_RANDOM,
40 TCF_META_ID_LOADAVG_0,
41 TCF_META_ID_LOADAVG_1,
42 TCF_META_ID_LOADAVG_2,
43 TCF_META_ID_DEV,
Linus Torvalds1da177e2005-04-16 15:20:36 -070044 TCF_META_ID_PRIORITY,
45 TCF_META_ID_PROTOCOL,
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 TCF_META_ID_PKTTYPE,
47 TCF_META_ID_PKTLEN,
48 TCF_META_ID_DATALEN,
49 TCF_META_ID_MACLEN,
50 TCF_META_ID_NFMARK,
51 TCF_META_ID_TCINDEX,
Linus Torvalds1da177e2005-04-16 15:20:36 -070052 TCF_META_ID_RTCLASSID,
53 TCF_META_ID_RTIIF,
Thomas Graf48900622005-06-08 15:10:48 -070054 TCF_META_ID_SK_FAMILY,
55 TCF_META_ID_SK_STATE,
56 TCF_META_ID_SK_REUSE,
57 TCF_META_ID_SK_BOUND_IF,
58 TCF_META_ID_SK_REFCNT,
59 TCF_META_ID_SK_SHUTDOWN,
60 TCF_META_ID_SK_PROTO,
61 TCF_META_ID_SK_TYPE,
62 TCF_META_ID_SK_RCVBUF,
63 TCF_META_ID_SK_RMEM_ALLOC,
64 TCF_META_ID_SK_WMEM_ALLOC,
65 TCF_META_ID_SK_OMEM_ALLOC,
66 TCF_META_ID_SK_WMEM_QUEUED,
67 TCF_META_ID_SK_RCV_QLEN,
68 TCF_META_ID_SK_SND_QLEN,
69 TCF_META_ID_SK_ERR_QLEN,
70 TCF_META_ID_SK_FORWARD_ALLOCS,
71 TCF_META_ID_SK_SNDBUF,
72 TCF_META_ID_SK_ALLOCS,
73 TCF_META_ID_SK_ROUTE_CAPS,
Eric Dumazet81c3d542005-10-03 14:13:38 -070074 TCF_META_ID_SK_HASH,
Thomas Graf48900622005-06-08 15:10:48 -070075 TCF_META_ID_SK_LINGERTIME,
76 TCF_META_ID_SK_ACK_BACKLOG,
77 TCF_META_ID_SK_MAX_ACK_BACKLOG,
78 TCF_META_ID_SK_PRIO,
79 TCF_META_ID_SK_RCVLOWAT,
80 TCF_META_ID_SK_RCVTIMEO,
81 TCF_META_ID_SK_SNDTIMEO,
82 TCF_META_ID_SK_SENDMSG_OFF,
83 TCF_META_ID_SK_WRITE_PENDING,
Stephen Hemminger3113e882008-02-05 03:20:13 -080084 TCF_META_ID_VLAN_TAG,
Linus Torvalds1da177e2005-04-16 15:20:36 -070085 __TCF_META_ID_MAX
86};
87#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
88
89struct tcf_meta_hdr
90{
91 struct tcf_meta_val left;
92 struct tcf_meta_val right;
93};
94
95#endif