mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
6lowpan: introduce lowpan_push_hc_data function
This patch introduce the lowpan_push_hc_data function to set data in the iphc buffer. It's a common case to set data and increase the buffer pointer. This helper function can be used many times in header_compress function to generate the iphc header. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
787949039f
commit
3109f2e28b
1 changed files with 7 additions and 0 deletions
|
@ -298,6 +298,13 @@ static inline bool lowpan_fetch_skb(struct sk_buff *skb,
|
||||||
return false;
|
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);
|
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,
|
int lowpan_process_data(struct sk_buff *skb, struct net_device *dev,
|
||||||
|
|
Loading…
Reference in a new issue