diff options
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2725f4e5a9b..cf2cb50f77d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -250,6 +250,9 @@ typedef unsigned char *sk_buff_data_t; | |||
| 250 | * @tc_verd: traffic control verdict | 250 | * @tc_verd: traffic control verdict |
| 251 | * @ndisc_nodetype: router type (from link layer) | 251 | * @ndisc_nodetype: router type (from link layer) |
| 252 | * @do_not_encrypt: set to prevent encryption of this frame | 252 | * @do_not_encrypt: set to prevent encryption of this frame |
| 253 | * @requeue: set to indicate that the wireless core should attempt | ||
| 254 | * a software retry on this frame if we failed to | ||
| 255 | * receive an ACK for it | ||
| 253 | * @dma_cookie: a cookie to one of several possible DMA operations | 256 | * @dma_cookie: a cookie to one of several possible DMA operations |
| 254 | * done by skb DMA functions | 257 | * done by skb DMA functions |
| 255 | * @secmark: security marking | 258 | * @secmark: security marking |
| @@ -269,8 +272,9 @@ struct sk_buff { | |||
| 269 | struct dst_entry *dst; | 272 | struct dst_entry *dst; |
| 270 | struct rtable *rtable; | 273 | struct rtable *rtable; |
| 271 | }; | 274 | }; |
| 275 | #ifdef CONFIG_XFRM | ||
| 272 | struct sec_path *sp; | 276 | struct sec_path *sp; |
| 273 | 277 | #endif | |
| 274 | /* | 278 | /* |
| 275 | * This is the control buffer. It is free to use for every | 279 | * This is the control buffer. It is free to use for every |
| 276 | * layer. Please put your private variables there. If you | 280 | * layer. Please put your private variables there. If you |
| @@ -325,6 +329,7 @@ struct sk_buff { | |||
| 325 | #endif | 329 | #endif |
| 326 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) | 330 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) |
| 327 | __u8 do_not_encrypt:1; | 331 | __u8 do_not_encrypt:1; |
| 332 | __u8 requeue:1; | ||
| 328 | #endif | 333 | #endif |
| 329 | /* 0/13/14 bit hole */ | 334 | /* 0/13/14 bit hole */ |
| 330 | 335 | ||
| @@ -488,6 +493,19 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list, | |||
| 488 | } | 493 | } |
| 489 | 494 | ||
| 490 | /** | 495 | /** |
| 496 | * skb_queue_is_first - check if skb is the first entry in the queue | ||
| 497 | * @list: queue head | ||
| 498 | * @skb: buffer | ||
| 499 | * | ||
| 500 | * Returns true if @skb is the first buffer on the list. | ||
| 501 | */ | ||
| 502 | static inline bool skb_queue_is_first(const struct sk_buff_head *list, | ||
| 503 | const struct sk_buff *skb) | ||
| 504 | { | ||
| 505 | return (skb->prev == (struct sk_buff *) list); | ||
| 506 | } | ||
| 507 | |||
| 508 | /** | ||
| 491 | * skb_queue_next - return the next packet in the queue | 509 | * skb_queue_next - return the next packet in the queue |
| 492 | * @list: queue head | 510 | * @list: queue head |
| 493 | * @skb: current buffer | 511 | * @skb: current buffer |
| @@ -506,6 +524,24 @@ static inline struct sk_buff *skb_queue_next(const struct sk_buff_head *list, | |||
| 506 | } | 524 | } |
| 507 | 525 | ||
| 508 | /** | 526 | /** |
| 527 | * skb_queue_prev - return the prev packet in the queue | ||
| 528 | * @list: queue head | ||
| 529 | * @skb: current buffer | ||
| 530 | * | ||
| 531 | * Return the prev packet in @list before @skb. It is only valid to | ||
| 532 | * call this if skb_queue_is_first() evaluates to false. | ||
| 533 | */ | ||
| 534 | static inline struct sk_buff *skb_queue_prev(const struct sk_buff_head *list, | ||
| 535 | const struct sk_buff *skb) | ||
| 536 | { | ||
| 537 | /* This BUG_ON may seem severe, but if we just return then we | ||
| 538 | * are going to dereference garbage. | ||
| 539 | */ | ||
| 540 | BUG_ON(skb_queue_is_first(list, skb)); | ||
| 541 | return skb->prev; | ||
| 542 | } | ||
| 543 | |||
| 544 | /** | ||
| 509 | * skb_get - reference buffer | 545 | * skb_get - reference buffer |
| 510 | * @skb: buffer to reference | 546 | * @skb: buffer to reference |
| 511 | * | 547 | * |
| @@ -1647,8 +1683,12 @@ extern int skb_splice_bits(struct sk_buff *skb, | |||
| 1647 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); | 1683 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); |
| 1648 | extern void skb_split(struct sk_buff *skb, | 1684 | extern void skb_split(struct sk_buff *skb, |
| 1649 | struct sk_buff *skb1, const u32 len); | 1685 | struct sk_buff *skb1, const u32 len); |
| 1686 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | ||
| 1687 | int shiftlen); | ||
| 1650 | 1688 | ||
| 1651 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); | 1689 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); |
| 1690 | extern int skb_gro_receive(struct sk_buff **head, | ||
| 1691 | struct sk_buff *skb); | ||
| 1652 | 1692 | ||
| 1653 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1693 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
| 1654 | int len, void *buffer) | 1694 | int len, void *buffer) |
| @@ -1864,6 +1904,18 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu | |||
| 1864 | to->queue_mapping = from->queue_mapping; | 1904 | to->queue_mapping = from->queue_mapping; |
| 1865 | } | 1905 | } |
| 1866 | 1906 | ||
| 1907 | #ifdef CONFIG_XFRM | ||
| 1908 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | ||
| 1909 | { | ||
| 1910 | return skb->sp; | ||
| 1911 | } | ||
| 1912 | #else | ||
| 1913 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | ||
| 1914 | { | ||
| 1915 | return NULL; | ||
| 1916 | } | ||
| 1917 | #endif | ||
| 1918 | |||
| 1867 | static inline int skb_is_gso(const struct sk_buff *skb) | 1919 | static inline int skb_is_gso(const struct sk_buff *skb) |
| 1868 | { | 1920 | { |
| 1869 | return skb_shinfo(skb)->gso_size; | 1921 | return skb_shinfo(skb)->gso_size; |
