patch-2.1.79 linux/include/linux/skbuff.h
Next file: linux/include/linux/sunrpc/sched.h
Previous file: linux/include/linux/sdla_x25.h
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Mon Jan 12 16:43:19 1998
- Orig file:
v2.1.78/linux/include/linux/skbuff.h
- Orig date:
Mon Dec 1 12:04:15 1997
diff -u --recursive --new-file v2.1.78/linux/include/linux/skbuff.h linux/include/linux/skbuff.h
@@ -86,8 +86,7 @@
unsigned int len; /* Length of actual data */
unsigned int csum; /* Checksum */
- volatile char used, /* Are we in use ? */
- arp; /* Has IP/ARP resolution finished */
+ volatile char used;
unsigned char tries, /* Times tried */
inclone, /* Inline clone */
pkt_type, /* Packet class */
@@ -484,33 +483,6 @@
}
}
-/* dev_tint can lock buffer at any moment,
- * so that cli(), unlink it and sti(),
- * now it is safe.
- */
-
-extern __inline__ int skb_steal(struct sk_buff *skb)
-{
- unsigned long flags;
-
- save_flags(flags);
- cli();
- if (skb->next) {
- skb_unlink(skb);
- atomic_dec(&skb->users);
- }
- restore_flags(flags);
- return 1;
-}
-
-extern __inline__ void __skb_steal(struct sk_buff *skb)
-{
- if (skb->next) {
- skb_unlink(skb);
- atomic_dec(&skb->users);
- }
-}
-
extern __inline__ void skb_orphan(struct sk_buff *skb)
{
if (skb->destructor)
@@ -524,6 +496,16 @@
struct sk_buff *skb;
while ((skb=skb_dequeue(list))!=NULL)
kfree_skb(skb,0);
+}
+
+extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
+{
+ struct sk_buff *skb;
+
+ skb = alloc_skb(length+16, GFP_ATOMIC);
+ if (skb)
+ skb_reserve(skb,16);
+ return skb;
}
extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov