From: Cong Wang Date: Mon, 11 Nov 2013 23:17:49 +0000 (-0800) Subject: fix linux/pkt_act.h inclusion X-Git-Tag: libnl3_2_24rc1~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ddecb36ca3f1d3d0b483e0f8dd724ce1af1b0d5;p=libnl 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 Signed-off-by: Thomas Graf --- diff --git a/include/Makefile.am b/include/Makefile.am index c6d3324..8cf5179 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -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 \ diff --git a/include/linux/pkt_act.h b/include/linux/tc_act/tc_mirred.h similarity index 67% rename from include/linux/pkt_act.h rename to include/linux/tc_act/tc_mirred.h index ba8c860..7561750 100644 --- a/include/linux/pkt_act.h +++ b/include/linux/tc_act/tc_mirred.h @@ -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 #include @@ -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 diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h index 99fea27..4d997cd 100644 --- a/include/netlink-private/types.h +++ b/include/netlink-private/types.h @@ -21,6 +21,7 @@ #include #include #include +#include #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; diff --git a/include/netlink/route/act/mirred.h b/include/netlink/route/act/mirred.h index 20a777c..0f9adf1 100644 --- a/include/netlink/route/act/mirred.h +++ b/include/netlink/route/act/mirred.h @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/netlink/route/action.h b/include/netlink/route/action.h index 8e265ea..be52767 100644 --- a/include/netlink/route/action.h +++ b/include/netlink/route/action.h @@ -16,7 +16,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" {