Revert "Roll NDK to r11c and extract it into its own repository."
[android_tools.git] / ndk / platforms / android-16 / arch-arm / usr / include / linux / skbuff.h
blob82140a62517e15ddeea193f37b9927ee19e29c9a
1 /****************************************************************************
2 ****************************************************************************
3 ***
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.
9 ***
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>
23 #include <linux/mm.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
35 #define CHECKSUM_HW 1
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))
43 struct net_device;
45 struct sk_buff_head {
47 struct sk_buff *next;
48 struct sk_buff *prev;
50 __u32 qlen;
51 spinlock_t lock;
54 struct sk_buff;
56 #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
58 typedef struct skb_frag_struct skb_frag_t;
60 struct skb_frag_struct {
61 struct page *page;
62 __u16 page_offset;
63 __u16 size;
66 struct skb_shared_info {
67 atomic_t dataref;
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)
81 struct skb_timeval {
82 u32 off_sec;
83 u32 off_usec;
86 enum {
87 SKB_FCLONE_UNAVAILABLE,
88 SKB_FCLONE_ORIG,
89 SKB_FCLONE_CLONE,
92 enum {
93 SKB_GSO_TCPV4 = 1 << 0,
94 SKB_GSO_UDP = 1 << 1,
96 SKB_GSO_DODGY = 1 << 2,
98 SKB_GSO_TCP_ECN = 1 << 3,
100 SKB_GSO_TCPV6 = 1 << 4,
103 struct sk_buff {
105 struct sk_buff *next;
106 struct sk_buff *prev;
108 struct sock *sk;
109 struct skb_timeval tstamp;
110 struct net_device *dev;
111 struct net_device *input_dev;
113 union {
114 struct tcphdr *th;
115 struct udphdr *uh;
116 struct icmphdr *icmph;
117 struct igmphdr *igmph;
118 struct iphdr *ipiph;
119 struct ipv6hdr *ipv6h;
120 unsigned char *raw;
121 } h;
123 union {
124 struct iphdr *iph;
125 struct ipv6hdr *ipv6h;
126 struct arphdr *arph;
127 unsigned char *raw;
128 } nh;
130 union {
131 unsigned char *raw;
132 } mac;
134 struct dst_entry *dst;
135 struct sec_path *sp;
137 char cb[48];
139 unsigned int len,
140 data_len,
141 mac_len,
142 csum;
143 __u32 priority;
144 __u8 local_df:1,
145 cloned:1,
146 ip_summed:2,
147 nohdr:1,
148 nfctinfo:3;
149 __u8 pkt_type:3,
150 fclone:2,
151 ipvs_property:1;
152 __be16 protocol;
154 void (*destructor)(struct sk_buff *skb);
156 unsigned int truesize;
157 atomic_t users;
158 unsigned char *head,
159 *data,
160 *tail,
161 *end;
164 #endif