diff options
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r-- | include/net/ip6_route.h | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index f99e4f0f568f..9313491e3dad 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -30,60 +30,54 @@ struct route_info { | |||
30 | #include <linux/ip.h> | 30 | #include <linux/ip.h> |
31 | #include <linux/ipv6.h> | 31 | #include <linux/ipv6.h> |
32 | 32 | ||
33 | #define RT6_LOOKUP_F_IFACE 0x1 | 33 | #define RT6_LOOKUP_F_IFACE 0x00000001 |
34 | #define RT6_LOOKUP_F_REACHABLE 0x2 | 34 | #define RT6_LOOKUP_F_REACHABLE 0x00000002 |
35 | #define RT6_LOOKUP_F_HAS_SADDR 0x4 | 35 | #define RT6_LOOKUP_F_HAS_SADDR 0x00000004 |
36 | #define RT6_LOOKUP_F_SRCPREF_TMP 0x00000008 | ||
37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 | ||
38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | ||
36 | 39 | ||
37 | extern struct rt6_info ip6_null_entry; | ||
38 | 40 | ||
39 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 41 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
40 | extern struct rt6_info ip6_prohibit_entry; | 42 | extern struct rt6_info *ip6_prohibit_entry; |
41 | extern struct rt6_info ip6_blk_hole_entry; | 43 | extern struct rt6_info *ip6_blk_hole_entry; |
42 | #endif | 44 | #endif |
43 | 45 | ||
44 | extern void ip6_route_input(struct sk_buff *skb); | 46 | extern void ip6_route_input(struct sk_buff *skb); |
45 | 47 | ||
46 | extern struct dst_entry * ip6_route_output(struct sock *sk, | 48 | extern struct dst_entry * ip6_route_output(struct net *net, |
49 | struct sock *sk, | ||
47 | struct flowi *fl); | 50 | struct flowi *fl); |
48 | 51 | ||
49 | extern int ip6_route_init(void); | 52 | extern int ip6_route_init(void); |
50 | extern void ip6_route_cleanup(void); | 53 | extern void ip6_route_cleanup(void); |
51 | 54 | ||
52 | extern int ipv6_route_ioctl(unsigned int cmd, void __user *arg); | 55 | extern int ipv6_route_ioctl(struct net *net, |
56 | unsigned int cmd, | ||
57 | void __user *arg); | ||
53 | 58 | ||
54 | extern int ip6_route_add(struct fib6_config *cfg); | 59 | extern int ip6_route_add(struct fib6_config *cfg); |
55 | extern int ip6_ins_rt(struct rt6_info *); | 60 | extern int ip6_ins_rt(struct rt6_info *); |
56 | extern int ip6_del_rt(struct rt6_info *); | 61 | extern int ip6_del_rt(struct rt6_info *); |
57 | 62 | ||
58 | extern int ip6_rt_addr_add(struct in6_addr *addr, | 63 | extern struct rt6_info *rt6_lookup(struct net *net, |
59 | struct net_device *dev, | 64 | const struct in6_addr *daddr, |
60 | int anycast); | 65 | const struct in6_addr *saddr, |
61 | |||
62 | extern int ip6_rt_addr_del(struct in6_addr *addr, | ||
63 | struct net_device *dev); | ||
64 | |||
65 | extern void rt6_sndmsg(int type, struct in6_addr *dst, | ||
66 | struct in6_addr *src, | ||
67 | struct in6_addr *gw, | ||
68 | struct net_device *dev, | ||
69 | int dstlen, int srclen, | ||
70 | int metric, __u32 flags); | ||
71 | |||
72 | extern struct rt6_info *rt6_lookup(struct in6_addr *daddr, | ||
73 | struct in6_addr *saddr, | ||
74 | int oif, int flags); | 66 | int oif, int flags); |
75 | 67 | ||
76 | extern struct dst_entry *ndisc_dst_alloc(struct net_device *dev, | 68 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, |
77 | struct neighbour *neigh, | 69 | struct neighbour *neigh, |
78 | struct in6_addr *addr, | 70 | const struct in6_addr *addr); |
79 | int (*output)(struct sk_buff *)); | 71 | extern int icmp6_dst_gc(int *more); |
80 | extern int ndisc_dst_gc(int *more); | 72 | |
81 | extern void fib6_force_start_gc(void); | 73 | extern void fib6_force_start_gc(struct net *net); |
82 | 74 | ||
83 | extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | 75 | extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, |
84 | const struct in6_addr *addr, | 76 | const struct in6_addr *addr, |
85 | int anycast); | 77 | int anycast); |
86 | 78 | ||
79 | extern int ip6_dst_hoplimit(struct dst_entry *dst); | ||
80 | |||
87 | /* | 81 | /* |
88 | * support functions for ND | 82 | * support functions for ND |
89 | * | 83 | * |
@@ -94,7 +88,7 @@ extern struct rt6_info * rt6_add_dflt_router(struct in6_addr *gwaddr, | |||
94 | struct net_device *dev, | 88 | struct net_device *dev, |
95 | unsigned int pref); | 89 | unsigned int pref); |
96 | 90 | ||
97 | extern void rt6_purge_dflt_routers(void); | 91 | extern void rt6_purge_dflt_routers(struct net *net); |
98 | 92 | ||
99 | extern int rt6_route_rcv(struct net_device *dev, | 93 | extern int rt6_route_rcv(struct net_device *dev, |
100 | u8 *opt, int len, | 94 | u8 *opt, int len, |
@@ -121,7 +115,7 @@ struct rt6_rtnl_dump_arg | |||
121 | }; | 115 | }; |
122 | 116 | ||
123 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); | 117 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); |
124 | extern void rt6_ifdown(struct net_device *dev); | 118 | extern void rt6_ifdown(struct net *net, struct net_device *dev); |
125 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); | 119 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); |
126 | 120 | ||
127 | extern rwlock_t rt6_lock; | 121 | extern rwlock_t rt6_lock; |