aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 93e4db221585..16eef03ce0eb 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -14,7 +14,6 @@
14#ifndef _LINUX_SKBUFF_H 14#ifndef _LINUX_SKBUFF_H
15#define _LINUX_SKBUFF_H 15#define _LINUX_SKBUFF_H
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/compiler.h> 18#include <linux/compiler.h>
20#include <linux/time.h> 19#include <linux/time.h>
@@ -135,9 +134,10 @@ struct skb_frag_struct {
135struct skb_shared_info { 134struct skb_shared_info {
136 atomic_t dataref; 135 atomic_t dataref;
137 unsigned short nr_frags; 136 unsigned short nr_frags;
138 unsigned short tso_size; 137 unsigned short gso_size;
139 unsigned short tso_segs; 138 /* Warning: this field is not always filled in (UFO)! */
140 unsigned short ufo_size; 139 unsigned short gso_segs;
140 unsigned short gso_type;
141 unsigned int ip6_frag_id; 141 unsigned int ip6_frag_id;
142 struct sk_buff *frag_list; 142 struct sk_buff *frag_list;
143 skb_frag_t frags[MAX_SKB_FRAGS]; 143 skb_frag_t frags[MAX_SKB_FRAGS];
@@ -169,6 +169,11 @@ enum {
169 SKB_FCLONE_CLONE, 169 SKB_FCLONE_CLONE,
170}; 170};
171 171
172enum {
173 SKB_GSO_TCPV4 = 1 << 0,
174 SKB_GSO_UDPV4 = 1 << 1,
175};
176
172/** 177/**
173 * struct sk_buff - socket buffer 178 * struct sk_buff - socket buffer
174 * @next: Next buffer in list 179 * @next: Next buffer in list
@@ -210,6 +215,8 @@ enum {
210 * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c 215 * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
211 * @tc_index: Traffic control index 216 * @tc_index: Traffic control index
212 * @tc_verd: traffic control verdict 217 * @tc_verd: traffic control verdict
218 * @dma_cookie: a cookie to one of several possible DMA operations
219 * done by skb DMA functions
213 * @secmark: security marking 220 * @secmark: security marking
214 */ 221 */
215 222
@@ -346,7 +353,7 @@ extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
346extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, 353extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
347 int newheadroom, int newtailroom, 354 int newheadroom, int newtailroom,
348 gfp_t priority); 355 gfp_t priority);
349extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); 356extern int skb_pad(struct sk_buff *skb, int pad);
350#define dev_kfree_skb(a) kfree_skb(a) 357#define dev_kfree_skb(a) kfree_skb(a)
351extern void skb_over_panic(struct sk_buff *skb, int len, 358extern void skb_over_panic(struct sk_buff *skb, int len,
352 void *here); 359 void *here);
@@ -1123,16 +1130,15 @@ static inline int skb_cow(struct sk_buff *skb, unsigned int headroom)
1123 * 1130 *
1124 * Pads up a buffer to ensure the trailing bytes exist and are 1131 * Pads up a buffer to ensure the trailing bytes exist and are
1125 * blanked. If the buffer already contains sufficient data it 1132 * blanked. If the buffer already contains sufficient data it
1126 * is untouched. Returns the buffer, which may be a replacement 1133 * is untouched. Otherwise it is extended. Returns zero on
1127 * for the original, or NULL for out of memory - in which case 1134 * success. The skb is freed on error.
1128 * the original buffer is still freed.
1129 */ 1135 */
1130 1136
1131static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len) 1137static inline int skb_padto(struct sk_buff *skb, unsigned int len)
1132{ 1138{
1133 unsigned int size = skb->len; 1139 unsigned int size = skb->len;
1134 if (likely(size >= len)) 1140 if (likely(size >= len))
1135 return skb; 1141 return 0;
1136 return skb_pad(skb, len-size); 1142 return skb_pad(skb, len-size);
1137} 1143}
1138 1144
@@ -1293,6 +1299,7 @@ extern void skb_split(struct sk_buff *skb,
1293 struct sk_buff *skb1, const u32 len); 1299 struct sk_buff *skb1, const u32 len);
1294 1300
1295extern void skb_release_data(struct sk_buff *skb); 1301extern void skb_release_data(struct sk_buff *skb);
1302extern struct sk_buff *skb_segment(struct sk_buff *skb, int sg);
1296 1303
1297static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, 1304static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
1298 int len, void *buffer) 1305 int len, void *buffer)