blob: 5dd671cf577655ebc0d9df669ce531b217090e42 [file] [log] [blame]
Christopher Ferris25981132017-11-14 16:53:49 -08001/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Ben Cheng30692c62013-10-15 18:26:18 -07002#ifndef __LINUX_TC_MIR_H
3#define __LINUX_TC_MIR_H
4
5#include <linux/types.h>
6#include <linux/pkt_cls.h>
7
8#define TCA_ACT_MIRRED 8
9#define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/
10#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */
11#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/
12#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */
Christopher Ferrisa1a109e2018-01-31 15:03:12 -080013
Ben Cheng30692c62013-10-15 18:26:18 -070014struct tc_mirred {
15 tc_gen;
16 int eaction; /* one of IN/EGRESS_MIRROR/REDIR */
17 __u32 ifindex; /* ifindex of egress port */
18};
Christopher Ferrisa1a109e2018-01-31 15:03:12 -080019
Ben Cheng30692c62013-10-15 18:26:18 -070020enum {
21 TCA_MIRRED_UNSPEC,
22 TCA_MIRRED_TM,
23 TCA_MIRRED_PARMS,
Christopher Ferrisccfaccd2016-08-24 12:11:31 -070024 TCA_MIRRED_PAD,
Ben Cheng30692c62013-10-15 18:26:18 -070025 __TCA_MIRRED_MAX
26};
27#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1)
Christopher Ferrisa1a109e2018-01-31 15:03:12 -080028
Ben Cheng30692c62013-10-15 18:26:18 -070029#endif