summaryrefslogtreecommitdiff
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-04-20 01:25:46 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-21 05:42:44 -0700
commit0a1ec07a67bd8b0033dace237249654d015efa21 (patch)
tree1963b9ba273f0786c8a972c27b5599dfb4a19f06 /include/linux/socket.h
parent0cededf3ffbb775c3716aa1d246338fdc24b1259 (diff)
downloadlinux-3.10-0a1ec07a67bd8b0033dace237249654d015efa21.tar.gz
linux-3.10-0a1ec07a67bd8b0033dace237249654d015efa21.tar.bz2
linux-3.10-0a1ec07a67bd8b0033dace237249654d015efa21.zip
net: skb_copy_datagram_const_iovec()
There's an skb_copy_datagram_iovec() to copy out of a paged skb, but it modifies the iovec, and does not support starting at an offset in the destination. We want both in tun.c, so let's add the function. It's a carbon copy of skb_copy_datagram_iovec() with enough changes to be annoying. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 421afb4d29b..171b08db9c4 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -318,6 +318,8 @@ extern int csum_partial_copy_fromiovecend(unsigned char *kdata,
extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address, int mode);
extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len);
+extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata,
+ int offset, int len);
extern int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr, int __user *ulen);
extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr);
extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);