diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skbuff.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 1c19b2d55c2b..08c96bcbc59c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1507,6 +1507,20 @@ static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | |||
1507 | return buffer; | 1507 | return buffer; |
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | static inline void skb_copy_from_linear_data(const struct sk_buff *skb, | ||
1511 | void *to, | ||
1512 | const unsigned int len) | ||
1513 | { | ||
1514 | memcpy(to, skb->data, len); | ||
1515 | } | ||
1516 | |||
1517 | static inline void skb_copy_from_linear_data_offset(const struct sk_buff *skb, | ||
1518 | const int offset, void *to, | ||
1519 | const unsigned int len) | ||
1520 | { | ||
1521 | memcpy(to, skb->data + offset, len); | ||
1522 | } | ||
1523 | |||
1510 | extern void skb_init(void); | 1524 | extern void skb_init(void); |
1511 | 1525 | ||
1512 | /** | 1526 | /** |