patch-1.3.21 linux/net/core/datagram.c

Next file: linux/net/core/iovec.c
Previous file: linux/net/core/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.20/linux/net/core/datagram.c linux/net/core/datagram.c
@@ -17,6 +17,7 @@
  *		Florian  La Roche:	Changed for my new skbuff handling.
  *		Darryl Miles	:	Fixed non-blocking SOCK_SEQPACKET.
  *		Linus Torvalds	:	BSD semantic fixes.
+ *		Alan Cox	:	Datagram iovec handling
  *
  *	Note:
  *		A lot of this will change when the protocol/socket separation
@@ -164,9 +165,23 @@
 	restore_flags(flags);
 }
 
+/*
+ *	Copy a datagram to a linear buffer.
+ */
+
 void skb_copy_datagram(struct sk_buff *skb, int offset, char *to, int size)
 {
 	memcpy_tofs(to,skb->h.raw+offset,size);
+}
+
+
+/*
+ *	Copy a datagram to an iovec.
+ */
+ 
+void skb_copy_datagram_iovec(struct sk_buff *skb, int offset, struct iovec *to, int size)
+{
+	memcpy_toiovec(to,skb->h.raw+offset,size);
 }
 
 /*

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