master
json 915 lines 20.8 KB
Raw
1 # -*- Mode: Python -*-
2 # vim: filetype=python
3 #
4
5 ##
6 # *****************
7 # Character devices
8 # *****************
9 ##
10
11 { 'include': 'sockets.json' }
12
13 ##
14 # @ChardevInfo:
15 #
16 # Information about a character device.
17 #
18 # @label: the label of the character device
19 #
20 # @filename: the filename of the character device
21 #
22 # @frontend-open: shows whether the frontend device attached to this
23 # backend (e.g. with the chardev=... option) is in open or closed
24 # state (since 2.1)
25 #
26 # .. note:: @filename is encoded using the QEMU command line character
27 # device encoding. See the QEMU man page for details.
28 #
29 # Since: 0.14
30 ##
31 { 'struct': 'ChardevInfo',
32 'data': { 'label': 'str',
33 'filename': 'str',
34 'frontend-open': 'bool' } }
35
36 ##
37 # @query-chardev:
38 #
39 # Return information about current character devices.
40 #
41 # Since: 0.14
42 #
43 # .. qmp-example::
44 #
45 # -> { "execute": "query-chardev" }
46 # <- {
47 # "return": [
48 # {
49 # "label": "charchannel0",
50 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server=on",
51 # "frontend-open": false
52 # },
53 # {
54 # "label": "charmonitor",
55 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server=on",
56 # "frontend-open": true
57 # },
58 # {
59 # "label": "charserial0",
60 # "filename": "pty:/dev/pts/2",
61 # "frontend-open": true
62 # }
63 # ]
64 # }
65 ##
66 { 'command': 'query-chardev', 'returns': ['ChardevInfo'],
67 'allow-preconfig': true }
68
69 ##
70 # @ChardevBackendInfo:
71 #
72 # Information about a character device backend
73 #
74 # @name: The backend name
75 #
76 # Since: 2.0
77 ##
78 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
79
80 ##
81 # @query-chardev-backends:
82 #
83 # Return information about character device backends.
84 #
85 # Since: 2.0
86 #
87 # .. qmp-example::
88 #
89 # -> { "execute": "query-chardev-backends" }
90 # <- {
91 # "return":[
92 # {
93 # "name":"udp"
94 # },
95 # {
96 # "name":"tcp"
97 # },
98 # {
99 # "name":"unix"
100 # },
101 # {
102 # "name":"spiceport"
103 # }
104 # ]
105 # }
106 ##
107 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
108
109 ##
110 # @DataFormat:
111 #
112 # An enumeration of data format.
113 #
114 # @utf8: Data is a UTF-8 string (RFC 3629)
115 #
116 # @base64: Data is Base64 encoded binary (RFC 3548)
117 #
118 # Since: 1.4
119 ##
120 { 'enum': 'DataFormat',
121 'data': [ 'utf8', 'base64' ] }
122
123 ##
124 # @ringbuf-write:
125 #
126 # Write to a ring buffer character device.
127 #
128 # @device: the ring buffer character device name
129 #
130 # @data: data to write
131 #
132 # @format: data encoding (default 'utf8').
133 #
134 # - base64: data must be base64 encoded text. Its binary decoding
135 # gets written.
136 # - utf8: data's UTF-8 encoding is written
137 # - data itself is always Unicode regardless of format, like any
138 # other string.
139 #
140 # Since: 1.4
141 #
142 # .. qmp-example::
143 #
144 # -> { "execute": "ringbuf-write",
145 # "arguments": { "device": "foo",
146 # "data": "abcdefgh",
147 # "format": "utf8" } }
148 # <- { "return": {} }
149 ##
150 { 'command': 'ringbuf-write',
151 'data': { 'device': 'str',
152 'data': 'str',
153 '*format': 'DataFormat'} }
154
155 ##
156 # @ringbuf-read:
157 #
158 # Read from a ring buffer character device.
159 #
160 # @device: the ring buffer character device name
161 #
162 # @size: how many bytes to read at most
163 #
164 # @format: data encoding (default 'utf8').
165 #
166 # - base64: the data read is returned in base64 encoding.
167 # - utf8: the data read is interpreted as UTF-8.
168 # Bug: can screw up when the buffer contains invalid UTF-8
169 # sequences, NUL characters, after the ring buffer lost data,
170 # and when reading stops because the size limit is reached.
171 # - The return value is always Unicode regardless of format, like
172 # any other string.
173 #
174 # Returns: data read from the device
175 #
176 # Since: 1.4
177 #
178 # .. qmp-example::
179 #
180 # -> { "execute": "ringbuf-read",
181 # "arguments": { "device": "foo",
182 # "size": 1000,
183 # "format": "utf8" } }
184 # <- { "return": "abcdefgh" }
185 ##
186 { 'command': 'ringbuf-read',
187 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
188 'returns': 'str' }
189
190 ##
191 # @ChardevCommon:
192 #
193 # Configuration shared across all chardev backends
194 #
195 # @logfile: The name of a logfile to save output
196 #
197 # @logappend: true to append instead of truncate (default to false to
198 # truncate)
199 #
200 # @logtimestamp: true to insert timestamps into logfile
201 # (default false) (since 11.0)
202 #
203 # Since: 2.6
204 ##
205 { 'struct': 'ChardevCommon',
206 'data': { '*logfile': 'str',
207 '*logappend': 'bool',
208 '*logtimestamp': 'bool' } }
209
210 ##
211 # @ChardevFile:
212 #
213 # Configuration info for file chardevs.
214 #
215 # @in: The name of the input file
216 #
217 # @out: The name of the output file
218 #
219 # @append: Open the file in append mode (default false to truncate)
220 # (Since 2.6)
221 #
222 # Since: 1.4
223 ##
224 { 'struct': 'ChardevFile',
225 'data': { '*in': 'str',
226 'out': 'str',
227 '*append': 'bool' },
228 'base': 'ChardevCommon' }
229
230 ##
231 # @ChardevHostdev:
232 #
233 # Configuration info for device and pipe chardevs.
234 #
235 # @device: The name of the special file for the device, i.e.
236 # /dev/ttyS0 on Unix or COM1: on Windows
237 #
238 # Since: 1.4
239 ##
240 { 'struct': 'ChardevHostdev',
241 'data': { 'device': 'str' },
242 'base': 'ChardevCommon' }
243
244 ##
245 # @ChardevSocket:
246 #
247 # Configuration info for (stream) socket chardevs.
248 #
249 # @addr: socket address to listen on (server=true) or connect to
250 # (server=false)
251 #
252 # @tls-creds: the ID of the TLS credentials object (since 2.6)
253 #
254 # @tls-authz: the ID of the QAuthZ authorization object against which
255 # the client's x509 distinguished name will be validated. This
256 # object is only resolved at time of use, so can be deleted and
257 # recreated on the fly while the chardev server is active. If
258 # missing, it will default to denying access (since 4.0)
259 #
260 # @server: create server socket (default: true)
261 #
262 # @wait: wait for incoming connection on server sockets (default:
263 # false). Silently ignored with server: false. This use is
264 # deprecated.
265 #
266 # @nodelay: set TCP_NODELAY socket option (default: false)
267 #
268 # @telnet: enable telnet protocol on server sockets (default: false)
269 #
270 # @tn3270: enable tn3270 protocol on server sockets (default: false)
271 # (Since: 2.10)
272 #
273 # @websocket: enable websocket protocol on server sockets
274 # (default: false) (Since: 3.1)
275 #
276 # @reconnect-ms: For a client socket, if a socket is disconnected,
277 # then attempt a reconnect after the given number of milliseconds.
278 # Setting this to zero disables this function.
279 # (default: 0) (Since: 9.2)
280 #
281 # Since: 1.4
282 ##
283 { 'struct': 'ChardevSocket',
284 'data': { 'addr': 'SocketAddressLegacy',
285 '*tls-creds': 'str',
286 '*tls-authz' : 'str',
287 '*server': 'bool',
288 '*wait': 'bool',
289 '*nodelay': 'bool',
290 '*telnet': 'bool',
291 '*tn3270': 'bool',
292 '*websocket': 'bool',
293 '*reconnect-ms': 'int' },
294 'base': 'ChardevCommon' }
295
296 ##
297 # @ChardevUdp:
298 #
299 # Configuration info for datagram socket chardevs.
300 #
301 # @remote: remote address
302 #
303 # @local: local address
304 #
305 # Since: 1.5
306 ##
307 { 'struct': 'ChardevUdp',
308 'data': { 'remote': 'SocketAddressLegacy',
309 '*local': 'SocketAddressLegacy' },
310 'base': 'ChardevCommon' }
311
312 ##
313 # @ChardevMux:
314 #
315 # Configuration info for mux chardevs.
316 #
317 # @chardev: name of the base chardev.
318 #
319 # Since: 1.5
320 ##
321 { 'struct': 'ChardevMux',
322 'data': { 'chardev': 'str' },
323 'base': 'ChardevCommon' }
324
325 ##
326 # @ChardevHub:
327 #
328 # Configuration info for hub chardevs.
329 #
330 # @chardevs: IDs to be added to this hub (maximum 4 devices).
331 #
332 # Since: 10.0
333 ##
334 { 'struct': 'ChardevHub',
335 'data': { 'chardevs': ['str'] },
336 'base': 'ChardevCommon' }
337
338 ##
339 # @ChardevStdio:
340 #
341 # Configuration info for stdio chardevs.
342 #
343 # @signal: Allow signals (such as SIGINT triggered by ^C) be delivered
344 # to QEMU. Default: true.
345 #
346 # Since: 1.5
347 ##
348 { 'struct': 'ChardevStdio',
349 'data': { '*signal': 'bool' },
350 'base': 'ChardevCommon' }
351
352 ##
353 # @ChardevSpiceChannel:
354 #
355 # Configuration info for spice vm channel chardevs.
356 #
357 # @type: kind of channel (for example vdagent).
358 #
359 # Since: 1.5
360 ##
361 { 'struct': 'ChardevSpiceChannel',
362 'data': { 'type': 'str' },
363 'base': 'ChardevCommon',
364 'if': 'CONFIG_SPICE' }
365
366 ##
367 # @ChardevSpicePort:
368 #
369 # Configuration info for spice port chardevs.
370 #
371 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
372 #
373 # Since: 1.5
374 ##
375 { 'struct': 'ChardevSpicePort',
376 'data': { 'fqdn': 'str' },
377 'base': 'ChardevCommon',
378 'if': 'CONFIG_SPICE' }
379
380 ##
381 # @ChardevVCEncoding:
382 #
383 # Character encoding expected from the guest on a virtual console.
384 #
385 # @cp437: CP437 (8-bit Extended ASCII / VGA). Every byte maps
386 # directly to a glyph; suitable for DOS or other guests that
387 # output raw CP437.
388 #
389 # @utf8: UTF-8. Multi-byte sequences are decoded and then mapped
390 # back to CP437 glyphs for display; unmappable codepoints are
391 # shown as '?'. Suitable for modern Linux guests.
392 #
393 # Since: 11.1
394 ##
395 { 'enum': 'ChardevVCEncoding',
396 'data': [ 'cp437', 'utf8' ] }
397
398 ##
399 # @ChardevDBus:
400 #
401 # Configuration info for DBus chardevs.
402 #
403 # @name: name of the channel (following docs/spice-port-fqdn.txt)
404 #
405 # @encoding: character encoding the guest is expected to use
406 # (since 11.1)
407 #
408 # Since: 7.0
409 ##
410 { 'struct': 'ChardevDBus',
411 'data': { 'name': 'str',
412 '*encoding': 'ChardevVCEncoding' },
413 'base': 'ChardevCommon',
414 'if': 'CONFIG_DBUS_DISPLAY' }
415
416 ##
417 # @ChardevVC:
418 #
419 # Configuration info for virtual console chardevs.
420 #
421 # @width: console width, in pixels
422 #
423 # @height: console height, in pixels
424 #
425 # @cols: console width, in chars
426 #
427 # @rows: console height, in chars
428 #
429 # @encoding: character encoding the guest is expected to use
430 # (since 11.1)
431 #
432 # .. note:: The options are only effective when the VNC or SDL
433 # graphical display backend is active. They are ignored with the
434 # GTK, Spice, VNC and D-Bus display backends.
435 #
436 # Since: 1.5
437 ##
438 { 'struct': 'ChardevVC',
439 'data': { '*width': 'int',
440 '*height': 'int',
441 '*cols': 'int',
442 '*rows': 'int',
443 '*encoding': 'ChardevVCEncoding' },
444 'base': 'ChardevCommon' }
445
446 ##
447 # @ChardevRingbuf:
448 #
449 # Configuration info for ring buffer chardevs.
450 #
451 # @size: ring buffer size, must be power of two, default is 65536
452 #
453 # Since: 1.5
454 ##
455 { 'struct': 'ChardevRingbuf',
456 'data': { '*size': 'int' },
457 'base': 'ChardevCommon' }
458
459 ##
460 # @ChardevQemuVDAgent:
461 #
462 # Configuration info for QEMU vdagent implementation.
463 #
464 # @mouse: enable/disable mouse, default is enabled.
465 #
466 # @clipboard: enable/disable clipboard, default is disabled.
467 #
468 # Since: 6.1
469 ##
470 { 'struct': 'ChardevQemuVDAgent',
471 'data': { '*mouse': 'bool',
472 '*clipboard': 'bool' },
473 'base': 'ChardevCommon',
474 'if': 'CONFIG_SPICE_PROTOCOL' }
475
476 ##
477 # @ChardevPty:
478 #
479 # Configuration info for pty implementation.
480 #
481 # @path: optional path to create a symbolic link that points to the
482 # allocated PTY
483 #
484 # Since: 9.2
485 ##
486 { 'struct': 'ChardevPty',
487 'data': { '*path': 'str' },
488 'base': 'ChardevCommon' }
489
490 ##
491 # @ChardevBackendKind:
492 #
493 # @file: regular files
494 #
495 # @serial: serial host device
496 #
497 # @parallel: parallel host device
498 #
499 # @pipe: pipes (since 1.5)
500 #
501 # @socket: stream socket
502 #
503 # @udp: datagram socket (since 1.5)
504 #
505 # @pty: pseudo-terminal
506 #
507 # @null: provides no input, throws away output
508 #
509 # @mux: (since 1.5)
510 #
511 # @hub: (since 10.0)
512 #
513 # @msmouse: emulated Microsoft serial mouse (since 1.5)
514 #
515 # @wctablet: emulated Wacom Penpartner serial tablet (since 2.9)
516 #
517 # @braille: Baum Braille device (since 1.5)
518 #
519 # @testdev: device for test-suite control (since 2.2)
520 #
521 # @stdio: standard I/O (since 1.5)
522 #
523 # @console: Windows console (since 1.5)
524 #
525 # @spicevmc: spice vm channel (since 1.5)
526 #
527 # @spiceport: Spice port channel (since 1.5)
528 #
529 # @qemu-vdagent: Spice vdagent (since 6.1)
530 #
531 # @dbus: D-Bus channel (since 7.0)
532 #
533 # @vc: virtual console (since 1.5)
534 #
535 # @ringbuf: memory ring buffer (since 1.6)
536 #
537 # @memory: synonym for @ringbuf (since 1.5)
538 #
539 # Features:
540 #
541 # @deprecated: Member @memory is deprecated. Use @ringbuf instead.
542 #
543 # Since: 1.4
544 ##
545 { 'enum': 'ChardevBackendKind',
546 'data': [ 'file',
547 { 'name': 'serial', 'if': 'HAVE_CHARDEV_SERIAL' },
548 { 'name': 'parallel', 'if': 'HAVE_CHARDEV_PARALLEL' },
549 'pipe',
550 'socket',
551 'udp',
552 'pty',
553 'null',
554 'mux',
555 'hub',
556 'msmouse',
557 'wctablet',
558 { 'name': 'braille', 'if': 'CONFIG_BRLAPI' },
559 'testdev',
560 'stdio',
561 { 'name': 'console', 'if': 'CONFIG_WIN32' },
562 { 'name': 'spicevmc', 'if': 'CONFIG_SPICE' },
563 { 'name': 'spiceport', 'if': 'CONFIG_SPICE' },
564 { 'name': 'qemu-vdagent', 'if': 'CONFIG_SPICE_PROTOCOL' },
565 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' },
566 'vc',
567 'ringbuf',
568 { 'name': 'memory', 'features': [ 'deprecated' ] } ] }
569
570 ##
571 # @ChardevFileWrapper:
572 #
573 # @data: Configuration info for file chardevs
574 #
575 # Since: 1.4
576 ##
577 { 'struct': 'ChardevFileWrapper',
578 'data': { 'data': 'ChardevFile' } }
579
580 ##
581 # @ChardevHostdevWrapper:
582 #
583 # @data: Configuration info for device and pipe chardevs
584 #
585 # Since: 1.4
586 ##
587 { 'struct': 'ChardevHostdevWrapper',
588 'data': { 'data': 'ChardevHostdev' } }
589
590 ##
591 # @ChardevSocketWrapper:
592 #
593 # @data: Configuration info for (stream) socket chardevs
594 #
595 # Since: 1.4
596 ##
597 { 'struct': 'ChardevSocketWrapper',
598 'data': { 'data': 'ChardevSocket' } }
599
600 ##
601 # @ChardevUdpWrapper:
602 #
603 # @data: Configuration info for datagram socket chardevs
604 #
605 # Since: 1.5
606 ##
607 { 'struct': 'ChardevUdpWrapper',
608 'data': { 'data': 'ChardevUdp' } }
609
610 ##
611 # @ChardevCommonWrapper:
612 #
613 # @data: Configuration shared across all chardev backends
614 #
615 # Since: 2.6
616 ##
617 { 'struct': 'ChardevCommonWrapper',
618 'data': { 'data': 'ChardevCommon' } }
619
620 ##
621 # @ChardevMuxWrapper:
622 #
623 # @data: Configuration info for mux chardevs
624 #
625 # Since: 1.5
626 ##
627 { 'struct': 'ChardevMuxWrapper',
628 'data': { 'data': 'ChardevMux' } }
629
630 ##
631 # @ChardevHubWrapper:
632 #
633 # @data: Configuration info for hub chardevs
634 #
635 # Since: 10.0
636 ##
637 { 'struct': 'ChardevHubWrapper',
638 'data': { 'data': 'ChardevHub' } }
639
640 ##
641 # @ChardevStdioWrapper:
642 #
643 # @data: Configuration info for stdio chardevs
644 #
645 # Since: 1.5
646 ##
647 { 'struct': 'ChardevStdioWrapper',
648 'data': { 'data': 'ChardevStdio' } }
649
650 ##
651 # @ChardevSpiceChannelWrapper:
652 #
653 # @data: Configuration info for spice vm channel chardevs
654 #
655 # Since: 1.5
656 ##
657 { 'struct': 'ChardevSpiceChannelWrapper',
658 'data': { 'data': 'ChardevSpiceChannel' },
659 'if': 'CONFIG_SPICE' }
660
661 ##
662 # @ChardevSpicePortWrapper:
663 #
664 # @data: Configuration info for spice port chardevs
665 #
666 # Since: 1.5
667 ##
668 { 'struct': 'ChardevSpicePortWrapper',
669 'data': { 'data': 'ChardevSpicePort' },
670 'if': 'CONFIG_SPICE' }
671
672 ##
673 # @ChardevQemuVDAgentWrapper:
674 #
675 # @data: Configuration info for QEMU vdagent implementation
676 #
677 # Since: 6.1
678 ##
679 { 'struct': 'ChardevQemuVDAgentWrapper',
680 'data': { 'data': 'ChardevQemuVDAgent' },
681 'if': 'CONFIG_SPICE_PROTOCOL' }
682
683 ##
684 # @ChardevDBusWrapper:
685 #
686 # @data: Configuration info for DBus chardevs
687 #
688 # Since: 7.0
689 ##
690 { 'struct': 'ChardevDBusWrapper',
691 'data': { 'data': 'ChardevDBus' },
692 'if': 'CONFIG_DBUS_DISPLAY' }
693
694 ##
695 # @ChardevVCWrapper:
696 #
697 # @data: Configuration info for virtual console chardevs
698 #
699 # Since: 1.5
700 ##
701 { 'struct': 'ChardevVCWrapper',
702 'data': { 'data': 'ChardevVC' } }
703
704 ##
705 # @ChardevRingbufWrapper:
706 #
707 # @data: Configuration info for ring buffer chardevs
708 #
709 # Since: 1.5
710 ##
711 { 'struct': 'ChardevRingbufWrapper',
712 'data': { 'data': 'ChardevRingbuf' } }
713
714 ##
715 # @ChardevPtyWrapper:
716 #
717 # @data: Configuration info for pty chardevs
718 #
719 # Since: 9.2
720 ##
721 { 'struct': 'ChardevPtyWrapper',
722 'data': { 'data': 'ChardevPty' } }
723
724 ##
725 # @ChardevBackend:
726 #
727 # Configuration info for the new chardev backend.
728 #
729 # @type: backend type
730 #
731 # Since: 1.4
732 ##
733 { 'union': 'ChardevBackend',
734 'base': { 'type': 'ChardevBackendKind' },
735 'discriminator': 'type',
736 'data': { 'file': 'ChardevFileWrapper',
737 'serial': { 'type': 'ChardevHostdevWrapper',
738 'if': 'HAVE_CHARDEV_SERIAL' },
739 'parallel': { 'type': 'ChardevHostdevWrapper',
740 'if': 'HAVE_CHARDEV_PARALLEL' },
741 'pipe': 'ChardevHostdevWrapper',
742 'socket': 'ChardevSocketWrapper',
743 'udp': 'ChardevUdpWrapper',
744 'pty': 'ChardevPtyWrapper',
745 'null': 'ChardevCommonWrapper',
746 'mux': 'ChardevMuxWrapper',
747 'hub': 'ChardevHubWrapper',
748 'msmouse': 'ChardevCommonWrapper',
749 'wctablet': 'ChardevCommonWrapper',
750 'braille': { 'type': 'ChardevCommonWrapper',
751 'if': 'CONFIG_BRLAPI' },
752 'testdev': 'ChardevCommonWrapper',
753 'stdio': 'ChardevStdioWrapper',
754 'console': { 'type': 'ChardevCommonWrapper',
755 'if': 'CONFIG_WIN32' },
756 'spicevmc': { 'type': 'ChardevSpiceChannelWrapper',
757 'if': 'CONFIG_SPICE' },
758 'spiceport': { 'type': 'ChardevSpicePortWrapper',
759 'if': 'CONFIG_SPICE' },
760 'qemu-vdagent': { 'type': 'ChardevQemuVDAgentWrapper',
761 'if': 'CONFIG_SPICE_PROTOCOL' },
762 'dbus': { 'type': 'ChardevDBusWrapper',
763 'if': 'CONFIG_DBUS_DISPLAY' },
764 'vc': 'ChardevVCWrapper',
765 'ringbuf': 'ChardevRingbufWrapper',
766 'memory': 'ChardevRingbufWrapper' } }
767
768 ##
769 # @ChardevReturn:
770 #
771 # Return info about the chardev backend just created.
772 #
773 # @pty: name of the slave pseudoterminal device, present if and only
774 # if a chardev of type 'pty' was created
775 #
776 # Since: 1.4
777 ##
778 { 'struct' : 'ChardevReturn',
779 'data': { '*pty': 'str' } }
780
781 ##
782 # @chardev-add:
783 #
784 # Add a character device backend
785 #
786 # @id: the chardev's ID, must be unique
787 #
788 # @backend: backend type and parameters
789 #
790 # Since: 1.4
791 #
792 # .. qmp-example::
793 #
794 # -> { "execute" : "chardev-add",
795 # "arguments" : { "id" : "foo",
796 # "backend" : { "type" : "null", "data" : {} } } }
797 # <- { "return": {} }
798 #
799 # .. qmp-example::
800 #
801 # -> { "execute" : "chardev-add",
802 # "arguments" : { "id" : "bar",
803 # "backend" : { "type" : "file",
804 # "data" : { "out" : "/tmp/bar.log" } } } }
805 # <- { "return": {} }
806 #
807 # .. qmp-example::
808 #
809 # -> { "execute" : "chardev-add",
810 # "arguments" : { "id" : "baz",
811 # "backend" : { "type" : "pty", "data" : {} } } }
812 # <- { "return": { "pty" : "/dev/pty/42" } }
813 ##
814 { 'command': 'chardev-add',
815 'data': { 'id': 'str',
816 'backend': 'ChardevBackend' },
817 'returns': 'ChardevReturn' }
818
819 ##
820 # @chardev-change:
821 #
822 # Change a character device backend
823 #
824 # @id: the chardev's ID
825 #
826 # @backend: new backend type and parameters
827 #
828 # Since: 2.10
829 #
830 # .. qmp-example::
831 #
832 # -> { "execute" : "chardev-change",
833 # "arguments" : { "id" : "baz",
834 # "backend" : { "type" : "pty", "data" : {} } } }
835 # <- { "return": { "pty" : "/dev/pty/42" } }
836 #
837 # .. qmp-example::
838 #
839 # -> {"execute" : "chardev-change",
840 # "arguments" : {
841 # "id" : "charchannel2",
842 # "backend" : {
843 # "type" : "socket",
844 # "data" : {
845 # "addr" : {
846 # "type" : "unix" ,
847 # "data" : {
848 # "path" : "/tmp/charchannel2.socket"
849 # }
850 # },
851 # "server" : true,
852 # "wait" : false }}}}
853 # <- {"return": {}}
854 ##
855 { 'command': 'chardev-change',
856 'data': { 'id': 'str',
857 'backend': 'ChardevBackend' },
858 'returns': 'ChardevReturn' }
859
860 ##
861 # @chardev-remove:
862 #
863 # Remove a character device backend
864 #
865 # @id: the chardev's ID, must not be in use
866 #
867 # Since: 1.4
868 #
869 # .. qmp-example::
870 #
871 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
872 # <- { "return": {} }
873 ##
874 { 'command': 'chardev-remove',
875 'data': { 'id': 'str' } }
876
877 ##
878 # @chardev-send-break:
879 #
880 # Send a break to a character device
881 #
882 # @id: the chardev's ID
883 #
884 # Since: 2.10
885 #
886 # .. qmp-example::
887 #
888 # -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } }
889 # <- { "return": {} }
890 ##
891 { 'command': 'chardev-send-break',
892 'data': { 'id': 'str' } }
893
894 ##
895 # @VSERPORT_CHANGE:
896 #
897 # Emitted when the guest opens or closes a virtio-serial port.
898 #
899 # @id: device identifier of the virtio-serial port
900 #
901 # @open: true if the guest has opened the virtio-serial port
902 #
903 # .. note:: This event is rate-limited.
904 #
905 # Since: 2.1
906 #
907 # .. qmp-example::
908 #
909 # <- { "event": "VSERPORT_CHANGE",
910 # "data": { "id": "channel0", "open": true },
911 # "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
912 ##
913 { 'event': 'VSERPORT_CHANGE',
914 'data': { 'id': 'str',
915 'open': 'bool' } }