]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/skbuff.h
net: Add skb_queue_is_last().
[linux-2.6-omap-h63xx.git] / include / linux / skbuff.h
index 4a144e8d0538bd036324a36741ed9c6d0852f2e5..3a5838da160ebe81fdc7f49a7f8617462426030b 100644 (file)
@@ -472,6 +472,19 @@ static inline int skb_queue_empty(const struct sk_buff_head *list)
        return list->next == (struct sk_buff *)list;
 }
 
+/**
+ *     skb_queue_is_last - check if skb is the last entry in the queue
+ *     @list: queue head
+ *     @skb: buffer
+ *
+ *     Returns true if @skb is the last buffer on the list.
+ */
+static inline bool skb_queue_is_last(const struct sk_buff_head *list,
+                                    const struct sk_buff *skb)
+{
+       return (skb->next == (struct sk_buff *) list);
+}
+
 /**
  *     skb_get - reference buffer
  *     @skb: buffer to reference