aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-03-31 10:55:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:29 -0400
commit27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch)
treeb5a0c617cf8339524d3b1f1633e08eae7b94cf86 /include/linux
parent3dbad80ac7632f243b824d469301abb97ec634a1 (diff)
[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')
-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,
1521 memcpy(to, skb->data + offset, len); 1521 memcpy(to, skb->data + offset, len);
1522} 1522}
1523 1523
1524static inline void skb_copy_to_linear_data(struct sk_buff *skb,
1525 const void *from,
1526 const unsigned int len)
1527{
1528 memcpy(skb->data, from, len);
1529}
1530
1531static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb,
1532 const int offset,
1533 const void *from,
1534 const unsigned int len)
1535{
1536 memcpy(skb->data + offset, from, len);
1537}
1538
1524extern void skb_init(void); 1539extern void skb_init(void);
1525 1540
1526/** 1541/**