patch-2.1.80 linux/include/linux/skbuff.h
Next file: linux/include/linux/slab.h
Previous file: linux/include/linux/sched.h
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Tue Jan 20 16:51:57 1998
- Orig file:
v2.1.79/linux/include/linux/skbuff.h
- Orig date:
Mon Jan 12 22:09:23 1998
diff -u --recursive --new-file v2.1.79/linux/include/linux/skbuff.h linux/include/linux/skbuff.h
@@ -78,7 +78,12 @@
} mac;
struct dst_entry *dst;
+
+#if (defined(__alpha__) || defined(__sparc64__)) && (defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE))
+ char cb[48]; /* sorry. 64bit pointers have a price */
+#else
char cb[32];
+#endif
__u32 seq; /* TCP sequence number */
__u32 end_seq; /* seq [+ fin] [+ syn] + datalen */
@@ -217,6 +222,14 @@
return list;
}
+extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
+{
+ struct sk_buff *list = ((struct sk_buff *)list_)->prev;
+ if (list == (struct sk_buff *)list_)
+ list = NULL;
+ return list;
+}
+
/*
* Return the length of an sk_buff queue
*/
@@ -406,6 +419,28 @@
__skb_unlink(skb, skb->list);
restore_flags(flags);
}
+
+/* XXX: more streamlined implementation */
+extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
+{
+ struct sk_buff *skb = skb_peek_tail(list);
+ if (skb)
+ __skb_unlink(skb, list);
+ return skb;
+}
+
+extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
+{
+ long flags;
+ struct sk_buff *result;
+
+ save_flags(flags);
+ cli();
+ result = __skb_dequeue_tail(list);
+ restore_flags(flags);
+ return result;
+}
+
extern const char skb_put_errstr[];
extern const char skb_push_errstr[];
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov