diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skbuff.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 7beb239d2ee0..f085955cb5a7 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -892,6 +892,7 @@ static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) | |||
892 | /* | 892 | /* |
893 | * Add data to an sk_buff | 893 | * Add data to an sk_buff |
894 | */ | 894 | */ |
895 | extern unsigned char *skb_put(struct sk_buff *skb, unsigned int len); | ||
895 | static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) | 896 | static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) |
896 | { | 897 | { |
897 | unsigned char *tmp = skb_tail_pointer(skb); | 898 | unsigned char *tmp = skb_tail_pointer(skb); |
@@ -901,26 +902,6 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) | |||
901 | return tmp; | 902 | return tmp; |
902 | } | 903 | } |
903 | 904 | ||
904 | /** | ||
905 | * skb_put - add data to a buffer | ||
906 | * @skb: buffer to use | ||
907 | * @len: amount of data to add | ||
908 | * | ||
909 | * This function extends the used data area of the buffer. If this would | ||
910 | * exceed the total buffer size the kernel will panic. A pointer to the | ||
911 | * first byte of the extra data is returned. | ||
912 | */ | ||
913 | static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len) | ||
914 | { | ||
915 | unsigned char *tmp = skb_tail_pointer(skb); | ||
916 | SKB_LINEAR_ASSERT(skb); | ||
917 | skb->tail += len; | ||
918 | skb->len += len; | ||
919 | if (unlikely(skb->tail > skb->end)) | ||
920 | skb_over_panic(skb, len, current_text_addr()); | ||
921 | return tmp; | ||
922 | } | ||
923 | |||
924 | static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) | 905 | static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) |
925 | { | 906 | { |
926 | skb->data -= len; | 907 | skb->data -= len; |