summaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@suse.com>2014-04-17 18:22:54 -0700
committerDavid S. Miller <davem@davemloft.net>2014-04-20 18:18:55 -0400
commit599018a71013386119c057a64183e49240c8b4e6 (patch)
tree2c4931261b8371407f66e8d48aac29f75aeca324 /include/net/net_namespace.h
parent8465a5fcd1ceba8f2b55121d47b73f4025401490 (diff)
downloadlinux-599018a71013386119c057a64183e49240c8b4e6.tar.gz
linux-599018a71013386119c057a64183e49240c8b4e6.tar.bz2
linux-599018a71013386119c057a64183e49240c8b4e6.zip
6lowpan: add helper to get 6lowpan namespace
This will simplify the new reassembly backport with no code changes being required. CC: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: linux-zigbee-devel@lists.sourceforge.net Cc: David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 5f9eb260990f..bc4118ede5b5 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -373,6 +373,21 @@ static inline void rt_genid_bump_ipv6(struct net *net)
}
#endif
+#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN)
+static inline struct netns_ieee802154_lowpan *
+net_ieee802154_lowpan(struct net *net)
+{
+ return &net->ieee802154_lowpan;
+}
+#else
+static inline struct netns_ieee802154_lowpan *
+net_ieee802154_lowpan(struct net *net)
+{
+ return NULL;
+}
+#endif
+
+
/* For callers who don't really care about whether it's IPv4 or IPv6 */
static inline void rt_genid_bump_all(struct net *net)
{