xref: /linux/include/uapi/linux/tc_act/tc_mirred.h (revision 06d07429858317ded2db7986113a9e0129cd599b)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2611128ebSDavid Howells #ifndef __LINUX_TC_MIR_H
3611128ebSDavid Howells #define __LINUX_TC_MIR_H
4611128ebSDavid Howells 
5611128ebSDavid Howells #include <linux/types.h>
6611128ebSDavid Howells #include <linux/pkt_cls.h>
7611128ebSDavid Howells 
8611128ebSDavid Howells #define TCA_EGRESS_REDIR 1  /* packet redirect to EGRESS*/
9611128ebSDavid Howells #define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */
10611128ebSDavid Howells #define TCA_INGRESS_REDIR 3  /* packet redirect to INGRESS*/
11611128ebSDavid Howells #define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */
12611128ebSDavid Howells 
13611128ebSDavid Howells struct tc_mirred {
14611128ebSDavid Howells 	tc_gen;
15611128ebSDavid Howells 	int                     eaction;   /* one of IN/EGRESS_MIRROR/REDIR */
16611128ebSDavid Howells 	__u32                   ifindex;  /* ifindex of egress port */
17611128ebSDavid Howells };
18611128ebSDavid Howells 
19611128ebSDavid Howells enum {
20611128ebSDavid Howells 	TCA_MIRRED_UNSPEC,
21611128ebSDavid Howells 	TCA_MIRRED_TM,
22611128ebSDavid Howells 	TCA_MIRRED_PARMS,
239854518eSNicolas Dichtel 	TCA_MIRRED_PAD,
24*42f39036SVictor Nogueira 	TCA_MIRRED_BLOCKID,
25611128ebSDavid Howells 	__TCA_MIRRED_MAX
26611128ebSDavid Howells };
27611128ebSDavid Howells #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1)
28611128ebSDavid Howells 
29611128ebSDavid Howells #endif
30