patch-pre2.0.12 linux/include/net/sock.h
Next file: linux/include/scsi/scsi.h
Previous file: linux/include/linux/optcd.h
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Tue Jun 4 16:53:05 1996
- Orig file:
pre2.0.11/linux/include/net/sock.h
- Orig date:
Sat Jun 1 20:11:36 1996
diff -u --recursive --new-file pre2.0.11/linux/include/net/sock.h linux/include/net/sock.h
@@ -501,6 +501,18 @@
return -ENOMEM;
atomic_add(skb->truesize, &sk->rmem_alloc);
skb->sk=sk;
+ skb_queue_tail(&sk->receive_queue,skb);
+ if (!sk->dead)
+ sk->data_ready(sk,skb->len);
+ return 0;
+}
+
+extern __inline__ int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+{
+ if (sk->rmem_alloc + skb->truesize >= sk->rcvbuf)
+ return -ENOMEM;
+ atomic_add(skb->truesize, &sk->rmem_alloc);
+ skb->sk=sk;
__skb_queue_tail(&sk->receive_queue,skb);
if (!sk->dead)
sk->data_ready(sk,skb->len);
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