
struct tc_action is confusing, currently we use it for two purposes: 1) Pass in arguments and carry out results from helper functions 2) A generic representation for tc actions The first one is error-prone, since we need to make sure we don't miss anything. This patch aims to get rid of this use, by moving tc_action into tcf_common, so that they are allocated together in hashtable and can be cast'ed easily. And together with the following patch, we could really make tc_action a generic representation for all tc actions and each type of action can inherit from it. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
19 lines
282 B
C
19 lines
282 B
C
#ifndef __NET_TC_NAT_H
|
|
#define __NET_TC_NAT_H
|
|
|
|
#include <linux/types.h>
|
|
#include <net/act_api.h>
|
|
|
|
struct tcf_nat {
|
|
struct tcf_common common;
|
|
|
|
__be32 old_addr;
|
|
__be32 new_addr;
|
|
__be32 mask;
|
|
u32 flags;
|
|
};
|
|
|
|
#define to_tcf_nat(a) ((struct tcf_nat *)a)
|
|
|
|
#endif /* __NET_TC_NAT_H */
|