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

Next file: linux/include/linux/socket.h
Previous file: linux/include/linux/net.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.12/linux/include/linux/skbuff.h linux/include/linux/skbuff.h
@@ -88,8 +88,8 @@
 
 	struct neighbour *nexthop;
 #endif		
-	unsigned long 	len;			/* Length of actual data			*/
-	unsigned long	csum;			/* Checksum 					*/
+	unsigned int 	len;			/* Length of actual data			*/
+	unsigned int	csum;			/* Checksum 					*/
 	__u32		saddr;			/* IP source address				*/
 	__u32		daddr;			/* IP target address				*/
 	__u32		raddr;			/* IP next hop address				*/
@@ -171,13 +171,13 @@
 extern void			skb_device_unlock(struct sk_buff *skb);
 extern void			dev_kfree_skb(struct sk_buff *skb, int mode);
 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 unsigned char *		skb_pull(struct sk_buff *skb, int len);
+extern unsigned char *		skb_put(struct sk_buff *skb, unsigned int len);
+extern unsigned char *		skb_push(struct sk_buff *skb, unsigned int len);
+extern unsigned char *		skb_pull(struct sk_buff *skb, unsigned 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);
-extern void 			skb_trim(struct sk_buff *skb, int len);
+extern void			skb_reserve(struct sk_buff *skb, unsigned int len);
+extern void 			skb_trim(struct sk_buff *skb, unsigned int len);
 
 extern __inline__ int skb_queue_empty(struct sk_buff_head *list)
 {
@@ -410,7 +410,7 @@
  *	Add data to an sk_buff
  */
  
-extern __inline__ unsigned char *skb_put(struct sk_buff *skb, int len)
+extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
 {
 	extern char *skb_put_errstr;
 	unsigned char *tmp=skb->tail;
@@ -425,7 +425,7 @@
 	return tmp;
 }
 
-extern __inline__ unsigned char *skb_push(struct sk_buff *skb, int len)
+extern __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
 {
 	extern char *skb_push_errstr;
 	skb->data-=len;
@@ -439,9 +439,9 @@
 	return skb->data;
 }
 
-extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, int len)
+extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
 {
-	if(len > skb->len)
+	if (len > skb->len)
 		return NULL;
 	skb->data+=len;
 	skb->len-=len;
@@ -458,18 +458,17 @@
 	return skb->end-skb->tail;
 }
 
-extern __inline__ void skb_reserve(struct sk_buff *skb, int len)
+extern __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
 {
 	skb->data+=len;
 	skb->tail+=len;
 }
 
-extern __inline__ void skb_trim(struct sk_buff *skb, int len)
+extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
 {
-	if(skb->len>len)
-	{
-		skb->len=len;
-		skb->tail=skb->data+len;
+	if (skb->len > len) {
+		skb->len = len;
+		skb->tail = skb->data+len;
 	}
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov