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