1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __LINUX_TC_PED_H
3 #define __LINUX_TC_PED_H
5 #include <linux/types.h>
6 #include <linux/pkt_cls.h>
8 #define TCA_ACT_PEDIT 7
20 #define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1)
23 TCA_PEDIT_KEY_EX_HTYPE
= 1,
24 TCA_PEDIT_KEY_EX_CMD
= 2,
25 __TCA_PEDIT_KEY_EX_MAX
27 #define TCA_PEDIT_KEY_EX_MAX (__TCA_PEDIT_KEY_EX_MAX - 1)
29 /* TCA_PEDIT_KEY_EX_HDR_TYPE_NETWROK is a special case for legacy users. It
30 * means no specific header type - offset is relative to the network layer
32 enum pedit_header_type
{
33 TCA_PEDIT_KEY_EX_HDR_TYPE_NETWORK
= 0,
34 TCA_PEDIT_KEY_EX_HDR_TYPE_ETH
= 1,
35 TCA_PEDIT_KEY_EX_HDR_TYPE_IP4
= 2,
36 TCA_PEDIT_KEY_EX_HDR_TYPE_IP6
= 3,
37 TCA_PEDIT_KEY_EX_HDR_TYPE_TCP
= 4,
38 TCA_PEDIT_KEY_EX_HDR_TYPE_UDP
= 5,
41 #define TCA_PEDIT_HDR_TYPE_MAX (__PEDIT_HDR_TYPE_MAX - 1)
44 TCA_PEDIT_KEY_EX_CMD_SET
= 0,
45 TCA_PEDIT_KEY_EX_CMD_ADD
= 1,
48 #define TCA_PEDIT_CMD_MAX (__PEDIT_CMD_MAX - 1)
53 __u32 off
; /*offset */
63 struct tc_pedit_key keys
[0];
65 #define tc_pedit tc_pedit_sel