summaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-03-31 18:55:19 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 09:28:29 +0400
commit27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch)
treeb5a0c617cf8339524d3b1f1633e08eae7b94cf86 /include/linux/skbuff.h
parent3dbad80ac7632f243b824d469301abb97ec634a1 (diff)
downloadlinux-27d7ff46a3498d3debc6ba68fb8014c702b81170.tar.xz
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 08c96bcbc59c..92969f662ee4 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1521,6 +1521,21 @@ static inline void skb_copy_from_linear_data_offset(const struct sk_buff *skb,
memcpy(to, skb->data + offset, len);
}
+static inline void skb_copy_to_linear_data(struct sk_buff *skb,
+ const void *from,
+ const unsigned int len)
+{
+ memcpy(skb->data, from, len);
+}
+
+static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb,
+ const int offset,
+ const void *from,
+ const unsigned int len)
+{
+ memcpy(skb->data + offset, from, len);
+}
+
extern void skb_init(void);
/**