fix linux/pkt_act.h inclusion

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>
This commit is contained in:
Cong Wang 2013-11-11 15:17:49 -08:00 committed by Thomas Graf
parent 04040110cd
commit 3ddecb36ca
5 changed files with 13 additions and 11 deletions

View file

@ -130,6 +130,7 @@ noinst_HEADERS = \
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 \

View file

@ -1,5 +1,5 @@
#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>
@ -9,13 +9,13 @@
#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,
@ -23,10 +23,5 @@ enum {
__TCA_MIRRED_MAX
};
#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1)
struct rtnl_mirred
{
struct tc_mirred m_parm;
};
#endif

View file

@ -21,6 +21,7 @@
#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)
@ -514,6 +515,11 @@ struct rtnl_act
struct rtnl_act * a_next;
};
struct rtnl_mirred
{
struct tc_mirred m_parm;
};
struct rtnl_u32
{
uint32_t cu_divisor;

View file

@ -15,6 +15,7 @@
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/action.h>
#include <linux/tc_act/tc_mirred.h>
#ifdef __cplusplus
extern "C" {

View file

@ -16,7 +16,6 @@
#include <netlink/cache.h>
#include <netlink/route/tc.h>
#include <netlink/utils.h>
#include <linux/pkt_act.h>
#ifdef __cplusplus
extern "C" {