From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: riku.voipio@iki.fi, laurent@vivier.eu, nchen@wavecomp.com,
ysu@wavecomp.com, arikalo@wavecomp.com, amarkovic@wavecomp.com
Subject: [Qemu-devel] [PATCH] linux-user: Support the SIOCSIFPFLAGS and SIOCGIFPFLAGS ioctls
Date: Tue, 9 Apr 2019 21:51:26 +0200 [thread overview]
Message-ID: <1554839486-3527-1-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
From: Neng Chen <nchen@wavecomp.com>
Add support for setting and getting extended (private) flags
of a network device via SIOCSIFPFLAGS and SIOCGIFPFLAGS ioctls.
The ioctl numeric values are platform-independent and determined
by the file include/uapi/linux/sockios.h in Linux kernel source
code.
The ioctls set and get field ifr_flags of type short in the
structure ifreq. Such functionality in QEMU is achieved using
MK_STRUCT() and MK_PTR() macros with an appropriate argument.
Signed-off-by: Neng Chen <nchen@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
linux-user/ioctls.h | 2 ++
linux-user/syscall_defs.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index ae89516..11829a1 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -206,6 +206,8 @@
IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
+ IOCTL(SIOCSIFPFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
+ IOCTL(SIOCGIFPFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
MK_PTR(MK_STRUCT(STRUCT_ifconf)))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 12c8407..060b854 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -777,6 +777,8 @@ struct target_pollfd {
#define TARGET_SIOCADDMULTI 0x8931 /* Multicast address lists */
#define TARGET_SIOCDELMULTI 0x8932
#define TARGET_SIOCGIFINDEX 0x8933
+#define TARGET_SIOCSIFPFLAGS 0x8934 /* set extended flags */
+#define TARGET_SIOCGIFPFLAGS 0x8935 /* get extended flags */
/* Bridging control calls */
#define TARGET_SIOCGIFBR 0x8940 /* Bridging support */
--
2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: arikalo@wavecomp.com, riku.voipio@iki.fi, ysu@wavecomp.com,
laurent@vivier.eu, amarkovic@wavecomp.com, nchen@wavecomp.com
Subject: [Qemu-devel] [PATCH] linux-user: Support the SIOCSIFPFLAGS and SIOCGIFPFLAGS ioctls
Date: Tue, 9 Apr 2019 21:51:26 +0200 [thread overview]
Message-ID: <1554839486-3527-1-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
Message-ID: <20190409195126.gV6qMKcOt8NsDdLuro3_q0orVhxsCWp-tlyZXueNXSw@z> (raw)
From: Neng Chen <nchen@wavecomp.com>
Add support for setting and getting extended (private) flags
of a network device via SIOCSIFPFLAGS and SIOCGIFPFLAGS ioctls.
The ioctl numeric values are platform-independent and determined
by the file include/uapi/linux/sockios.h in Linux kernel source
code.
The ioctls set and get field ifr_flags of type short in the
structure ifreq. Such functionality in QEMU is achieved using
MK_STRUCT() and MK_PTR() macros with an appropriate argument.
Signed-off-by: Neng Chen <nchen@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
linux-user/ioctls.h | 2 ++
linux-user/syscall_defs.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index ae89516..11829a1 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -206,6 +206,8 @@
IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
+ IOCTL(SIOCSIFPFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
+ IOCTL(SIOCGIFPFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
MK_PTR(MK_STRUCT(STRUCT_ifconf)))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 12c8407..060b854 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -777,6 +777,8 @@ struct target_pollfd {
#define TARGET_SIOCADDMULTI 0x8931 /* Multicast address lists */
#define TARGET_SIOCDELMULTI 0x8932
#define TARGET_SIOCGIFINDEX 0x8933
+#define TARGET_SIOCSIFPFLAGS 0x8934 /* set extended flags */
+#define TARGET_SIOCGIFPFLAGS 0x8935 /* get extended flags */
/* Bridging control calls */
#define TARGET_SIOCGIFBR 0x8940 /* Bridging support */
--
2.7.4
next reply other threads:[~2019-04-09 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 19:51 Aleksandar Markovic [this message]
2019-04-09 19:51 ` [Qemu-devel] [PATCH] linux-user: Support the SIOCSIFPFLAGS and SIOCGIFPFLAGS ioctls Aleksandar Markovic
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=1554839486-3527-1-git-send-email-aleksandar.markovic@rt-rk.com \
--to=aleksandar.markovic@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=arikalo@wavecomp.com \
--cc=laurent@vivier.eu \
--cc=nchen@wavecomp.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=ysu@wavecomp.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).