aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tc_act
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tc_act')
-rw-r--r--include/linux/tc_act/Kbuild7
-rw-r--r--include/linux/tc_act/tc_csum.h32
-rw-r--r--include/linux/tc_act/tc_gact.h32
-rw-r--r--include/linux/tc_act/tc_ipt.h20
-rw-r--r--include/linux/tc_act/tc_mirred.h27
-rw-r--r--include/linux/tc_act/tc_nat.h27
-rw-r--r--include/linux/tc_act/tc_pedit.h34
-rw-r--r--include/linux/tc_act/tc_skbedit.h46
8 files changed, 225 insertions, 0 deletions
diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild
new file mode 100644
index 00000000000..67b501c302b
--- /dev/null
+++ b/include/linux/tc_act/Kbuild
@@ -0,0 +1,7 @@
1header-y += tc_gact.h
2header-y += tc_ipt.h
3header-y += tc_mirred.h
4header-y += tc_pedit.h
5header-y += tc_nat.h
6header-y += tc_skbedit.h
7header-y += tc_csum.h
diff --git a/include/linux/tc_act/tc_csum.h b/include/linux/tc_act/tc_csum.h
new file mode 100644
index 00000000000..a047c49a315
--- /dev/null
+++ b/include/linux/tc_act/tc_csum.h
@@ -0,0 +1,32 @@
1#ifndef __LINUX_TC_CSUM_H
2#define __LINUX_TC_CSUM_H
3
4#include <linux/types.h>
5#include <linux/pkt_cls.h>
6
7#define TCA_ACT_CSUM 16
8
9enum {
10 TCA_CSUM_UNSPEC,
11 TCA_CSUM_PARMS,
12 TCA_CSUM_TM,
13 __TCA_CSUM_MAX
14};
15#define TCA_CSUM_MAX (__TCA_CSUM_MAX - 1)
16
17enum {
18 TCA_CSUM_UPDATE_FLAG_IPV4HDR = 1,
19 TCA_CSUM_UPDATE_FLAG_ICMP = 2,
20 TCA_CSUM_UPDATE_FLAG_IGMP = 4,
21 TCA_CSUM_UPDATE_FLAG_TCP = 8,
22 TCA_CSUM_UPDATE_FLAG_UDP = 16,
23 TCA_CSUM_UPDATE_FLAG_UDPLITE = 32
24};
25
26struct tc_csum {
27 tc_gen;
28
29 __u32 update_flags;
30};
31
32#endif /* __LINUX_TC_CSUM_H */
diff --git a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h
new file mode 100644
index 00000000000..f7bf94eed51
--- /dev/null
+++ b/include/linux/tc_act/tc_gact.h
@@ -0,0 +1,32 @@
1#ifndef __LINUX_TC_GACT_H
2#define __LINUX_TC_GACT_H
3
4#include <linux/types.h>
5#include <linux/pkt_cls.h>
6
7#define TCA_ACT_GACT 5
8struct tc_gact {
9 tc_gen;
10
11};
12
13struct tc_gact_p {
14#define PGACT_NONE 0
15#define PGACT_NETRAND 1
16#define PGACT_DETERM 2
17#define MAX_RAND (PGACT_DETERM + 1 )
18 __u16 ptype;
19 __u16 pval;
20 int paction;
21};
22
23enum {
24 TCA_GACT_UNSPEC,
25 TCA_GACT_TM,
26 TCA_GACT_PARMS,
27 TCA_GACT_PROB,
28 __TCA_GACT_MAX
29};
30#define TCA_GACT_MAX (__TCA_GACT_MAX - 1)
31
32#endif
diff --git a/include/linux/tc_act/tc_ipt.h b/include/linux/tc_act/tc_ipt.h
new file mode 100644
index 00000000000..a2335563d21
--- /dev/null
+++ b/include/linux/tc_act/tc_ipt.h
@@ -0,0 +1,20 @@
1#ifndef __LINUX_TC_IPT_H
2#define __LINUX_TC_IPT_H
3
4#include <linux/pkt_cls.h>
5
6#define TCA_ACT_IPT 6
7
8enum {
9 TCA_IPT_UNSPEC,
10 TCA_IPT_TABLE,
11 TCA_IPT_HOOK,
12 TCA_IPT_INDEX,
13 TCA_IPT_CNT,
14 TCA_IPT_TM,
15 TCA_IPT_TARG,
16 __TCA_IPT_MAX
17};
18#define TCA_IPT_MAX (__TCA_IPT_MAX - 1)
19
20#endif
diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h
new file mode 100644
index 00000000000..7561750e8fd
--- /dev/null
+++ b/include/linux/tc_act/tc_mirred.h
@@ -0,0 +1,27 @@
1#ifndef __LINUX_TC_MIR_H
2#define __LINUX_TC_MIR_H
3
4#include <linux/types.h>
5#include <linux/pkt_cls.h>
6
7#define TCA_ACT_MIRRED 8
8#define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/
9#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */
10#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/
11#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */
12
13struct tc_mirred {
14 tc_gen;
15 int eaction; /* one of IN/EGRESS_MIRROR/REDIR */
16 __u32 ifindex; /* ifindex of egress port */
17};
18
19enum {
20 TCA_MIRRED_UNSPEC,
21 TCA_MIRRED_TM,
22 TCA_MIRRED_PARMS,
23 __TCA_MIRRED_MAX
24};
25#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1)
26
27#endif
diff --git a/include/linux/tc_act/tc_nat.h b/include/linux/tc_act/tc_nat.h
new file mode 100644
index 00000000000..6663aeba0b9
--- /dev/null
+++ b/include/linux/tc_act/tc_nat.h
@@ -0,0 +1,27 @@
1#ifndef __LINUX_TC_NAT_H
2#define __LINUX_TC_NAT_H
3
4#include <linux/pkt_cls.h>
5#include <linux/types.h>
6
7#define TCA_ACT_NAT 9
8
9enum {
10 TCA_NAT_UNSPEC,
11 TCA_NAT_PARMS,
12 TCA_NAT_TM,
13 __TCA_NAT_MAX
14};
15#define TCA_NAT_MAX (__TCA_NAT_MAX - 1)
16
17#define TCA_NAT_FLAG_EGRESS 1
18
19struct tc_nat {
20 tc_gen;
21 __be32 old_addr;
22 __be32 new_addr;
23 __be32 mask;
24 __u32 flags;
25};
26
27#endif
diff --git a/include/linux/tc_act/tc_pedit.h b/include/linux/tc_act/tc_pedit.h
new file mode 100644
index 00000000000..716cfabcd5b
--- /dev/null
+++ b/include/linux/tc_act/tc_pedit.h
@@ -0,0 +1,34 @@
1#ifndef __LINUX_TC_PED_H
2#define __LINUX_TC_PED_H
3
4#include <linux/types.h>
5#include <linux/pkt_cls.h>
6
7#define TCA_ACT_PEDIT 7
8
9enum {
10 TCA_PEDIT_UNSPEC,
11 TCA_PEDIT_TM,
12 TCA_PEDIT_PARMS,
13 __TCA_PEDIT_MAX
14};
15#define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1)
16
17struct tc_pedit_key {
18 __u32 mask; /* AND */
19 __u32 val; /*XOR */
20 __u32 off; /*offset */
21 __u32 at;
22 __u32 offmask;
23 __u32 shift;
24};
25
26struct tc_pedit_sel {
27 tc_gen;
28 unsigned char nkeys;
29 unsigned char flags;
30 struct tc_pedit_key keys[0];
31};
32#define tc_pedit tc_pedit_sel
33
34#endif
diff --git a/include/linux/tc_act/tc_skbedit.h b/include/linux/tc_act/tc_skbedit.h
new file mode 100644
index 00000000000..7a2e910a5f0
--- /dev/null
+++ b/include/linux/tc_act/tc_skbedit.h
@@ -0,0 +1,46 @@
1/*
2 * Copyright (c) 2008, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Author: Alexander Duyck <alexander.h.duyck@intel.com>
18 */
19
20#ifndef __LINUX_TC_SKBEDIT_H
21#define __LINUX_TC_SKBEDIT_H
22
23#include <linux/pkt_cls.h>
24
25#define TCA_ACT_SKBEDIT 11
26
27#define SKBEDIT_F_PRIORITY 0x1
28#define SKBEDIT_F_QUEUE_MAPPING 0x2
29#define SKBEDIT_F_MARK 0x4
30
31struct tc_skbedit {
32 tc_gen;
33};
34
35enum {
36 TCA_SKBEDIT_UNSPEC,
37 TCA_SKBEDIT_TM,
38 TCA_SKBEDIT_PARMS,
39 TCA_SKBEDIT_PRIORITY,
40 TCA_SKBEDIT_QUEUE_MAPPING,
41 TCA_SKBEDIT_MARK,
42 __TCA_SKBEDIT_MAX
43};
44#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
45
46#endif