Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[linux-2.6-microblaze.git] / include / net / addrconf.h
index 378d601..5f43f7a 100644 (file)
@@ -59,6 +59,19 @@ struct in6_validator_info {
        struct netlink_ext_ack  *extack;
 };
 
+struct ifa6_config {
+       const struct in6_addr   *pfx;
+       unsigned int            plen;
+
+       const struct in6_addr   *peer_pfx;
+
+       u32                     rt_priority;
+       u32                     ifa_flags;
+       u32                     preferred_lft;
+       u32                     valid_lft;
+       u16                     scope;
+};
+
 int addrconf_init(void);
 void addrconf_cleanup(void);
 
@@ -223,6 +236,22 @@ struct ipv6_stub {
                                 const struct in6_addr *addr);
        int (*ipv6_dst_lookup)(struct net *net, struct sock *sk,
                               struct dst_entry **dst, struct flowi6 *fl6);
+
+       struct fib6_table *(*fib6_get_table)(struct net *net, u32 id);
+       struct fib6_info *(*fib6_lookup)(struct net *net, int oif,
+                                        struct flowi6 *fl6, int flags);
+       struct fib6_info *(*fib6_table_lookup)(struct net *net,
+                                             struct fib6_table *table,
+                                             int oif, struct flowi6 *fl6,
+                                             int flags);
+       struct fib6_info *(*fib6_multipath_select)(const struct net *net,
+                                                  struct fib6_info *f6i,
+                                                  struct flowi6 *fl6, int oif,
+                                                  const struct sk_buff *skb,
+                                                  int strict);
+       u32 (*ip6_mtu_from_fib6)(struct fib6_info *f6i, struct in6_addr *daddr,
+                                struct in6_addr *saddr);
+
        void (*udpv6_encap_enable)(void);
        void (*ndisc_send_na)(struct net_device *dev, const struct in6_addr *daddr,
                              const struct in6_addr *solicited_addr,
@@ -307,6 +336,20 @@ static inline struct inet6_dev *__in6_dev_get(const struct net_device *dev)
        return rcu_dereference_rtnl(dev->ip6_ptr);
 }
 
+/**
+ * __in6_dev_get_safely - get inet6_dev pointer from netdevice
+ * @dev: network device
+ *
+ * This is a safer version of __in6_dev_get
+ */
+static inline struct inet6_dev *__in6_dev_get_safely(const struct net_device *dev)
+{
+       if (likely(dev))
+               return rcu_dereference_rtnl(dev->ip6_ptr);
+       else
+               return NULL;
+}
+
 /**
  * in6_dev_get - get inet6_dev pointer from netdevice
  * @dev: network device