Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / include / linux / mroute6.h
index 2caa1a8e525d128cf7154411d12d6a42fd8660ca..6091ab77f3889c6a6db39d37be2298715324f597 100644 (file)
@@ -24,7 +24,8 @@
 #define MRT6_DEL_MFC   (MRT6_BASE+5)   /* Delete a multicast forwarding entry  */
 #define MRT6_VERSION   (MRT6_BASE+6)   /* Get the kernel multicast version     */
 #define MRT6_ASSERT    (MRT6_BASE+7)   /* Activate PIM assert mode             */
-#define MRT6_PIM       (MRT6_BASE+8)   /* enable PIM code      */
+#define MRT6_PIM       (MRT6_BASE+8)   /* enable PIM code                      */
+#define MRT6_TABLE     (MRT6_BASE+9)   /* Specify mroute table ID              */
 
 #define SIOCGETMIFCNT_IN6      SIOCPROTOPRIVATE        /* IP protocol privates */
 #define SIOCGETSGCNT_IN6       (SIOCPROTOPRIVATE+1)
@@ -182,10 +183,7 @@ struct mif_device {
 #define VIFF_STATIC 0x8000
 
 struct mfc6_cache {
-       struct mfc6_cache *next;                /* Next entry on cache line     */
-#ifdef CONFIG_NET_NS
-       struct net *mfc6_net;
-#endif
+       struct list_head list;
        struct in6_addr mf6c_mcastgrp;                  /* Group the entry belongs to   */
        struct in6_addr mf6c_origin;                    /* Source of packet             */
        mifi_t mf6c_parent;                     /* Source interface             */
@@ -208,18 +206,6 @@ struct mfc6_cache {
        } mfc_un;
 };
 
-static inline
-struct net *mfc6_net(const struct mfc6_cache *mfc)
-{
-       return read_pnet(&mfc->mfc6_net);
-}
-
-static inline
-void mfc6_net_set(struct mfc6_cache *mfc, struct net *net)
-{
-       write_pnet(&mfc->mfc6_net, hold_net(net));
-}
-
 #define MFC_STATIC             1
 #define MFC_NOTIFY             2
 
@@ -244,14 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
                           struct rtmsg *rtm, int nowait);
 
 #ifdef CONFIG_IPV6_MROUTE
-static inline struct sock *mroute6_socket(struct net *net)
-{
-       return net->ipv6.mroute6_sk;
-}
+extern struct sock *mroute6_socket(struct net *net, struct sk_buff *skb);
 extern int ip6mr_sk_done(struct sock *sk);
 #else
-static inline struct sock *mroute6_socket(struct net *net) { return NULL; }
-static inline int ip6mr_sk_done(struct sock *sk) { return 0; }
+static inline struct sock *mroute6_socket(struct net *net, struct sk_buff *skb)
+{
+       return NULL;
+}
+static inline int ip6mr_sk_done(struct sock *sk)
+{
+       return 0;
+}
 #endif
 #endif