union {
__u32 mark;
__u32 dropcount;
+ __u32 avail_size;
};
sk_buff_data_t transport_header;
*/
#include <linux/slab.h>
-#include <asm/system.h>
/*
* skb might have a dst pointer attached, refcounted or not.
return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
}
+/**
+ * skb_availroom - bytes at buffer end
+ * @skb: buffer to check
+ *
+ * Return the number of bytes of free space at the tail of an sk_buff
+ * allocated by sk_stream_alloc()
+ */
+static inline int skb_availroom(const struct sk_buff *skb)
+{
+ return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len;
+}
+
/**
* skb_reserve - adjust headroom
* @skb: buffer to alter