[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/8] net: update netdev stream man page with unix socket
|
From: |
Jason Wang |
|
Subject: |
[PULL 5/8] net: update netdev stream man page with unix socket |
|
Date: |
Fri, 2 Aug 2024 11:19:26 +0800 |
From: Laurent Vivier <lvivier@redhat.com>
Add the description of "-netdev stream" with a unix domain socket.
The code has been added but the man page has not been updated.
Include an example how to use "-netdev stream" and "passt" in place
of "-netdev user".
("passt" is a non privileged translation proxy between layer-2, like
"-netdev stream", and layer-4 on host, like TCP, UDP, ICMP/ICMPv6 echo)
Fixes: 13c6be96618c ("net: stream: add unix socket")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
qemu-options.hx | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 52143cfb8f..2614eea4d7 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3393,6 +3393,46 @@ SRST
-device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
-netdev
stream,id=net0,server=off,addr.type=inet,addr.host=localhost,addr.port=1234
+``-netdev
stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off]``
+ Configure a network backend to connect to another QEMU virtual machine or
a proxy using a stream oriented unix domain socket.
+
+ ``server=on|off``
+ if ``on`` create a server socket
+
+ ``addr.path=path``
+ filesystem path to use
+
+ ``abstract=on|off``
+ if ``on``, this is a Linux abstract socket address.
+
+ ``tight=on|off``
+ if false, pad an abstract socket address with enough null bytes to
make it fill struct sockaddr_un member sun_path.
+
+ Example (using passt as a replacement of -netdev user):
+
+ .. parsed-literal::
+
+ # start passt server as a non privileged user
+ passt
+ UNIX domain socket bound at /tmp/passt_1.socket
+ # start QEMU to connect to passt
+ |qemu_system| linux.img \\
+ -device virtio-net,netdev=net0 \\
+ -netdev
stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/passt_1.socket
+
+ Example (two guests connected using a stream oriented unix domain socket):
+
+ .. parsed-literal::
+
+ # first VM
+ |qemu_system| linux.img \\
+ -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
+ netdev
stream,id=net0,server=on,addr.type=unix,addr.path=/tmp/qemu0
+ # second VM
+ |qemu_system| linux.img \\
+ -device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
+ -netdev
stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/qemu0
+
``-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor``
Configure a network backend to connect to another QEMU virtual machine or
a proxy using a stream oriented socket file descriptor.
--
2.42.0
- [PULL 0/8] Net patches, Jason Wang, 2024/08/01
- [PULL 1/8] rtl8139: Fix behaviour for old kernels., Jason Wang, 2024/08/01
- [PULL 2/8] virtio-net: Ensure queue index fits with RSS, Jason Wang, 2024/08/01
- [PULL 3/8] virtio-net: Fix network stall at the host side waiting for kick, Jason Wang, 2024/08/01
- [PULL 4/8] net: update netdev stream/dgram man page, Jason Wang, 2024/08/01
- [PULL 5/8] net: update netdev stream man page with unix socket,
Jason Wang <=
- [PULL 6/8] net: update netdev dgram man page with unix socket, Jason Wang, 2024/08/01
- [PULL 7/8] net: update netdev stream man page with the reconnect parameter, Jason Wang, 2024/08/01
- [PULL 8/8] net: Reinstate '-net nic, model=help' output as documented in man page, Jason Wang, 2024/08/01
- Re: [PULL 0/8] Net patches, Richard Henderson, 2024/08/02