summaryrefslogtreecommitdiffstats
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorStefan Hajnoczi2016-10-14 11:00:55 +0200
committerMichael Roth2016-11-01 01:49:33 +0100
commit6a02c8069f6c28ed1251e3fbbdf16e49d2c27ccc (patch)
tree428aaa097dc544ba45d63a71d9bcfe5a8c23ddb8 /qapi-schema.json
parentqga: drop unnecessary GA_CHANNEL_UNIX_LISTEN checks (diff)
downloadqemu-6a02c8069f6c28ed1251e3fbbdf16e49d2c27ccc.tar.gz
qemu-6a02c8069f6c28ed1251e3fbbdf16e49d2c27ccc.tar.xz
qemu-6a02c8069f6c28ed1251e3fbbdf16e49d2c27ccc.zip
sockets: add AF_VSOCK support
Add the AF_VSOCK address family so that qemu-ga will be able to use virtio-vsock. The AF_VSOCK address family uses <cid, port> address tuples. The cid is the unique identifier comparable to an IP address. AF_VSOCK does not use name resolution so it's easy to convert between struct sockaddr_vm and strings. This patch defines a VsockSocketAddress instead of trying to piggy-back on InetSocketAddress. This is cleaner in the long run since it avoids lots of IPv4 vs IPv6 vs vsock special casing. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> * treat trailing commas as garbage when parsing (Eric Blake) * add configure check instead of checking AF_VSOCK directly Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json23
1 files changed, 22 insertions, 1 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 8a7b527091..5dc96af469 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1063,12 +1063,14 @@
#
# @unix: unix socket
#
+# @vsock: vsock family (since 2.8)
+#
# @unknown: otherwise
#
# Since: 2.1
##
{ 'enum': 'NetworkAddressFamily',
- 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
+ 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
##
# @VncBasicInfo
@@ -3095,6 +3097,24 @@
'path': 'str' } }
##
+# @VsockSocketAddress
+#
+# Captures a socket address in the vsock namespace.
+#
+# @cid: unique host identifier
+# @port: port
+#
+# Note that string types are used to allow for possible future hostname or
+# service resolution support.
+#
+# Since 2.8
+##
+{ 'struct': 'VsockSocketAddress',
+ 'data': {
+ 'cid': 'str',
+ 'port': 'str' } }
+
+##
# @SocketAddress
#
# Captures the address of a socket, which could also be a named file descriptor
@@ -3105,6 +3125,7 @@
'data': {
'inet': 'InetSocketAddress',
'unix': 'UnixSocketAddress',
+ 'vsock': 'VsockSocketAddress',
'fd': 'String' } }
##