diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-08-22 03:01:08 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:55:12 -0400 |
commit | 86872cb57925c46a6499887d77afb880a892c0ec (patch) | |
tree | bc0442efb85226adac5c7ae43e632639dd1b6899 /include/net/ip6_fib.h | |
parent | 40e22e8f3d4d4f1ff68fb03683f007c53ee8b348 (diff) |
[IPv6] route: FIB6 configuration using struct fib6_config
Replaces the struct in6_rtmsg based interface orignating from
the ioctl interface with a struct fib6_config based on. Allows
changing the interface without breaking the ioctl interface
and avoids passing on tons of parameters.
The recently introduced struct nl_info is used to pass on
netlink authorship information for notifications.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r-- | include/net/ip6_fib.h | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 69c444209781..9610b887ffb5 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -16,14 +16,35 @@ | |||
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | 17 | ||
18 | #include <linux/ipv6_route.h> | 18 | #include <linux/ipv6_route.h> |
19 | |||
20 | #include <net/dst.h> | ||
21 | #include <net/flow.h> | ||
22 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
23 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <net/dst.h> | ||
22 | #include <net/flow.h> | ||
23 | #include <net/netlink.h> | ||
24 | 24 | ||
25 | struct rt6_info; | 25 | struct rt6_info; |
26 | 26 | ||
27 | struct fib6_config | ||
28 | { | ||
29 | u32 fc_table; | ||
30 | u32 fc_metric; | ||
31 | int fc_dst_len; | ||
32 | int fc_src_len; | ||
33 | int fc_ifindex; | ||
34 | u32 fc_flags; | ||
35 | u32 fc_protocol; | ||
36 | |||
37 | struct in6_addr fc_dst; | ||
38 | struct in6_addr fc_src; | ||
39 | struct in6_addr fc_gateway; | ||
40 | |||
41 | unsigned long fc_expires; | ||
42 | struct nlattr *fc_mx; | ||
43 | int fc_mx_len; | ||
44 | |||
45 | struct nl_info fc_nlinfo; | ||
46 | }; | ||
47 | |||
27 | struct fib6_node | 48 | struct fib6_node |
28 | { | 49 | { |
29 | struct fib6_node *parent; | 50 | struct fib6_node *parent; |
@@ -175,18 +196,13 @@ extern void fib6_clean_all(int (*func)(struct rt6_info *, void *arg), | |||
175 | 196 | ||
176 | extern int fib6_add(struct fib6_node *root, | 197 | extern int fib6_add(struct fib6_node *root, |
177 | struct rt6_info *rt, | 198 | struct rt6_info *rt, |
178 | struct nlmsghdr *nlh, | 199 | struct nl_info *info); |
179 | void *rtattr, | ||
180 | struct netlink_skb_parms *req); | ||
181 | 200 | ||
182 | extern int fib6_del(struct rt6_info *rt, | 201 | extern int fib6_del(struct rt6_info *rt, |
183 | struct nlmsghdr *nlh, | 202 | struct nl_info *info); |
184 | void *rtattr, | ||
185 | struct netlink_skb_parms *req); | ||
186 | 203 | ||
187 | extern void inet6_rt_notify(int event, struct rt6_info *rt, | 204 | extern void inet6_rt_notify(int event, struct rt6_info *rt, |
188 | struct nlmsghdr *nlh, | 205 | struct nl_info *info); |
189 | struct netlink_skb_parms *req); | ||
190 | 206 | ||
191 | extern void fib6_run_gc(unsigned long dummy); | 207 | extern void fib6_run_gc(unsigned long dummy); |
192 | 208 | ||