We should copy and use the kernel header linux/tc_act/tc_mirred.h.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
linux/netfilter/nfnetlink_queue.h \
linux/netlink.h \
linux/pkt_cls.h \
+ linux/tc_act/tc_mirred.h \
linux/pkt_sched.h \
linux/rtnetlink.h \
linux/snmp.h \
-#ifndef __LINUX_PKT_ACT_H
-#define __LINUX_PKT_ACT_H
+#ifndef __LINUX_TC_MIR_H
+#define __LINUX_TC_MIR_H
#include <linux/types.h>
#include <linux/pkt_cls.h>
#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */
#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/
#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */
-
+
struct tc_mirred {
tc_gen;
int eaction; /* one of IN/EGRESS_MIRROR/REDIR */
__u32 ifindex; /* ifindex of egress port */
};
-
+
enum {
TCA_MIRRED_UNSPEC,
TCA_MIRRED_TM,
__TCA_MIRRED_MAX
};
#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1)
-
-struct rtnl_mirred
-{
- struct tc_mirred m_parm;
-};
-
+
#endif
#include <netlink/idiag/idiagnl.h>
#include <netlink/netfilter/ct.h>
#include <netlink-private/route/tc-api.h>
+#include <linux/tc_act/tc_mirred.h>
#define NL_SOCK_BUFSIZE_SET (1<<0)
#define NL_SOCK_PASSCRED (1<<1)
struct rtnl_act * a_next;
};
+struct rtnl_mirred
+{
+ struct tc_mirred m_parm;
+};
+
struct rtnl_u32
{
uint32_t cu_divisor;
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/action.h>
+#include <linux/tc_act/tc_mirred.h>
#ifdef __cplusplus
extern "C" {
#include <netlink/cache.h>
#include <netlink/route/tc.h>
#include <netlink/utils.h>
-#include <linux/pkt_act.h>
#ifdef __cplusplus
extern "C" {