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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 33370271b8b2..70a3f8d49118 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -481,6 +481,7 @@ struct sk_buff {
481 union { 481 union {
482 __u32 mark; 482 __u32 mark;
483 __u32 dropcount; 483 __u32 dropcount;
484 __u32 avail_size;
484 }; 485 };
485 486
486 sk_buff_data_t transport_header; 487 sk_buff_data_t transport_header;
@@ -1366,6 +1367,18 @@ static inline int skb_tailroom(const struct sk_buff *skb)
1366} 1367}
1367 1368
1368/** 1369/**
1370 * skb_availroom - bytes at buffer end
1371 * @skb: buffer to check
1372 *
1373 * Return the number of bytes of free space at the tail of an sk_buff
1374 * allocated by sk_stream_alloc()
1375 */
1376static inline int skb_availroom(const struct sk_buff *skb)
1377{
1378 return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len;
1379}
1380
1381/**
1369 * skb_reserve - adjust headroom 1382 * skb_reserve - adjust headroom
1370 * @skb: buffer to alter 1383 * @skb: buffer to alter
1371 * @len: bytes to move 1384 * @len: bytes to move