Linus, could you please put skb_copy_datagram back in place? It's not used
anymore in the kernel, but the vmnet module (in vmware) still uses this
interface to skb_copy_datagram_iovec.

Patch for 2.6.11-rc2 follows. It compiles cleanly; I have not tested it yet,
but I assume it's okay. I'll test it right after sending this mail and report
back here if something goes wrong.

    Sytse

diff -ru a/include/linux/skbuff.h b/include/linux/skbuff.h
--- a/include/linux/skbuff.h    2005-01-25 01:27:00.000000000 +0100
+++ b/include/linux/skbuff.h    2005-01-25 01:31:20.000000000 +0100
@@ -1086,6 +1086,8 @@
                                         int noblock, int *err);
 extern unsigned int    datagram_poll(struct file *file, struct socket *sock,
                                     struct poll_table_struct *wait);
+extern int            skb_copy_datagram(const struct sk_buff *from,
+                                        int offset, char __user *to, int size);
 extern int            skb_copy_datagram_iovec(const struct sk_buff *from,
                                               int offset, struct iovec *to,
                                               int size);
diff -ru a/net/core/datagram.c b/net/core/datagram.c
--- a/net/core/datagram.c       2005-01-25 01:27:01.000000000 +0100
+++ b/net/core/datagram.c       2005-01-25 01:31:20.000000000 +0100
@@ -199,6 +199,19 @@
        kfree_skb(skb);
 }
 
+/*
+ *     Copy a datagram to a linear buffer.
+ */
+int skb_copy_datagram(const struct sk_buff *skb, int offset, char __user *to, 
int size)
+{
+       struct iovec iov = {
+               .iov_base = to,
+               .iov_len =size,
+       };
+
+       return skb_copy_datagram_iovec(skb, offset, &iov, size);
+}
+
 /**
  *     skb_copy_datagram_iovec - Copy a datagram to an iovec.
  *     @skb - buffer to copy
@@ -477,6 +490,7 @@
 
 EXPORT_SYMBOL(datagram_poll);
 EXPORT_SYMBOL(skb_copy_and_csum_datagram_iovec);
+EXPORT_SYMBOL(skb_copy_datagram);
 EXPORT_SYMBOL(skb_copy_datagram_iovec);
 EXPORT_SYMBOL(skb_free_datagram);
 EXPORT_SYMBOL(skb_recv_datagram);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to