1dbeee392SMarkus Armbruster# -*- Mode: Python -*- 2f7160f32SAndrea Bolognani# vim: filetype=python 3dbeee392SMarkus Armbruster# 4dbeee392SMarkus Armbruster 5dbeee392SMarkus Armbruster## 6dbeee392SMarkus Armbruster# = Character devices 7dbeee392SMarkus Armbruster## 8dbeee392SMarkus Armbruster 9dbeee392SMarkus Armbruster{ 'include': 'sockets.json' } 10dbeee392SMarkus Armbruster 11dbeee392SMarkus Armbruster## 12dbeee392SMarkus Armbruster# @ChardevInfo: 13dbeee392SMarkus Armbruster# 14dbeee392SMarkus Armbruster# Information about a character device. 15dbeee392SMarkus Armbruster# 16dbeee392SMarkus Armbruster# @label: the label of the character device 17dbeee392SMarkus Armbruster# 18dbeee392SMarkus Armbruster# @filename: the filename of the character device 19dbeee392SMarkus Armbruster# 20a937b6aaSMarkus Armbruster# @frontend-open: shows whether the frontend device attached to this 21ff62c210SMarkus Armbruster# backend (e.g. with the chardev=... option) is in open or closed 22a937b6aaSMarkus Armbruster# state (since 2.1) 23dbeee392SMarkus Armbruster# 24d461c279SJohn Snow# .. note:: @filename is encoded using the QEMU command line character 25a937b6aaSMarkus Armbruster# device encoding. See the QEMU man page for details. 26dbeee392SMarkus Armbruster# 279bc6e893SMarkus Armbruster# Since: 0.14 28dbeee392SMarkus Armbruster## 29b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevInfo', 30b0ddeba2SMarc-André Lureau 'data': { 'label': 'str', 31dbeee392SMarkus Armbruster 'filename': 'str', 32dbeee392SMarkus Armbruster 'frontend-open': 'bool' } } 33dbeee392SMarkus Armbruster 34dbeee392SMarkus Armbruster## 35dbeee392SMarkus Armbruster# @query-chardev: 36dbeee392SMarkus Armbruster# 37dbeee392SMarkus Armbruster# Returns information about current character devices. 38dbeee392SMarkus Armbruster# 39dbeee392SMarkus Armbruster# Returns: a list of @ChardevInfo 40dbeee392SMarkus Armbruster# 419bc6e893SMarkus Armbruster# Since: 0.14 42dbeee392SMarkus Armbruster# 4314b48aaaSJohn Snow# .. qmp-example:: 44dbeee392SMarkus Armbruster# 45dbeee392SMarkus Armbruster# -> { "execute": "query-chardev" } 46dbeee392SMarkus Armbruster# <- { 47dbeee392SMarkus Armbruster# "return": [ 48dbeee392SMarkus Armbruster# { 49dbeee392SMarkus Armbruster# "label": "charchannel0", 509d902d51SPaolo Bonzini# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server=on", 51dbeee392SMarkus Armbruster# "frontend-open": false 52dbeee392SMarkus Armbruster# }, 53dbeee392SMarkus Armbruster# { 54dbeee392SMarkus Armbruster# "label": "charmonitor", 559d902d51SPaolo Bonzini# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server=on", 56dbeee392SMarkus Armbruster# "frontend-open": true 57dbeee392SMarkus Armbruster# }, 58dbeee392SMarkus Armbruster# { 59dbeee392SMarkus Armbruster# "label": "charserial0", 60dbeee392SMarkus Armbruster# "filename": "pty:/dev/pts/2", 61dbeee392SMarkus Armbruster# "frontend-open": true 62dbeee392SMarkus Armbruster# } 63dbeee392SMarkus Armbruster# ] 64dbeee392SMarkus Armbruster# } 65dbeee392SMarkus Armbruster## 66a87706c8SIgor Mammedov{ 'command': 'query-chardev', 'returns': ['ChardevInfo'], 67a87706c8SIgor Mammedov 'allow-preconfig': true } 68dbeee392SMarkus Armbruster 69dbeee392SMarkus Armbruster## 70dbeee392SMarkus Armbruster# @ChardevBackendInfo: 71dbeee392SMarkus Armbruster# 72dbeee392SMarkus Armbruster# Information about a character device backend 73dbeee392SMarkus Armbruster# 74dbeee392SMarkus Armbruster# @name: The backend name 75dbeee392SMarkus Armbruster# 76dbeee392SMarkus Armbruster# Since: 2.0 77dbeee392SMarkus Armbruster## 78dbeee392SMarkus Armbruster{ 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} } 79dbeee392SMarkus Armbruster 80dbeee392SMarkus Armbruster## 81dbeee392SMarkus Armbruster# @query-chardev-backends: 82dbeee392SMarkus Armbruster# 83dbeee392SMarkus Armbruster# Returns information about character device backends. 84dbeee392SMarkus Armbruster# 85dbeee392SMarkus Armbruster# Returns: a list of @ChardevBackendInfo 86dbeee392SMarkus Armbruster# 87dbeee392SMarkus Armbruster# Since: 2.0 88dbeee392SMarkus Armbruster# 8914b48aaaSJohn Snow# .. qmp-example:: 90dbeee392SMarkus Armbruster# 91dbeee392SMarkus Armbruster# -> { "execute": "query-chardev-backends" } 92dbeee392SMarkus Armbruster# <- { 93dbeee392SMarkus Armbruster# "return":[ 94dbeee392SMarkus Armbruster# { 95dbeee392SMarkus Armbruster# "name":"udp" 96dbeee392SMarkus Armbruster# }, 97dbeee392SMarkus Armbruster# { 98dbeee392SMarkus Armbruster# "name":"tcp" 99dbeee392SMarkus Armbruster# }, 100dbeee392SMarkus Armbruster# { 101dbeee392SMarkus Armbruster# "name":"unix" 102dbeee392SMarkus Armbruster# }, 103dbeee392SMarkus Armbruster# { 104dbeee392SMarkus Armbruster# "name":"spiceport" 105dbeee392SMarkus Armbruster# } 106dbeee392SMarkus Armbruster# ] 107dbeee392SMarkus Armbruster# } 108dbeee392SMarkus Armbruster## 109dbeee392SMarkus Armbruster{ 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] } 110dbeee392SMarkus Armbruster 111dbeee392SMarkus Armbruster## 112dbeee392SMarkus Armbruster# @DataFormat: 113dbeee392SMarkus Armbruster# 114dbeee392SMarkus Armbruster# An enumeration of data format. 115dbeee392SMarkus Armbruster# 116dbeee392SMarkus Armbruster# @utf8: Data is a UTF-8 string (RFC 3629) 117dbeee392SMarkus Armbruster# 118dbeee392SMarkus Armbruster# @base64: Data is Base64 encoded binary (RFC 3548) 119dbeee392SMarkus Armbruster# 120dbeee392SMarkus Armbruster# Since: 1.4 121dbeee392SMarkus Armbruster## 122dbeee392SMarkus Armbruster{ 'enum': 'DataFormat', 123dbeee392SMarkus Armbruster 'data': [ 'utf8', 'base64' ] } 124dbeee392SMarkus Armbruster 125dbeee392SMarkus Armbruster## 126dbeee392SMarkus Armbruster# @ringbuf-write: 127dbeee392SMarkus Armbruster# 128dbeee392SMarkus Armbruster# Write to a ring buffer character device. 129dbeee392SMarkus Armbruster# 130dbeee392SMarkus Armbruster# @device: the ring buffer character device name 131dbeee392SMarkus Armbruster# 132dbeee392SMarkus Armbruster# @data: data to write 133dbeee392SMarkus Armbruster# 134dbeee392SMarkus Armbruster# @format: data encoding (default 'utf8'). 135100cc4feSPeter Maydell# 136a937b6aaSMarkus Armbruster# - base64: data must be base64 encoded text. Its binary decoding 137a937b6aaSMarkus Armbruster# gets written. 138dbeee392SMarkus Armbruster# - utf8: data's UTF-8 encoding is written 139a937b6aaSMarkus Armbruster# - data itself is always Unicode regardless of format, like any 140a937b6aaSMarkus Armbruster# other string. 141dbeee392SMarkus Armbruster# 142dbeee392SMarkus Armbruster# Since: 1.4 143dbeee392SMarkus Armbruster# 14414b48aaaSJohn Snow# .. qmp-example:: 145dbeee392SMarkus Armbruster# 146dbeee392SMarkus Armbruster# -> { "execute": "ringbuf-write", 147dbeee392SMarkus Armbruster# "arguments": { "device": "foo", 148dbeee392SMarkus Armbruster# "data": "abcdefgh", 149dbeee392SMarkus Armbruster# "format": "utf8" } } 150dbeee392SMarkus Armbruster# <- { "return": {} } 151dbeee392SMarkus Armbruster## 152dbeee392SMarkus Armbruster{ 'command': 'ringbuf-write', 153b0ddeba2SMarc-André Lureau 'data': { 'device': 'str', 154b0ddeba2SMarc-André Lureau 'data': 'str', 155dbeee392SMarkus Armbruster '*format': 'DataFormat'} } 156dbeee392SMarkus Armbruster 157dbeee392SMarkus Armbruster## 158dbeee392SMarkus Armbruster# @ringbuf-read: 159dbeee392SMarkus Armbruster# 160dbeee392SMarkus Armbruster# Read from a ring buffer character device. 161dbeee392SMarkus Armbruster# 162dbeee392SMarkus Armbruster# @device: the ring buffer character device name 163dbeee392SMarkus Armbruster# 164dbeee392SMarkus Armbruster# @size: how many bytes to read at most 165dbeee392SMarkus Armbruster# 166dbeee392SMarkus Armbruster# @format: data encoding (default 'utf8'). 167100cc4feSPeter Maydell# 168dbeee392SMarkus Armbruster# - base64: the data read is returned in base64 encoding. 169dbeee392SMarkus Armbruster# - utf8: the data read is interpreted as UTF-8. 170dbeee392SMarkus Armbruster# Bug: can screw up when the buffer contains invalid UTF-8 171a937b6aaSMarkus Armbruster# sequences, NUL characters, after the ring buffer lost data, 172a937b6aaSMarkus Armbruster# and when reading stops because the size limit is reached. 173a937b6aaSMarkus Armbruster# - The return value is always Unicode regardless of format, like 174a937b6aaSMarkus Armbruster# any other string. 175dbeee392SMarkus Armbruster# 176dbeee392SMarkus Armbruster# Returns: data read from the device 177dbeee392SMarkus Armbruster# 178dbeee392SMarkus Armbruster# Since: 1.4 179dbeee392SMarkus Armbruster# 18014b48aaaSJohn Snow# .. qmp-example:: 181dbeee392SMarkus Armbruster# 182dbeee392SMarkus Armbruster# -> { "execute": "ringbuf-read", 183dbeee392SMarkus Armbruster# "arguments": { "device": "foo", 184dbeee392SMarkus Armbruster# "size": 1000, 185dbeee392SMarkus Armbruster# "format": "utf8" } } 186dbeee392SMarkus Armbruster# <- { "return": "abcdefgh" } 187dbeee392SMarkus Armbruster## 188dbeee392SMarkus Armbruster{ 'command': 'ringbuf-read', 189dbeee392SMarkus Armbruster 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, 190dbeee392SMarkus Armbruster 'returns': 'str' } 191dbeee392SMarkus Armbruster 192dbeee392SMarkus Armbruster## 193dbeee392SMarkus Armbruster# @ChardevCommon: 194dbeee392SMarkus Armbruster# 195dbeee392SMarkus Armbruster# Configuration shared across all chardev backends 196dbeee392SMarkus Armbruster# 197dbeee392SMarkus Armbruster# @logfile: The name of a logfile to save output 198a937b6aaSMarkus Armbruster# 199a937b6aaSMarkus Armbruster# @logappend: true to append instead of truncate (default to false to 200a937b6aaSMarkus Armbruster# truncate) 201dbeee392SMarkus Armbruster# 202dbeee392SMarkus Armbruster# Since: 2.6 203dbeee392SMarkus Armbruster## 204b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevCommon', 205b0ddeba2SMarc-André Lureau 'data': { '*logfile': 'str', 206dbeee392SMarkus Armbruster '*logappend': 'bool' } } 207dbeee392SMarkus Armbruster 208dbeee392SMarkus Armbruster## 209dbeee392SMarkus Armbruster# @ChardevFile: 210dbeee392SMarkus Armbruster# 211dbeee392SMarkus Armbruster# Configuration info for file chardevs. 212dbeee392SMarkus Armbruster# 213dbeee392SMarkus Armbruster# @in: The name of the input file 214a937b6aaSMarkus Armbruster# 215dbeee392SMarkus Armbruster# @out: The name of the output file 216a937b6aaSMarkus Armbruster# 217a937b6aaSMarkus Armbruster# @append: Open the file in append mode (default false to truncate) 218a937b6aaSMarkus Armbruster# (Since 2.6) 219dbeee392SMarkus Armbruster# 220dbeee392SMarkus Armbruster# Since: 1.4 221dbeee392SMarkus Armbruster## 222b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevFile', 223b0ddeba2SMarc-André Lureau 'data': { '*in': 'str', 224dbeee392SMarkus Armbruster 'out': 'str', 225dbeee392SMarkus Armbruster '*append': 'bool' }, 226dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 227dbeee392SMarkus Armbruster 228dbeee392SMarkus Armbruster## 229dbeee392SMarkus Armbruster# @ChardevHostdev: 230dbeee392SMarkus Armbruster# 231dbeee392SMarkus Armbruster# Configuration info for device and pipe chardevs. 232dbeee392SMarkus Armbruster# 233a937b6aaSMarkus Armbruster# @device: The name of the special file for the device, i.e. 234a937b6aaSMarkus Armbruster# /dev/ttyS0 on Unix or COM1: on Windows 235dbeee392SMarkus Armbruster# 236dbeee392SMarkus Armbruster# Since: 1.4 237dbeee392SMarkus Armbruster## 238b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevHostdev', 239b0ddeba2SMarc-André Lureau 'data': { 'device': 'str' }, 240dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 241dbeee392SMarkus Armbruster 242dbeee392SMarkus Armbruster## 243dbeee392SMarkus Armbruster# @ChardevSocket: 244dbeee392SMarkus Armbruster# 245dbeee392SMarkus Armbruster# Configuration info for (stream) socket chardevs. 246dbeee392SMarkus Armbruster# 247a937b6aaSMarkus Armbruster# @addr: socket address to listen on (server=true) or connect to 248a937b6aaSMarkus Armbruster# (server=false) 249a937b6aaSMarkus Armbruster# 250dbeee392SMarkus Armbruster# @tls-creds: the ID of the TLS credentials object (since 2.6) 251a937b6aaSMarkus Armbruster# 252fd4a5fd4SDaniel P. Berrange# @tls-authz: the ID of the QAuthZ authorization object against which 253fd4a5fd4SDaniel P. Berrange# the client's x509 distinguished name will be validated. This 254a937b6aaSMarkus Armbruster# object is only resolved at time of use, so can be deleted and 255a937b6aaSMarkus Armbruster# recreated on the fly while the chardev server is active. If 256a937b6aaSMarkus Armbruster# missing, it will default to denying access (since 4.0) 257a937b6aaSMarkus Armbruster# 258dbeee392SMarkus Armbruster# @server: create server socket (default: true) 259a937b6aaSMarkus Armbruster# 260a937b6aaSMarkus Armbruster# @wait: wait for incoming connection on server sockets (default: 261a937b6aaSMarkus Armbruster# false). Silently ignored with server: false. This use is 262a937b6aaSMarkus Armbruster# deprecated. 263a937b6aaSMarkus Armbruster# 264dbeee392SMarkus Armbruster# @nodelay: set TCP_NODELAY socket option (default: false) 265a937b6aaSMarkus Armbruster# 266a937b6aaSMarkus Armbruster# @telnet: enable telnet protocol on server sockets (default: false) 267a937b6aaSMarkus Armbruster# 268a937b6aaSMarkus Armbruster# @tn3270: enable tn3270 protocol on server sockets (default: false) 269a937b6aaSMarkus Armbruster# (Since: 2.10) 270a937b6aaSMarkus Armbruster# 271a937b6aaSMarkus Armbruster# @websocket: enable websocket protocol on server sockets 272a937b6aaSMarkus Armbruster# (default: false) (Since: 3.1) 273a937b6aaSMarkus Armbruster# 274a937b6aaSMarkus Armbruster# @reconnect: For a client socket, if a socket is disconnected, then 275a937b6aaSMarkus Armbruster# attempt a reconnect after the given number of seconds. Setting 276c8e2b6b4SDaniil Tatianin# this to zero disables this function. The use of this member is 277c8e2b6b4SDaniil Tatianin# deprecated, use @reconnect-ms instead. (default: 0) (Since: 2.2) 278c8e2b6b4SDaniil Tatianin# 279c8e2b6b4SDaniil Tatianin# @reconnect-ms: For a client socket, if a socket is disconnected, 280c8e2b6b4SDaniil Tatianin# then attempt a reconnect after the given number of milliseconds. 281c8e2b6b4SDaniil Tatianin# Setting this to zero disables this function. This member is 282c8e2b6b4SDaniil Tatianin# mutually exclusive with @reconnect. 283c8e2b6b4SDaniil Tatianin# (default: 0) (Since: 9.2) 284c8e2b6b4SDaniil Tatianin# 285c8e2b6b4SDaniil Tatianin# Features: 286c8e2b6b4SDaniil Tatianin# 287c8e2b6b4SDaniil Tatianin# @deprecated: Member @reconnect is deprecated. Use @reconnect-ms 288c8e2b6b4SDaniil Tatianin# instead. 289dbeee392SMarkus Armbruster# 290dbeee392SMarkus Armbruster# Since: 1.4 291dbeee392SMarkus Armbruster## 292b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevSocket', 293b0ddeba2SMarc-André Lureau 'data': { 'addr': 'SocketAddressLegacy', 294dbeee392SMarkus Armbruster '*tls-creds': 'str', 295fd4a5fd4SDaniel P. Berrange '*tls-authz' : 'str', 296dbeee392SMarkus Armbruster '*server': 'bool', 297dbeee392SMarkus Armbruster '*wait': 'bool', 298dbeee392SMarkus Armbruster '*nodelay': 'bool', 299dbeee392SMarkus Armbruster '*telnet': 'bool', 300dbeee392SMarkus Armbruster '*tn3270': 'bool', 301981b06e7SJulia Suvorova '*websocket': 'bool', 302c8e2b6b4SDaniil Tatianin '*reconnect': { 'type': 'int', 'features': [ 'deprecated' ] }, 303c8e2b6b4SDaniil Tatianin '*reconnect-ms': 'int' }, 304dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 305dbeee392SMarkus Armbruster 306dbeee392SMarkus Armbruster## 307dbeee392SMarkus Armbruster# @ChardevUdp: 308dbeee392SMarkus Armbruster# 309dbeee392SMarkus Armbruster# Configuration info for datagram socket chardevs. 310dbeee392SMarkus Armbruster# 311dbeee392SMarkus Armbruster# @remote: remote address 312a937b6aaSMarkus Armbruster# 313dbeee392SMarkus Armbruster# @local: local address 314dbeee392SMarkus Armbruster# 315dbeee392SMarkus Armbruster# Since: 1.5 316dbeee392SMarkus Armbruster## 317b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevUdp', 318b0ddeba2SMarc-André Lureau 'data': { 'remote': 'SocketAddressLegacy', 319dbeee392SMarkus Armbruster '*local': 'SocketAddressLegacy' }, 320dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 321dbeee392SMarkus Armbruster 322dbeee392SMarkus Armbruster## 323dbeee392SMarkus Armbruster# @ChardevMux: 324dbeee392SMarkus Armbruster# 325dbeee392SMarkus Armbruster# Configuration info for mux chardevs. 326dbeee392SMarkus Armbruster# 327dbeee392SMarkus Armbruster# @chardev: name of the base chardev. 328dbeee392SMarkus Armbruster# 329dbeee392SMarkus Armbruster# Since: 1.5 330dbeee392SMarkus Armbruster## 331b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevMux', 332b0ddeba2SMarc-André Lureau 'data': { 'chardev': 'str' }, 333dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 334dbeee392SMarkus Armbruster 335dbeee392SMarkus Armbruster## 336dbeee392SMarkus Armbruster# @ChardevStdio: 337dbeee392SMarkus Armbruster# 338dbeee392SMarkus Armbruster# Configuration info for stdio chardevs. 339dbeee392SMarkus Armbruster# 340a937b6aaSMarkus Armbruster# @signal: Allow signals (such as SIGINT triggered by ^C) be delivered 341a937b6aaSMarkus Armbruster# to qemu. Default: true. 342dbeee392SMarkus Armbruster# 343dbeee392SMarkus Armbruster# Since: 1.5 344dbeee392SMarkus Armbruster## 345b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevStdio', 346b0ddeba2SMarc-André Lureau 'data': { '*signal': 'bool' }, 347dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 348dbeee392SMarkus Armbruster 349dbeee392SMarkus Armbruster## 350dbeee392SMarkus Armbruster# @ChardevSpiceChannel: 351dbeee392SMarkus Armbruster# 352dbeee392SMarkus Armbruster# Configuration info for spice vm channel chardevs. 353dbeee392SMarkus Armbruster# 354dbeee392SMarkus Armbruster# @type: kind of channel (for example vdagent). 355dbeee392SMarkus Armbruster# 356dbeee392SMarkus Armbruster# Since: 1.5 357dbeee392SMarkus Armbruster## 358b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevSpiceChannel', 359b0ddeba2SMarc-André Lureau 'data': { 'type': 'str' }, 360fd9dda3bSMarc-André Lureau 'base': 'ChardevCommon', 3618a9f1e1dSMarc-André Lureau 'if': 'CONFIG_SPICE' } 362dbeee392SMarkus Armbruster 363dbeee392SMarkus Armbruster## 364dbeee392SMarkus Armbruster# @ChardevSpicePort: 365dbeee392SMarkus Armbruster# 366dbeee392SMarkus Armbruster# Configuration info for spice port chardevs. 367dbeee392SMarkus Armbruster# 368dbeee392SMarkus Armbruster# @fqdn: name of the channel (see docs/spice-port-fqdn.txt) 369dbeee392SMarkus Armbruster# 370dbeee392SMarkus Armbruster# Since: 1.5 371dbeee392SMarkus Armbruster## 372b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevSpicePort', 373b0ddeba2SMarc-André Lureau 'data': { 'fqdn': 'str' }, 374fd9dda3bSMarc-André Lureau 'base': 'ChardevCommon', 3758a9f1e1dSMarc-André Lureau 'if': 'CONFIG_SPICE' } 376dbeee392SMarkus Armbruster 377dbeee392SMarkus Armbruster## 3783e301c8dSMarc-André Lureau# @ChardevDBus: 3793e301c8dSMarc-André Lureau# 3803e301c8dSMarc-André Lureau# Configuration info for DBus chardevs. 3813e301c8dSMarc-André Lureau# 3823e301c8dSMarc-André Lureau# @name: name of the channel (following docs/spice-port-fqdn.txt) 3833e301c8dSMarc-André Lureau# 3843e301c8dSMarc-André Lureau# Since: 7.0 3853e301c8dSMarc-André Lureau## 3863e301c8dSMarc-André Lureau{ 'struct': 'ChardevDBus', 3873e301c8dSMarc-André Lureau 'data': { 'name': 'str' }, 3883e301c8dSMarc-André Lureau 'base': 'ChardevCommon', 3893e301c8dSMarc-André Lureau 'if': 'CONFIG_DBUS_DISPLAY' } 3903e301c8dSMarc-André Lureau 3913e301c8dSMarc-André Lureau## 392dbeee392SMarkus Armbruster# @ChardevVC: 393dbeee392SMarkus Armbruster# 394dbeee392SMarkus Armbruster# Configuration info for virtual console chardevs. 395dbeee392SMarkus Armbruster# 396dbeee392SMarkus Armbruster# @width: console width, in pixels 397a937b6aaSMarkus Armbruster# 398dbeee392SMarkus Armbruster# @height: console height, in pixels 399a937b6aaSMarkus Armbruster# 400dbeee392SMarkus Armbruster# @cols: console width, in chars 401a937b6aaSMarkus Armbruster# 402dbeee392SMarkus Armbruster# @rows: console height, in chars 403dbeee392SMarkus Armbruster# 40401bed0ffSMarkus Armbruster# .. note:: The options are only effective when the VNC or SDL 40501bed0ffSMarkus Armbruster# graphical display backend is active. They are ignored with the 40601bed0ffSMarkus Armbruster# GTK, Spice, VNC and D-Bus display backends. 40732aa1f8dSMarc-André Lureau# 408dbeee392SMarkus Armbruster# Since: 1.5 409dbeee392SMarkus Armbruster## 410b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevVC', 411b0ddeba2SMarc-André Lureau 'data': { '*width': 'int', 412dbeee392SMarkus Armbruster '*height': 'int', 413dbeee392SMarkus Armbruster '*cols': 'int', 414dbeee392SMarkus Armbruster '*rows': 'int' }, 415dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 416dbeee392SMarkus Armbruster 417dbeee392SMarkus Armbruster## 418dbeee392SMarkus Armbruster# @ChardevRingbuf: 419dbeee392SMarkus Armbruster# 420dbeee392SMarkus Armbruster# Configuration info for ring buffer chardevs. 421dbeee392SMarkus Armbruster# 422dbeee392SMarkus Armbruster# @size: ring buffer size, must be power of two, default is 65536 423dbeee392SMarkus Armbruster# 424dbeee392SMarkus Armbruster# Since: 1.5 425dbeee392SMarkus Armbruster## 426b0ddeba2SMarc-André Lureau{ 'struct': 'ChardevRingbuf', 427b0ddeba2SMarc-André Lureau 'data': { '*size': 'int' }, 428dbeee392SMarkus Armbruster 'base': 'ChardevCommon' } 429dbeee392SMarkus Armbruster 430dbeee392SMarkus Armbruster## 431de74a22cSGerd Hoffmann# @ChardevQemuVDAgent: 432de74a22cSGerd Hoffmann# 433de74a22cSGerd Hoffmann# Configuration info for qemu vdagent implementation. 434de74a22cSGerd Hoffmann# 43556081919SGerd Hoffmann# @mouse: enable/disable mouse, default is enabled. 436a937b6aaSMarkus Armbruster# 437f0349f4dSGerd Hoffmann# @clipboard: enable/disable clipboard, default is disabled. 43856081919SGerd Hoffmann# 439de74a22cSGerd Hoffmann# Since: 6.1 440de74a22cSGerd Hoffmann## 441de74a22cSGerd Hoffmann{ 'struct': 'ChardevQemuVDAgent', 442f0349f4dSGerd Hoffmann 'data': { '*mouse': 'bool', 443f0349f4dSGerd Hoffmann '*clipboard': 'bool' }, 444de74a22cSGerd Hoffmann 'base': 'ChardevCommon', 4458a9f1e1dSMarc-André Lureau 'if': 'CONFIG_SPICE_PROTOCOL' } 446de74a22cSGerd Hoffmann 447de74a22cSGerd Hoffmann## 448*b74cb876SOctavian Purdila# @ChardevPty: 449*b74cb876SOctavian Purdila# 450*b74cb876SOctavian Purdila# Configuration info for pty implementation. 451*b74cb876SOctavian Purdila# 452*b74cb876SOctavian Purdila# @path: optional path to create a symbolic link that points to the 453*b74cb876SOctavian Purdila# allocated PTY 454*b74cb876SOctavian Purdila# 455*b74cb876SOctavian Purdila# Since: 9.2 456*b74cb876SOctavian Purdila## 457*b74cb876SOctavian Purdila{ 'struct': 'ChardevPty', 458*b74cb876SOctavian Purdila 'data': { '*path': 'str' }, 459*b74cb876SOctavian Purdila 'base': 'ChardevCommon' } 460*b74cb876SOctavian Purdila 461*b74cb876SOctavian Purdila## 4623218c0e9SMarkus Armbruster# @ChardevBackendKind: 4633218c0e9SMarkus Armbruster# 46468eef67aSMarkus Armbruster# @file: regular files 465a937b6aaSMarkus Armbruster# 46668eef67aSMarkus Armbruster# @serial: serial host device 467a937b6aaSMarkus Armbruster# 46868eef67aSMarkus Armbruster# @parallel: parallel host device 469a937b6aaSMarkus Armbruster# 47068eef67aSMarkus Armbruster# @pipe: pipes (since 1.5) 471a937b6aaSMarkus Armbruster# 47268eef67aSMarkus Armbruster# @socket: stream socket 473a937b6aaSMarkus Armbruster# 47468eef67aSMarkus Armbruster# @udp: datagram socket (since 1.5) 475a937b6aaSMarkus Armbruster# 47668eef67aSMarkus Armbruster# @pty: pseudo-terminal 477a937b6aaSMarkus Armbruster# 47868eef67aSMarkus Armbruster# @null: provides no input, throws away output 479a937b6aaSMarkus Armbruster# 48068eef67aSMarkus Armbruster# @mux: (since 1.5) 481a937b6aaSMarkus Armbruster# 48268eef67aSMarkus Armbruster# @msmouse: emulated Microsoft serial mouse (since 1.5) 483a937b6aaSMarkus Armbruster# 48468eef67aSMarkus Armbruster# @wctablet: emulated Wacom Penpartner serial tablet (since 2.9) 485a937b6aaSMarkus Armbruster# 48668eef67aSMarkus Armbruster# @braille: Baum Braille device (since 1.5) 487a937b6aaSMarkus Armbruster# 48868eef67aSMarkus Armbruster# @testdev: device for test-suite control (since 2.2) 489a937b6aaSMarkus Armbruster# 49068eef67aSMarkus Armbruster# @stdio: standard I/O (since 1.5) 491a937b6aaSMarkus Armbruster# 49268eef67aSMarkus Armbruster# @console: Windows console (since 1.5) 493a937b6aaSMarkus Armbruster# 49468eef67aSMarkus Armbruster# @spicevmc: spice vm channel (since 1.5) 49568eef67aSMarkus Armbruster# 49668eef67aSMarkus Armbruster# @spiceport: Spice port channel (since 1.5) 49768eef67aSMarkus Armbruster# 49868eef67aSMarkus Armbruster# @qemu-vdagent: Spice vdagent (since 6.1) 49968eef67aSMarkus Armbruster# 50068eef67aSMarkus Armbruster# @dbus: D-Bus channel (since 7.0) 50168eef67aSMarkus Armbruster# 50268eef67aSMarkus Armbruster# @vc: virtual console (since 1.5) 50368eef67aSMarkus Armbruster# 50468eef67aSMarkus Armbruster# @ringbuf: memory ring buffer (since 1.6) 50568eef67aSMarkus Armbruster# 50668eef67aSMarkus Armbruster# @memory: synonym for @ringbuf (since 1.5) 5073218c0e9SMarkus Armbruster# 508b04c1228SMarkus Armbruster# Features: 509b04c1228SMarkus Armbruster# 510b04c1228SMarkus Armbruster# @deprecated: Member @memory is deprecated. Use @ringbuf instead. 511b04c1228SMarkus Armbruster# 5123218c0e9SMarkus Armbruster# Since: 1.4 5133218c0e9SMarkus Armbruster## 5143218c0e9SMarkus Armbruster{ 'enum': 'ChardevBackendKind', 5153218c0e9SMarkus Armbruster 'data': [ 'file', 516563799f6SMarkus Armbruster { 'name': 'serial', 'if': 'HAVE_CHARDEV_SERIAL' }, 517563799f6SMarkus Armbruster { 'name': 'parallel', 'if': 'HAVE_CHARDEV_PARALLEL' }, 5183218c0e9SMarkus Armbruster 'pipe', 5193218c0e9SMarkus Armbruster 'socket', 5203218c0e9SMarkus Armbruster 'udp', 5213218c0e9SMarkus Armbruster 'pty', 5223218c0e9SMarkus Armbruster 'null', 5233218c0e9SMarkus Armbruster 'mux', 5243218c0e9SMarkus Armbruster 'msmouse', 5253218c0e9SMarkus Armbruster 'wctablet', 526563799f6SMarkus Armbruster { 'name': 'braille', 'if': 'CONFIG_BRLAPI' }, 5273218c0e9SMarkus Armbruster 'testdev', 5283218c0e9SMarkus Armbruster 'stdio', 529563799f6SMarkus Armbruster { 'name': 'console', 'if': 'CONFIG_WIN32' }, 5303218c0e9SMarkus Armbruster { 'name': 'spicevmc', 'if': 'CONFIG_SPICE' }, 5313218c0e9SMarkus Armbruster { 'name': 'spiceport', 'if': 'CONFIG_SPICE' }, 5323218c0e9SMarkus Armbruster { 'name': 'qemu-vdagent', 'if': 'CONFIG_SPICE_PROTOCOL' }, 5333e301c8dSMarc-André Lureau { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }, 5343218c0e9SMarkus Armbruster 'vc', 5353218c0e9SMarkus Armbruster 'ringbuf', 536b04c1228SMarkus Armbruster { 'name': 'memory', 'features': [ 'deprecated' ] } ] } 5373218c0e9SMarkus Armbruster 5383218c0e9SMarkus Armbruster## 5393218c0e9SMarkus Armbruster# @ChardevFileWrapper: 5403218c0e9SMarkus Armbruster# 5412fecccbcSMarkus Armbruster# @data: Configuration info for file chardevs 5422fecccbcSMarkus Armbruster# 5433218c0e9SMarkus Armbruster# Since: 1.4 5443218c0e9SMarkus Armbruster## 5453218c0e9SMarkus Armbruster{ 'struct': 'ChardevFileWrapper', 5463218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevFile' } } 5473218c0e9SMarkus Armbruster 5483218c0e9SMarkus Armbruster## 5493218c0e9SMarkus Armbruster# @ChardevHostdevWrapper: 5503218c0e9SMarkus Armbruster# 5512fecccbcSMarkus Armbruster# @data: Configuration info for device and pipe chardevs 5522fecccbcSMarkus Armbruster# 5533218c0e9SMarkus Armbruster# Since: 1.4 5543218c0e9SMarkus Armbruster## 5553218c0e9SMarkus Armbruster{ 'struct': 'ChardevHostdevWrapper', 5563218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevHostdev' } } 5573218c0e9SMarkus Armbruster 5583218c0e9SMarkus Armbruster## 5593218c0e9SMarkus Armbruster# @ChardevSocketWrapper: 5603218c0e9SMarkus Armbruster# 5612fecccbcSMarkus Armbruster# @data: Configuration info for (stream) socket chardevs 5622fecccbcSMarkus Armbruster# 5633218c0e9SMarkus Armbruster# Since: 1.4 5643218c0e9SMarkus Armbruster## 5653218c0e9SMarkus Armbruster{ 'struct': 'ChardevSocketWrapper', 5663218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevSocket' } } 5673218c0e9SMarkus Armbruster 5683218c0e9SMarkus Armbruster## 5693218c0e9SMarkus Armbruster# @ChardevUdpWrapper: 5703218c0e9SMarkus Armbruster# 5712fecccbcSMarkus Armbruster# @data: Configuration info for datagram socket chardevs 5722fecccbcSMarkus Armbruster# 5733218c0e9SMarkus Armbruster# Since: 1.5 5743218c0e9SMarkus Armbruster## 5753218c0e9SMarkus Armbruster{ 'struct': 'ChardevUdpWrapper', 5763218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevUdp' } } 5773218c0e9SMarkus Armbruster 5783218c0e9SMarkus Armbruster## 5793218c0e9SMarkus Armbruster# @ChardevCommonWrapper: 5803218c0e9SMarkus Armbruster# 5812fecccbcSMarkus Armbruster# @data: Configuration shared across all chardev backends 5822fecccbcSMarkus Armbruster# 5833218c0e9SMarkus Armbruster# Since: 2.6 5843218c0e9SMarkus Armbruster## 5853218c0e9SMarkus Armbruster{ 'struct': 'ChardevCommonWrapper', 5863218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevCommon' } } 5873218c0e9SMarkus Armbruster 5883218c0e9SMarkus Armbruster## 5893218c0e9SMarkus Armbruster# @ChardevMuxWrapper: 5903218c0e9SMarkus Armbruster# 5912fecccbcSMarkus Armbruster# @data: Configuration info for mux chardevs 5922fecccbcSMarkus Armbruster# 5933218c0e9SMarkus Armbruster# Since: 1.5 5943218c0e9SMarkus Armbruster## 5953218c0e9SMarkus Armbruster{ 'struct': 'ChardevMuxWrapper', 5963218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevMux' } } 5973218c0e9SMarkus Armbruster 5983218c0e9SMarkus Armbruster## 5993218c0e9SMarkus Armbruster# @ChardevStdioWrapper: 6003218c0e9SMarkus Armbruster# 6012fecccbcSMarkus Armbruster# @data: Configuration info for stdio chardevs 6022fecccbcSMarkus Armbruster# 6033218c0e9SMarkus Armbruster# Since: 1.5 6043218c0e9SMarkus Armbruster## 6053218c0e9SMarkus Armbruster{ 'struct': 'ChardevStdioWrapper', 6063218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevStdio' } } 6073218c0e9SMarkus Armbruster 6083218c0e9SMarkus Armbruster## 6093218c0e9SMarkus Armbruster# @ChardevSpiceChannelWrapper: 6103218c0e9SMarkus Armbruster# 6112fecccbcSMarkus Armbruster# @data: Configuration info for spice vm channel chardevs 6122fecccbcSMarkus Armbruster# 6133218c0e9SMarkus Armbruster# Since: 1.5 6143218c0e9SMarkus Armbruster## 6153218c0e9SMarkus Armbruster{ 'struct': 'ChardevSpiceChannelWrapper', 6163218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevSpiceChannel' }, 6173218c0e9SMarkus Armbruster 'if': 'CONFIG_SPICE' } 6183218c0e9SMarkus Armbruster 6193218c0e9SMarkus Armbruster## 6203218c0e9SMarkus Armbruster# @ChardevSpicePortWrapper: 6213218c0e9SMarkus Armbruster# 6222fecccbcSMarkus Armbruster# @data: Configuration info for spice port chardevs 6232fecccbcSMarkus Armbruster# 6243218c0e9SMarkus Armbruster# Since: 1.5 6253218c0e9SMarkus Armbruster## 6263218c0e9SMarkus Armbruster{ 'struct': 'ChardevSpicePortWrapper', 6273218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevSpicePort' }, 6283218c0e9SMarkus Armbruster 'if': 'CONFIG_SPICE' } 6293218c0e9SMarkus Armbruster 6303218c0e9SMarkus Armbruster## 6313218c0e9SMarkus Armbruster# @ChardevQemuVDAgentWrapper: 6323218c0e9SMarkus Armbruster# 6332fecccbcSMarkus Armbruster# @data: Configuration info for qemu vdagent implementation 6342fecccbcSMarkus Armbruster# 6353218c0e9SMarkus Armbruster# Since: 6.1 6363218c0e9SMarkus Armbruster## 6373218c0e9SMarkus Armbruster{ 'struct': 'ChardevQemuVDAgentWrapper', 6383218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevQemuVDAgent' }, 6393218c0e9SMarkus Armbruster 'if': 'CONFIG_SPICE_PROTOCOL' } 6403218c0e9SMarkus Armbruster 6413218c0e9SMarkus Armbruster## 6423e301c8dSMarc-André Lureau# @ChardevDBusWrapper: 6433e301c8dSMarc-André Lureau# 6442fecccbcSMarkus Armbruster# @data: Configuration info for DBus chardevs 6452fecccbcSMarkus Armbruster# 6463e301c8dSMarc-André Lureau# Since: 7.0 6473e301c8dSMarc-André Lureau## 6483e301c8dSMarc-André Lureau{ 'struct': 'ChardevDBusWrapper', 6493e301c8dSMarc-André Lureau 'data': { 'data': 'ChardevDBus' }, 6503e301c8dSMarc-André Lureau 'if': 'CONFIG_DBUS_DISPLAY' } 6513e301c8dSMarc-André Lureau 6523e301c8dSMarc-André Lureau## 6533218c0e9SMarkus Armbruster# @ChardevVCWrapper: 6543218c0e9SMarkus Armbruster# 6552fecccbcSMarkus Armbruster# @data: Configuration info for virtual console chardevs 6562fecccbcSMarkus Armbruster# 6573218c0e9SMarkus Armbruster# Since: 1.5 6583218c0e9SMarkus Armbruster## 6593218c0e9SMarkus Armbruster{ 'struct': 'ChardevVCWrapper', 6603218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevVC' } } 6613218c0e9SMarkus Armbruster 6623218c0e9SMarkus Armbruster## 6633218c0e9SMarkus Armbruster# @ChardevRingbufWrapper: 6643218c0e9SMarkus Armbruster# 6652fecccbcSMarkus Armbruster# @data: Configuration info for ring buffer chardevs 6662fecccbcSMarkus Armbruster# 6673218c0e9SMarkus Armbruster# Since: 1.5 6683218c0e9SMarkus Armbruster## 6693218c0e9SMarkus Armbruster{ 'struct': 'ChardevRingbufWrapper', 6703218c0e9SMarkus Armbruster 'data': { 'data': 'ChardevRingbuf' } } 6713218c0e9SMarkus Armbruster 672*b74cb876SOctavian Purdila 673*b74cb876SOctavian Purdila## 674*b74cb876SOctavian Purdila# @ChardevPtyWrapper: 675*b74cb876SOctavian Purdila# 676*b74cb876SOctavian Purdila# @data: Configuration info for pty chardevs 677*b74cb876SOctavian Purdila# 678*b74cb876SOctavian Purdila# Since: 9.2 679*b74cb876SOctavian Purdila## 680*b74cb876SOctavian Purdila{ 'struct': 'ChardevPtyWrapper', 681*b74cb876SOctavian Purdila 'data': { 'data': 'ChardevPty' } } 682*b74cb876SOctavian Purdila 6833218c0e9SMarkus Armbruster## 684dbeee392SMarkus Armbruster# @ChardevBackend: 685dbeee392SMarkus Armbruster# 686dbeee392SMarkus Armbruster# Configuration info for the new chardev backend. 687dbeee392SMarkus Armbruster# 68889a2273bSMarkus Armbruster# @type: backend type 68989a2273bSMarkus Armbruster# 6903218c0e9SMarkus Armbruster# Since: 1.4 691dbeee392SMarkus Armbruster## 692b0ddeba2SMarc-André Lureau{ 'union': 'ChardevBackend', 6933218c0e9SMarkus Armbruster 'base': { 'type': 'ChardevBackendKind' }, 6943218c0e9SMarkus Armbruster 'discriminator': 'type', 6953218c0e9SMarkus Armbruster 'data': { 'file': 'ChardevFileWrapper', 696563799f6SMarkus Armbruster 'serial': { 'type': 'ChardevHostdevWrapper', 697563799f6SMarkus Armbruster 'if': 'HAVE_CHARDEV_SERIAL' }, 698563799f6SMarkus Armbruster 'parallel': { 'type': 'ChardevHostdevWrapper', 699563799f6SMarkus Armbruster 'if': 'HAVE_CHARDEV_PARALLEL' }, 7003218c0e9SMarkus Armbruster 'pipe': 'ChardevHostdevWrapper', 7013218c0e9SMarkus Armbruster 'socket': 'ChardevSocketWrapper', 7023218c0e9SMarkus Armbruster 'udp': 'ChardevUdpWrapper', 703*b74cb876SOctavian Purdila 'pty': 'ChardevPtyWrapper', 7043218c0e9SMarkus Armbruster 'null': 'ChardevCommonWrapper', 7053218c0e9SMarkus Armbruster 'mux': 'ChardevMuxWrapper', 7063218c0e9SMarkus Armbruster 'msmouse': 'ChardevCommonWrapper', 7073218c0e9SMarkus Armbruster 'wctablet': 'ChardevCommonWrapper', 708563799f6SMarkus Armbruster 'braille': { 'type': 'ChardevCommonWrapper', 709563799f6SMarkus Armbruster 'if': 'CONFIG_BRLAPI' }, 7103218c0e9SMarkus Armbruster 'testdev': 'ChardevCommonWrapper', 7113218c0e9SMarkus Armbruster 'stdio': 'ChardevStdioWrapper', 712563799f6SMarkus Armbruster 'console': { 'type': 'ChardevCommonWrapper', 713563799f6SMarkus Armbruster 'if': 'CONFIG_WIN32' }, 7143218c0e9SMarkus Armbruster 'spicevmc': { 'type': 'ChardevSpiceChannelWrapper', 7158a9f1e1dSMarc-André Lureau 'if': 'CONFIG_SPICE' }, 7163218c0e9SMarkus Armbruster 'spiceport': { 'type': 'ChardevSpicePortWrapper', 7178a9f1e1dSMarc-André Lureau 'if': 'CONFIG_SPICE' }, 7183218c0e9SMarkus Armbruster 'qemu-vdagent': { 'type': 'ChardevQemuVDAgentWrapper', 7198a9f1e1dSMarc-André Lureau 'if': 'CONFIG_SPICE_PROTOCOL' }, 7203e301c8dSMarc-André Lureau 'dbus': { 'type': 'ChardevDBusWrapper', 7213e301c8dSMarc-André Lureau 'if': 'CONFIG_DBUS_DISPLAY' }, 7223218c0e9SMarkus Armbruster 'vc': 'ChardevVCWrapper', 7233218c0e9SMarkus Armbruster 'ringbuf': 'ChardevRingbufWrapper', 7243218c0e9SMarkus Armbruster 'memory': 'ChardevRingbufWrapper' } } 725dbeee392SMarkus Armbruster 726dbeee392SMarkus Armbruster## 727dbeee392SMarkus Armbruster# @ChardevReturn: 728dbeee392SMarkus Armbruster# 729dbeee392SMarkus Armbruster# Return info about the chardev backend just created. 730dbeee392SMarkus Armbruster# 731a937b6aaSMarkus Armbruster# @pty: name of the slave pseudoterminal device, present if and only 732a937b6aaSMarkus Armbruster# if a chardev of type 'pty' was created 733dbeee392SMarkus Armbruster# 734dbeee392SMarkus Armbruster# Since: 1.4 735dbeee392SMarkus Armbruster## 736b0ddeba2SMarc-André Lureau{ 'struct' : 'ChardevReturn', 737b0ddeba2SMarc-André Lureau 'data': { '*pty': 'str' } } 738dbeee392SMarkus Armbruster 739dbeee392SMarkus Armbruster## 740dbeee392SMarkus Armbruster# @chardev-add: 741dbeee392SMarkus Armbruster# 742dbeee392SMarkus Armbruster# Add a character device backend 743dbeee392SMarkus Armbruster# 744dbeee392SMarkus Armbruster# @id: the chardev's ID, must be unique 745a937b6aaSMarkus Armbruster# 746dbeee392SMarkus Armbruster# @backend: backend type and parameters 747dbeee392SMarkus Armbruster# 748dbeee392SMarkus Armbruster# Returns: ChardevReturn. 749dbeee392SMarkus Armbruster# 750dbeee392SMarkus Armbruster# Since: 1.4 751dbeee392SMarkus Armbruster# 75214b48aaaSJohn Snow# .. qmp-example:: 753dbeee392SMarkus Armbruster# 754dbeee392SMarkus Armbruster# -> { "execute" : "chardev-add", 755dbeee392SMarkus Armbruster# "arguments" : { "id" : "foo", 756dbeee392SMarkus Armbruster# "backend" : { "type" : "null", "data" : {} } } } 757dbeee392SMarkus Armbruster# <- { "return": {} } 758dbeee392SMarkus Armbruster# 75914b48aaaSJohn Snow# .. qmp-example:: 76014b48aaaSJohn Snow# 761dbeee392SMarkus Armbruster# -> { "execute" : "chardev-add", 762dbeee392SMarkus Armbruster# "arguments" : { "id" : "bar", 763dbeee392SMarkus Armbruster# "backend" : { "type" : "file", 764dbeee392SMarkus Armbruster# "data" : { "out" : "/tmp/bar.log" } } } } 765dbeee392SMarkus Armbruster# <- { "return": {} } 766dbeee392SMarkus Armbruster# 76714b48aaaSJohn Snow# .. qmp-example:: 76814b48aaaSJohn Snow# 769dbeee392SMarkus Armbruster# -> { "execute" : "chardev-add", 770dbeee392SMarkus Armbruster# "arguments" : { "id" : "baz", 771dbeee392SMarkus Armbruster# "backend" : { "type" : "pty", "data" : {} } } } 772dbeee392SMarkus Armbruster# <- { "return": { "pty" : "/dev/pty/42" } } 773dbeee392SMarkus Armbruster## 774b0ddeba2SMarc-André Lureau{ 'command': 'chardev-add', 775b0ddeba2SMarc-André Lureau 'data': { 'id': 'str', 776dbeee392SMarkus Armbruster 'backend': 'ChardevBackend' }, 777dbeee392SMarkus Armbruster 'returns': 'ChardevReturn' } 778dbeee392SMarkus Armbruster 779dbeee392SMarkus Armbruster## 780dbeee392SMarkus Armbruster# @chardev-change: 781dbeee392SMarkus Armbruster# 782dbeee392SMarkus Armbruster# Change a character device backend 783dbeee392SMarkus Armbruster# 784dbeee392SMarkus Armbruster# @id: the chardev's ID, must exist 785a937b6aaSMarkus Armbruster# 786dbeee392SMarkus Armbruster# @backend: new backend type and parameters 787dbeee392SMarkus Armbruster# 788dbeee392SMarkus Armbruster# Returns: ChardevReturn. 789dbeee392SMarkus Armbruster# 790dbeee392SMarkus Armbruster# Since: 2.10 791dbeee392SMarkus Armbruster# 79214b48aaaSJohn Snow# .. qmp-example:: 793dbeee392SMarkus Armbruster# 794dbeee392SMarkus Armbruster# -> { "execute" : "chardev-change", 795dbeee392SMarkus Armbruster# "arguments" : { "id" : "baz", 796dbeee392SMarkus Armbruster# "backend" : { "type" : "pty", "data" : {} } } } 797dbeee392SMarkus Armbruster# <- { "return": { "pty" : "/dev/pty/42" } } 798dbeee392SMarkus Armbruster# 79914b48aaaSJohn Snow# .. qmp-example:: 80014b48aaaSJohn Snow# 801dbeee392SMarkus Armbruster# -> {"execute" : "chardev-change", 802dbeee392SMarkus Armbruster# "arguments" : { 803dbeee392SMarkus Armbruster# "id" : "charchannel2", 804dbeee392SMarkus Armbruster# "backend" : { 805dbeee392SMarkus Armbruster# "type" : "socket", 806dbeee392SMarkus Armbruster# "data" : { 807dbeee392SMarkus Armbruster# "addr" : { 808dbeee392SMarkus Armbruster# "type" : "unix" , 809dbeee392SMarkus Armbruster# "data" : { 810dbeee392SMarkus Armbruster# "path" : "/tmp/charchannel2.socket" 811dbeee392SMarkus Armbruster# } 812dbeee392SMarkus Armbruster# }, 813dbeee392SMarkus Armbruster# "server" : true, 814dbeee392SMarkus Armbruster# "wait" : false }}}} 815dbeee392SMarkus Armbruster# <- {"return": {}} 816dbeee392SMarkus Armbruster## 817b0ddeba2SMarc-André Lureau{ 'command': 'chardev-change', 818b0ddeba2SMarc-André Lureau 'data': { 'id': 'str', 819dbeee392SMarkus Armbruster 'backend': 'ChardevBackend' }, 820dbeee392SMarkus Armbruster 'returns': 'ChardevReturn' } 821dbeee392SMarkus Armbruster 822dbeee392SMarkus Armbruster## 823dbeee392SMarkus Armbruster# @chardev-remove: 824dbeee392SMarkus Armbruster# 825dbeee392SMarkus Armbruster# Remove a character device backend 826dbeee392SMarkus Armbruster# 827dbeee392SMarkus Armbruster# @id: the chardev's ID, must exist and not be in use 828dbeee392SMarkus Armbruster# 829dbeee392SMarkus Armbruster# Since: 1.4 830dbeee392SMarkus Armbruster# 83114b48aaaSJohn Snow# .. qmp-example:: 832dbeee392SMarkus Armbruster# 833dbeee392SMarkus Armbruster# -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } 834dbeee392SMarkus Armbruster# <- { "return": {} } 835dbeee392SMarkus Armbruster## 836b0ddeba2SMarc-André Lureau{ 'command': 'chardev-remove', 837b0ddeba2SMarc-André Lureau 'data': { 'id': 'str' } } 838dbeee392SMarkus Armbruster 839dbeee392SMarkus Armbruster## 840dbeee392SMarkus Armbruster# @chardev-send-break: 841dbeee392SMarkus Armbruster# 842dbeee392SMarkus Armbruster# Send a break to a character device 843dbeee392SMarkus Armbruster# 844dbeee392SMarkus Armbruster# @id: the chardev's ID, must exist 845dbeee392SMarkus Armbruster# 846dbeee392SMarkus Armbruster# Since: 2.10 847dbeee392SMarkus Armbruster# 84814b48aaaSJohn Snow# .. qmp-example:: 849dbeee392SMarkus Armbruster# 850dbeee392SMarkus Armbruster# -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } } 851dbeee392SMarkus Armbruster# <- { "return": {} } 852dbeee392SMarkus Armbruster## 853b0ddeba2SMarc-André Lureau{ 'command': 'chardev-send-break', 854b0ddeba2SMarc-André Lureau 'data': { 'id': 'str' } } 855dbeee392SMarkus Armbruster 856dbeee392SMarkus Armbruster## 857dbeee392SMarkus Armbruster# @VSERPORT_CHANGE: 858dbeee392SMarkus Armbruster# 859dbeee392SMarkus Armbruster# Emitted when the guest opens or closes a virtio-serial port. 860dbeee392SMarkus Armbruster# 861dbeee392SMarkus Armbruster# @id: device identifier of the virtio-serial port 862dbeee392SMarkus Armbruster# 863dbeee392SMarkus Armbruster# @open: true if the guest has opened the virtio-serial port 864dbeee392SMarkus Armbruster# 865d461c279SJohn Snow# .. note:: This event is rate-limited. 866382bd1cbSMarkus Armbruster# 867dbeee392SMarkus Armbruster# Since: 2.1 868dbeee392SMarkus Armbruster# 86914b48aaaSJohn Snow# .. qmp-example:: 870dbeee392SMarkus Armbruster# 871dbeee392SMarkus Armbruster# <- { "event": "VSERPORT_CHANGE", 872dbeee392SMarkus Armbruster# "data": { "id": "channel0", "open": true }, 873dbeee392SMarkus Armbruster# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } } 874dbeee392SMarkus Armbruster## 875dbeee392SMarkus Armbruster{ 'event': 'VSERPORT_CHANGE', 876b0ddeba2SMarc-André Lureau 'data': { 'id': 'str', 877b0ddeba2SMarc-André Lureau 'open': 'bool' } } 878