mac80211: remove deprecated noise field from ieee80211_rx_status
[safe/jmp/linux-2.6] / include / net / ip6_route.h
index 9080076..68f6783 100644 (file)
@@ -37,11 +37,24 @@ struct route_info {
 #define RT6_LOOKUP_F_SRCPREF_PUBLIC    0x00000010
 #define RT6_LOOKUP_F_SRCPREF_COA       0x00000020
 
+/*
+ * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate
+ * between IPV6_ADDR_PREFERENCES socket option values
+ *     IPV6_PREFER_SRC_TMP    = 0x1
+ *     IPV6_PREFER_SRC_PUBLIC = 0x2
+ *     IPV6_PREFER_SRC_COA    = 0x4
+ * and above RT6_LOOKUP_F_SRCPREF_xxx flags.
+ */
+static inline int rt6_srcprefs2flags(unsigned int srcprefs)
+{
+       /* No need to bitmask because srcprefs have only 3 bits. */
+       return srcprefs << 3;
+}
 
-#ifdef CONFIG_IPV6_MULTIPLE_TABLES
-extern struct rt6_info *ip6_prohibit_entry;
-extern struct rt6_info *ip6_blk_hole_entry;
-#endif
+static inline unsigned int rt6_flags2srcprefs(int flags)
+{
+       return (flags >> 3) & 7;
+}
 
 extern void                    ip6_route_input(struct sk_buff *skb);
 
@@ -61,14 +74,14 @@ extern int                  ip6_ins_rt(struct rt6_info *);
 extern int                     ip6_del_rt(struct rt6_info *);
 
 extern struct rt6_info         *rt6_lookup(struct net *net,
-                                           struct in6_addr *daddr,
-                                           struct in6_addr *saddr,
+                                           const struct in6_addr *daddr,
+                                           const struct in6_addr *saddr,
                                            int oif, int flags);
 
 extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
                                         struct neighbour *neigh,
-                                        struct in6_addr *addr);
-extern int icmp6_dst_gc(int *more);
+                                        const struct in6_addr *addr);
+extern int icmp6_dst_gc(void);
 
 extern void fib6_force_start_gc(struct net *net);
 
@@ -108,17 +121,16 @@ extern void                       rt6_pmtu_discovery(struct in6_addr *daddr,
 
 struct netlink_callback;
 
-struct rt6_rtnl_dump_arg
-{
+struct rt6_rtnl_dump_arg {
        struct sk_buff *skb;
        struct netlink_callback *cb;
+       struct net *net;
 };
 
 extern int rt6_dump_route(struct rt6_info *rt, void *p_arg);
 extern void rt6_ifdown(struct net *net, struct net_device *dev);
 extern void rt6_mtu_change(struct net_device *dev, unsigned mtu);
 
-extern rwlock_t rt6_lock;
 
 /*
  *     Store a destination cache entry in a socket
@@ -147,7 +159,7 @@ static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
 
 static inline int ipv6_unicast_destination(struct sk_buff *skb)
 {
-       struct rt6_info *rt = (struct rt6_info *) skb->dst;
+       struct rt6_info *rt = (struct rt6_info *) skb_dst(skb);
 
        return rt->rt6i_flags & RTF_LOCAL;
 }