aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2006-08-22 03:01:08 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:55:12 -0400
commit86872cb57925c46a6499887d77afb880a892c0ec (patch)
treebc0442efb85226adac5c7ae43e632639dd1b6899 /include
parent40e22e8f3d4d4f1ff68fb03683f007c53ee8b348 (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')
-rw-r--r--include/net/ip6_fib.h38
-rw-r--r--include/net/ip6_route.h6
2 files changed, 28 insertions, 16 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
25struct rt6_info; 25struct rt6_info;
26 26
27struct 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
27struct fib6_node 48struct 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
176extern int fib6_add(struct fib6_node *root, 197extern 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
182extern int fib6_del(struct rt6_info *rt, 201extern 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
187extern void inet6_rt_notify(int event, struct rt6_info *rt, 204extern 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
191extern void fib6_run_gc(unsigned long dummy); 207extern void fib6_run_gc(unsigned long dummy);
192 208
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 172c4761e2bf..3f170f667c7b 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -60,11 +60,7 @@ extern void ip6_route_cleanup(void);
60 60
61extern int ipv6_route_ioctl(unsigned int cmd, void __user *arg); 61extern int ipv6_route_ioctl(unsigned int cmd, void __user *arg);
62 62
63extern int ip6_route_add(struct in6_rtmsg *rtmsg, 63extern int ip6_route_add(struct fib6_config *cfg);
64 struct nlmsghdr *,
65 void *rtattr,
66 struct netlink_skb_parms *req,
67 u32 table_id);
68extern int ip6_ins_rt(struct rt6_info *); 64extern int ip6_ins_rt(struct rt6_info *);
69extern int ip6_del_rt(struct rt6_info *); 65extern int ip6_del_rt(struct rt6_info *);
70 66