aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/6lowpan.h
diff options
context:
space:
mode:
authorAlexander Aring <aar@pengutronix.de>2016-06-15 21:20:17 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-15 20:41:22 -0700
commit2ad3ed59198c5404c34515cfcfd9a2b3c54d964f (patch)
tree0dd9cbc8f4787819d70afd97ff91256f70d4ccc7 /include/net/6lowpan.h
parent6lowpan: add private neighbour data (diff)
downloadwireguard-linux-2ad3ed59198c5404c34515cfcfd9a2b3c54d964f.tar.xz
wireguard-linux-2ad3ed59198c5404c34515cfcfd9a2b3c54d964f.zip
6lowpan: add 802.15.4 short addr slaac
This patch adds the autoconfiguration if a valid 802.15.4 short address is available for 802.15.4 6LoWPAN interfaces. Cc: David S. Miller <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/6lowpan.h')
-rw-r--r--include/net/6lowpan.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/6lowpan.h b/include/net/6lowpan.h
index 2d9b9d39221e..5ab4c9901ccc 100644
--- a/include/net/6lowpan.h
+++ b/include/net/6lowpan.h
@@ -254,6 +254,12 @@ static inline bool lowpan_fetch_skb(struct sk_buff *skb, void *data,
return false;
}
+static inline bool lowpan_802154_is_valid_src_short_addr(__le16 addr)
+{
+ /* First bit of addr is multicast, reserved or 802.15.4 specific */
+ return !(addr & cpu_to_le16(0x8000));
+}
+
static inline void lowpan_push_hc_data(u8 **hc_ptr, const void *data,
const size_t len)
{