]> err.no Git - linux-2.6/blobdiff - include/net/addrconf.h
[NETFILTER]: nf_queue: move queueing related functions/struct to seperate header
[linux-2.6] / include / net / addrconf.h
index 44f1b673f916a094fb29508b66018c98eca364ab..c56827da0dee8f17fed08a023a236d11c21d15a2 100644 (file)
@@ -17,6 +17,7 @@
 
 #define IPV6_MAX_ADDRESSES             16
 
+#include <linux/in.h>
 #include <linux/in6.h>
 
 struct prefix_info {
@@ -35,9 +36,9 @@ struct prefix_info {
 #else
 #error "Please fix <asm/byteorder.h>"
 #endif
-       __u32                   valid;
-       __u32                   prefered;
-       __u32                   reserved2;
+       __be32                  valid;
+       __be32                  prefered;
+       __be32                  reserved2;
 
        struct in6_addr         prefix;
 };
@@ -61,7 +62,7 @@ extern int                    addrconf_set_dstaddr(void __user *arg);
 extern int                     ipv6_chk_addr(struct in6_addr *addr,
                                              struct net_device *dev,
                                              int strict);
-#ifdef CONFIG_IPV6_MIP6
+#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
 extern int                     ipv6_chk_home_addr(struct in6_addr *addr);
 #endif
 extern struct inet6_ifaddr *   ipv6_get_ifaddr(struct in6_addr *addr,
@@ -73,7 +74,9 @@ extern int                    ipv6_get_saddr(struct dst_entry *dst,
 extern int                     ipv6_dev_get_saddr(struct net_device *dev, 
                                               struct in6_addr *daddr,
                                               struct in6_addr *saddr);
-extern int                     ipv6_get_lladdr(struct net_device *dev, struct in6_addr *);
+extern int                     ipv6_get_lladdr(struct net_device *dev,
+                                               struct in6_addr *addr,
+                                               unsigned char banned_flags);
 extern int                     ipv6_rcv_saddr_equal(const struct sock *sk, 
                                                      const struct sock *sk2);
 extern void                    addrconf_join_solict(struct net_device *dev,
@@ -81,6 +84,14 @@ extern void                  addrconf_join_solict(struct net_device *dev,
 extern void                    addrconf_leave_solict(struct inet6_dev *idev,
                                        struct in6_addr *addr);
 
+/*
+ *     IPv6 Address Label subsystem (addrlabel.c)
+ */
+extern int                     ipv6_addr_label_init(void);
+extern void                    ipv6_addr_label_rtnl_register(void);
+extern u32                     ipv6_addr_label(const struct in6_addr *addr,
+                                               int type, int ifindex);
+
 /*
  *     multicast prototypes (mcast.c)
  */
@@ -183,7 +194,7 @@ static __inline__ u8 ipv6_addr_hash(const struct in6_addr *addr)
         * This will include the IEEE address token on links that support it.
         */
 
-       word = addr->s6_addr32[2] ^ addr->s6_addr32[3];
+       word = (__force u32)(addr->s6_addr32[2] ^ addr->s6_addr32[3]);
        word ^= (word >> 16);
        word ^= (word >> 8);
 
@@ -239,6 +250,24 @@ static inline int ipv6_addr_is_ll_all_routers(const struct in6_addr *addr)
                addr->s6_addr32[3] == htonl(0x00000002));
 }
 
+static inline int ipv6_isatap_eui64(u8 *eui, __be32 addr)
+{
+       eui[0] = (ZERONET(addr) || PRIVATE_10(addr) || LOOPBACK(addr) ||
+                 LINKLOCAL_169(addr) || PRIVATE_172(addr) || TEST_192(addr) ||
+                 ANYCAST_6TO4(addr) || PRIVATE_192(addr) || TEST_198(addr) ||
+                 MULTICAST(addr) || BADCLASS(addr)) ? 0x00 : 0x02;
+       eui[1] = 0;
+       eui[2] = 0x5E;
+       eui[3] = 0xFE;
+       memcpy (eui+4, &addr, 4);
+       return 0;
+}
+
+static inline int ipv6_addr_is_isatap(const struct in6_addr *addr)
+{
+       return ((addr->s6_addr32[2] | htonl(0x02000000)) == htonl(0x02005EFE));
+}
+
 #ifdef CONFIG_PROC_FS
 extern int if6_proc_init(void);
 extern void if6_proc_exit(void);