diff options
Diffstat (limited to 'include/net/fib_rules.h')
-rw-r--r-- | include/net/fib_rules.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index bc3c26494c3d..ed3a8872c6ca 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/netdevice.h> | 5 | #include <linux/netdevice.h> |
6 | #include <linux/fib_rules.h> | 6 | #include <linux/fib_rules.h> |
7 | #include <net/flow.h> | 7 | #include <net/flow.h> |
8 | #include <net/netlink.h> | 8 | #include <net/rtnetlink.h> |
9 | 9 | ||
10 | struct fib_rule | 10 | struct fib_rule |
11 | { | 11 | { |
@@ -19,6 +19,8 @@ struct fib_rule | |||
19 | u32 flags; | 19 | u32 flags; |
20 | u32 table; | 20 | u32 table; |
21 | u8 action; | 21 | u8 action; |
22 | u32 target; | ||
23 | struct fib_rule * ctarget; | ||
22 | struct rcu_head rcu; | 24 | struct rcu_head rcu; |
23 | }; | 25 | }; |
24 | 26 | ||
@@ -34,6 +36,9 @@ struct fib_rules_ops | |||
34 | int family; | 36 | int family; |
35 | struct list_head list; | 37 | struct list_head list; |
36 | int rule_size; | 38 | int rule_size; |
39 | int addr_size; | ||
40 | int unresolved_rules; | ||
41 | int nr_goto_rules; | ||
37 | 42 | ||
38 | int (*action)(struct fib_rule *, | 43 | int (*action)(struct fib_rule *, |
39 | struct flowi *, int, | 44 | struct flowi *, int, |
@@ -54,6 +59,10 @@ struct fib_rules_ops | |||
54 | u32 (*default_pref)(void); | 59 | u32 (*default_pref)(void); |
55 | size_t (*nlmsg_payload)(struct fib_rule *); | 60 | size_t (*nlmsg_payload)(struct fib_rule *); |
56 | 61 | ||
62 | /* Called after modifications to the rules set, must flush | ||
63 | * the route cache if one exists. */ | ||
64 | void (*flush_cache)(void); | ||
65 | |||
57 | int nlgroup; | 66 | int nlgroup; |
58 | struct nla_policy *policy; | 67 | struct nla_policy *policy; |
59 | struct list_head *rules_list; | 68 | struct list_head *rules_list; |
@@ -65,7 +74,8 @@ struct fib_rules_ops | |||
65 | [FRA_PRIORITY] = { .type = NLA_U32 }, \ | 74 | [FRA_PRIORITY] = { .type = NLA_U32 }, \ |
66 | [FRA_FWMARK] = { .type = NLA_U32 }, \ | 75 | [FRA_FWMARK] = { .type = NLA_U32 }, \ |
67 | [FRA_FWMASK] = { .type = NLA_U32 }, \ | 76 | [FRA_FWMASK] = { .type = NLA_U32 }, \ |
68 | [FRA_TABLE] = { .type = NLA_U32 } | 77 | [FRA_TABLE] = { .type = NLA_U32 }, \ |
78 | [FRA_GOTO] = { .type = NLA_U32 } | ||
69 | 79 | ||
70 | static inline void fib_rule_get(struct fib_rule *rule) | 80 | static inline void fib_rule_get(struct fib_rule *rule) |
71 | { | 81 | { |
@@ -97,11 +107,4 @@ extern int fib_rules_unregister(struct fib_rules_ops *); | |||
97 | extern int fib_rules_lookup(struct fib_rules_ops *, | 107 | extern int fib_rules_lookup(struct fib_rules_ops *, |
98 | struct flowi *, int flags, | 108 | struct flowi *, int flags, |
99 | struct fib_lookup_arg *); | 109 | struct fib_lookup_arg *); |
100 | |||
101 | extern int fib_nl_newrule(struct sk_buff *, | ||
102 | struct nlmsghdr *, void *); | ||
103 | extern int fib_nl_delrule(struct sk_buff *, | ||
104 | struct nlmsghdr *, void *); | ||
105 | extern int fib_rules_dump(struct sk_buff *, | ||
106 | struct netlink_callback *, int); | ||
107 | #endif | 110 | #endif |