aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-12-10 00:04:05 +0000
committerDavid S. Miller <davem@davemloft.net>2010-12-10 11:13:18 -0800
commitc1249c0aae4c93a753c70496ab2e9a51430a6f02 (patch)
tree4e2905d99365e3d7cc1a09cd8681b1e7dd31b867 /net
parente4fbce740f078bbc925ba5c86648d9c883968479 (diff)
net: Document the kernel_recvmsg() function
Signed-off-by: Martin Lucina <mato@kotelna.sk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/socket.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 3ca2fd9e372..088fb3fd45e 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -732,6 +732,21 @@ static int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
return ret;
}
+/**
+ * kernel_recvmsg - Receive a message from a socket (kernel space)
+ * @sock: The socket to receive the message from
+ * @msg: Received message
+ * @vec: Input s/g array for message data
+ * @num: Size of input s/g array
+ * @size: Number of bytes to read
+ * @flags: Message flags (MSG_DONTWAIT, etc...)
+ *
+ * On return the msg structure contains the scatter/gather array passed in the
+ * vec argument. The array is modified so that it consists of the unfilled
+ * portion of the original array.
+ *
+ * The returned value is the total number of bytes received, or an error.
+ */
int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
struct kvec *vec, size_t num, size_t size, int flags)
{