aboutsummaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-12-20 13:53:12 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-01-16 06:58:54 +0100
commitf6bd5d6ec514939c421fcd411d1a39bc7dad0948 (patch)
tree3bdb263875bf66fc8ca842e16d42eebf124509f8 /qapi-schema.json
parent88a946d32dd9e4c6c0ad56e19f2822bd5c8b416e (diff)
chardev: add socket chardev support to chardev-add (qmp)
qemu_chr_open_socket is split into two functions. All initialization after creating the socket file handler is split away into the new qemu_chr_open_socket_fd function. chr->filename doesn't get filled from QemuOpts any more. Qemu gathers the information using getsockname and getnameinfo instead. This way it will also work correctly for file handles passed via file descriptor passing. Finally qmp_chardev_open_socket() is the actual qmp hotplug implementation which basically just calls socket_listen or socket_connect and the new qemu_chr_open_socket_fd function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json28
1 files changed, 25 insertions, 3 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 320fa6baf1..5c3e3eb469 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3049,6 +3049,27 @@
'type' : 'ChardevPortKind'} }
##
+# @ChardevSocket:
+#
+# Configuration info for socket chardevs.
+#
+# @addr: socket address to listen on (server=true)
+# or connect to (server=false)
+# @server: #optional create server socket (default: true)
+# @wait: #optional wait for connect (not used for server
+# sockets, default: false)
+# @nodelay: #optional set TCP_NODELAY socket option (default: false)
+# @telnet: #optional enable telnet protocol (default: false)
+#
+# Since: 1.4
+##
+{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
+ '*server' : 'bool',
+ '*wait' : 'bool',
+ '*nodelay' : 'bool',
+ '*telnet' : 'bool' } }
+
+##
# @ChardevBackend:
#
# Configuration info for the new chardev backend.
@@ -3057,9 +3078,10 @@
##
{ 'type': 'ChardevDummy', 'data': { } }
-{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
- 'port' : 'ChardevPort',
- 'null' : 'ChardevDummy' } }
+{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
+ 'port' : 'ChardevPort',
+ 'socket' : 'ChardevSocket',
+ 'null' : 'ChardevDummy' } }
##
# @ChardevReturn: