aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
Diffstat (limited to 'qapi')
-rw-r--r--qapi/net.json118
1 files changed, 116 insertions, 2 deletions
diff --git a/qapi/net.json b/qapi/net.json
index dd088c09c5..522ac582ed 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -7,6 +7,7 @@
##
{ 'include': 'common.json' }
+{ 'include': 'sockets.json' }
##
# @set_link:
@@ -442,6 +443,8 @@
# @vhostdev: path of vhost-vdpa device
# (default:'/dev/vhost-vdpa-0')
#
+# @vhostfd: file descriptor of an already opened vhost vdpa device
+#
# @queues: number of queues to be created for multiqueue vhost-vdpa
# (default: 1)
#
@@ -456,6 +459,7 @@
{ 'struct': 'NetdevVhostVDPAOptions',
'data': {
'*vhostdev': 'str',
+ '*vhostfd': 'str',
'*queues': 'int',
'*x-svq': {'type': 'bool', 'features' : [ 'unstable'] } } }
@@ -574,6 +578,60 @@
'if': 'CONFIG_VMNET' }
##
+# @NetdevStreamOptions:
+#
+# Configuration info for stream socket netdev
+#
+# @addr: socket address to listen on (server=true)
+# or connect to (server=false)
+# @server: create server socket (default: false)
+#
+# Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
+#
+# Since: 7.2
+##
+{ 'struct': 'NetdevStreamOptions',
+ 'data': {
+ 'addr': 'SocketAddress',
+ '*server': 'bool' } }
+
+##
+# @NetdevDgramOptions:
+#
+# Configuration info for datagram socket netdev.
+#
+# @remote: remote address
+# @local: local address
+#
+# Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
+#
+# If remote address is present and it's a multicast address, local address
+# is optional. Otherwise local address is required and remote address is
+# optional.
+#
+# .. table:: Valid parameters combination table
+# :widths: auto
+#
+# ============= ======== =====
+# remote local okay?
+# ============= ======== =====
+# absent absent no
+# absent not fd no
+# absent fd yes
+# multicast absent yes
+# multicast present yes
+# not multicast absent no
+# not multicast present yes
+# ============= ======== =====
+#
+# Since: 7.2
+##
+{ 'struct': 'NetdevDgramOptions',
+ 'data': {
+ '*local': 'SocketAddress',
+ '*remote': 'SocketAddress' } }
+
+##
# @NetClientDriver:
#
# Available netdev drivers.
@@ -584,10 +642,13 @@
# @vmnet-host since 7.1
# @vmnet-shared since 7.1
# @vmnet-bridged since 7.1
+# @stream since 7.2
+# @dgram since 7.2
##
{ 'enum': 'NetClientDriver',
- 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
- 'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa',
+ 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream',
+ 'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user',
+ 'vhost-vdpa',
{ 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
{ 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
{ 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
@@ -607,6 +668,8 @@
# 'vmnet-host' - since 7.1
# 'vmnet-shared' - since 7.1
# 'vmnet-bridged' - since 7.1
+# 'stream' since 7.2
+# 'dgram' since 7.2
##
{ 'union': 'Netdev',
'base': { 'id': 'str', 'type': 'NetClientDriver' },
@@ -617,6 +680,8 @@
'tap': 'NetdevTapOptions',
'l2tpv3': 'NetdevL2TPv3Options',
'socket': 'NetdevSocketOptions',
+ 'stream': 'NetdevStreamOptions',
+ 'dgram': 'NetdevDgramOptions',
'vde': 'NetdevVdeOptions',
'bridge': 'NetdevBridgeOptions',
'hubport': 'NetdevHubPortOptions',
@@ -833,3 +898,52 @@
##
{ 'event': 'FAILOVER_NEGOTIATED',
'data': {'device-id': 'str'} }
+
+##
+# @NETDEV_STREAM_CONNECTED:
+#
+# Emitted when the netdev stream backend is connected
+#
+# @netdev-id: QEMU netdev id that is connected
+# @addr: The destination address
+#
+# Since: 7.2
+#
+# Example:
+#
+# <- { "event": "NETDEV_STREAM_CONNECTED",
+# "data": { "netdev-id": "netdev0",
+# "addr": { "port": "47666", "ipv6": true,
+# "host": "::1", "type": "inet" } },
+# "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
+#
+# or
+#
+# <- { "event": "NETDEV_STREAM_CONNECTED",
+# "data": { "netdev-id": "netdev0",
+# "addr": { "path": "/tmp/qemu0", "type": "unix" } },
+# "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
+#
+##
+{ 'event': 'NETDEV_STREAM_CONNECTED',
+ 'data': { 'netdev-id': 'str',
+ 'addr': 'SocketAddress' } }
+
+##
+# @NETDEV_STREAM_DISCONNECTED:
+#
+# Emitted when the netdev stream backend is disconnected
+#
+# @netdev-id: QEMU netdev id that is disconnected
+#
+# Since: 7.2
+#
+# Example:
+#
+# <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
+# 'data': {'netdev-id': 'netdev0'},
+# 'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
+#
+##
+{ 'event': 'NETDEV_STREAM_DISCONNECTED',
+ 'data': { 'netdev-id': 'str' } }