From: "André Hentschel" <nerv@dawncrow.de>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>
Subject: [Qemu-devel] [PATCH resend] linux-user: Support the accept4 socketcall
Date: Mon, 06 Jan 2014 02:57:15 +0100 [thread overview]
Message-ID: <52CA0D7B.5000301@dawncrow.de> (raw)
From: André Hentschel <nerv@dawncrow.de>
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
---
See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/net.h for the values.
Not entirely sure how to implement recvmmsg and sendmmsg...
linux-user/syscall.c | 15 +++++++++++++++
linux-user/syscall_defs.h | 3 +++
2 files changed, 18 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index efd1453..475fb8c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2245,6 +2245,21 @@ static abi_long do_socketcall(int num, abi_ulong vptr)
ret = do_accept4(sockfd, target_addr, target_addrlen, 0);
}
break;
+ case SOCKOP_accept4:
+ {
+ abi_ulong sockfd;
+ abi_ulong target_addr, target_addrlen;
+ abi_ulong flags;
+
+ if (get_user_ual(sockfd, vptr)
+ || get_user_ual(target_addr, vptr + n)
+ || get_user_ual(target_addrlen, vptr + 2 * n)
+ || get_user_ual(flags, vptr + 3 * n))
+ return -TARGET_EFAULT;
+
+ ret = do_accept4(sockfd, target_addr, target_addrlen, flags);
+ }
+ break;
case SOCKOP_getsockname:
{
abi_ulong sockfd;
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index cf08db5..b36f99c 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -27,6 +27,9 @@
#define SOCKOP_getsockopt 15
#define SOCKOP_sendmsg 16
#define SOCKOP_recvmsg 17
+#define SOCKOP_accept4 18
+#define SOCKOP_recvmmsg 19
+#define SOCKOP_sendmmsg 20
#define IPCOP_semop 1
#define IPCOP_semget 2
--
1.8.1.2
next reply other threads:[~2014-01-06 1:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 1:57 André Hentschel [this message]
2014-01-06 3:37 ` [Qemu-devel] [PATCH resend] linux-user: Support the accept4 socketcall Erik de Castro Lopo
2014-01-06 8:45 ` Laurent Vivier
2014-01-06 9:14 ` Peter Maydell
2014-01-06 10:21 ` Laurent Vivier
2014-01-06 15:38 ` André Hentschel
2014-01-06 16:03 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52CA0D7B.5000301@dawncrow.de \
--to=nerv@dawncrow.de \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.