patch-1.3.19 linux/include/linux/skbuff.h

Next file: linux/include/linux/tcp.h
Previous file: linux/include/linux/proc_fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.18/linux/include/linux/skbuff.h linux/include/linux/skbuff.h
@@ -133,7 +133,7 @@
 extern int			skb_device_locked(struct sk_buff *skb);
 extern unsigned char *		skb_put(struct sk_buff *skb, int len);
 extern unsigned char *		skb_push(struct sk_buff *skb, int len);
-extern int			skb_pull(struct sk_buff *skb, int len);
+extern unsigned char *		skb_pull(struct sk_buff *skb, int len);
 extern int			skb_headroom(struct sk_buff *skb);
 extern int			skb_tailroom(struct sk_buff *skb);
 extern void			skb_reserve(struct sk_buff *skb, int len);
@@ -324,13 +324,13 @@
 	return skb->data;
 }
 
-extern __inline__ int skb_pull(struct sk_buff *skb, int len)
+extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, int len)
 {
-	if(len>skb->len)
-		len=skb->len;
+	if(len > skb->len)
+		return NULL;
 	skb->data+=len;
 	skb->len-=len;
-	return len;
+	return skb->data;
 }
 
 extern __inline__ int skb_headroom(struct sk_buff *skb)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this