1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_SKBUFF_H
13 #define _LINUX_SKBUFF_H
15 #include <linux/kernel.h>
16 #include <linux/compiler.h>
17 #include <linux/time.h>
18 #include <linux/cache.h>
20 #include <asm/atomic.h>
21 #include <asm/types.h>
22 #include <linux/spinlock.h>
24 #include <linux/highmem.h>
25 #include <linux/poll.h>
26 #include <linux/net.h>
27 #include <linux/textsearch.h>
28 #include <net/checksum.h>
29 #include <linux/dmaengine.h>
31 #define HAVE_ALLOC_SKB
32 #define HAVE_ALIGNABLE_SKB
34 #define CHECKSUM_NONE 0
36 #define CHECKSUM_UNNECESSARY 2
38 #define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & ~(SMP_CACHE_BYTES - 1))
39 #define SKB_MAX_ORDER(X, ORDER) (((PAGE_SIZE << (ORDER)) - (X) - sizeof(struct skb_shared_info)) & ~(SMP_CACHE_BYTES - 1))
40 #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0))
41 #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2))
56 #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
58 typedef struct skb_frag_struct skb_frag_t
;
60 struct skb_frag_struct
{
66 struct skb_shared_info
{
68 unsigned short nr_frags
;
69 unsigned short gso_size
;
71 unsigned short gso_segs
;
72 unsigned short gso_type
;
73 unsigned int ip6_frag_id
;
74 struct sk_buff
*frag_list
;
75 skb_frag_t frags
[MAX_SKB_FRAGS
];
78 #define SKB_DATAREF_SHIFT 16
79 #define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1)
87 SKB_FCLONE_UNAVAILABLE
,
93 SKB_GSO_TCPV4
= 1 << 0,
96 SKB_GSO_DODGY
= 1 << 2,
98 SKB_GSO_TCP_ECN
= 1 << 3,
100 SKB_GSO_TCPV6
= 1 << 4,
105 struct sk_buff
*next
;
106 struct sk_buff
*prev
;
109 struct skb_timeval tstamp
;
110 struct net_device
*dev
;
111 struct net_device
*input_dev
;
116 struct icmphdr
*icmph
;
117 struct igmphdr
*igmph
;
119 struct ipv6hdr
*ipv6h
;
125 struct ipv6hdr
*ipv6h
;
134 struct dst_entry
*dst
;
154 void (*destructor
)(struct sk_buff
*skb
);
156 unsigned int truesize
;