]> Pileus Git - ~andy/linux/blobdiff - net/ieee802154/6lowpan.h
6lowpan: introduce lowpan_push_hc_data function
[~andy/linux] / net / ieee802154 / 6lowpan.h
index 10909e58bb6977e0d9d69338b1d52cd9cfac0300..4981bf859e5befaf7760dc951d2479a6e1d6177f 100644 (file)
@@ -298,6 +298,13 @@ static inline bool lowpan_fetch_skb(struct sk_buff *skb,
        return false;
 }
 
+static inline void lowpan_push_hc_data(u8 **hc_ptr, const void *data,
+                                      const size_t len)
+{
+       memcpy(*hc_ptr, data, len);
+       *hc_ptr += len;
+}
+
 typedef int (*skb_delivery_cb)(struct sk_buff *skb, struct net_device *dev);
 
 int lowpan_process_data(struct sk_buff *skb, struct net_device *dev,