virtio-blk: declare VirtIOBlock::rq with a type
[qemu/kevin.git] / qapi / net.json
blob68493d6ac9892d1c0baf78f6a8abeef9e88b3628
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Net devices
7 ##
9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
13 # @set_link:
15 # Sets the link status of a virtual network adapter.
17 # @name: the device name of the virtual network adapter
19 # @up: true to set the link status to be up
21 # Returns:
22 #     - Nothing on success
23 #     - If @name is not a valid network device, DeviceNotFound
25 # Since: 0.14
27 # Notes: Not all network adapters support setting link status.  This
28 #     command will succeed even if the network adapter does not
29 #     support link status notification.
31 # Example:
33 # -> { "execute": "set_link",
34 #      "arguments": { "name": "e1000.0", "up": false } }
35 # <- { "return": {} }
37 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
40 # @netdev_add:
42 # Add a network backend.
44 # Additional arguments depend on the type.
46 # Since: 0.14
48 # Returns:
49 #     - Nothing on success
50 #     - If @type is not a valid network backend, DeviceNotFound
52 # Example:
54 # -> { "execute": "netdev_add",
55 #      "arguments": { "type": "user", "id": "netdev1",
56 #                     "dnssearch": [ { "str": "example.org" } ] } }
57 # <- { "return": {} }
59 { 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true,
60   'allow-preconfig': true }
63 # @netdev_del:
65 # Remove a network backend.
67 # @id: the name of the network backend to remove
69 # Returns:
70 #     - Nothing on success
71 #     - If @id is not a valid network backend, DeviceNotFound
73 # Since: 0.14
75 # Example:
77 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
78 # <- { "return": {} }
80 { 'command': 'netdev_del', 'data': {'id': 'str'},
81   'allow-preconfig': true }
84 # @NetLegacyNicOptions:
86 # Create a new Network Interface Card.
88 # @netdev: id of -netdev to connect to
90 # @macaddr: MAC address
92 # @model: device model (e1000, rtl8139, virtio etc.)
94 # @addr: PCI device address
96 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
98 # Since: 1.2
100 { 'struct': 'NetLegacyNicOptions',
101   'data': {
102     '*netdev':  'str',
103     '*macaddr': 'str',
104     '*model':   'str',
105     '*addr':    'str',
106     '*vectors': 'uint32' } }
109 # @NetdevUserOptions:
111 # Use the user mode network stack which requires no administrator
112 # privilege to run.
114 # @hostname: client hostname reported by the builtin DHCP server
116 # @restrict: isolate the guest from the host
118 # @ipv4: whether to support IPv4, default true for enabled (since 2.6)
120 # @ipv6: whether to support IPv6, default true for enabled (since 2.6)
122 # @ip: legacy parameter, use net= instead
124 # @net: IP network address that the guest will see, in the form
125 #     addr[/netmask] The netmask is optional, and can be either in the
126 #     form a.b.c.d or as a number of valid top-most bits.  Default is
127 #     10.0.2.0/24.
129 # @host: guest-visible address of the host
131 # @tftp: root directory of the built-in TFTP server
133 # @bootfile: BOOTP filename, for use with tftp=
135 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
136 #     assign
138 # @dns: guest-visible address of the virtual nameserver
140 # @dnssearch: list of DNS suffixes to search, passed as DHCP option to
141 #     the guest
143 # @domainname: guest-visible domain name of the virtual nameserver
144 #     (since 3.0)
146 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since 2.6).
147 #     The network prefix is given in the usual hexadecimal IPv6
148 #     address notation.
150 # @ipv6-prefixlen: IPv6 network prefix length (default is 64) (since
151 #     2.6)
153 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
155 # @ipv6-dns: guest-visible IPv6 address of the virtual nameserver
156 #     (since 2.6)
158 # @smb: root directory of the built-in SMB server
160 # @smbserver: IP address of the built-in SMB server
162 # @hostfwd: redirect incoming TCP or UDP host connections to guest
163 #     endpoints
165 # @guestfwd: forward guest TCP connections
167 # @tftp-server-name: RFC2132 "TFTP server name" string (Since 3.1)
169 # Since: 1.2
171 { 'struct': 'NetdevUserOptions',
172   'data': {
173     '*hostname':  'str',
174     '*restrict':  'bool',
175     '*ipv4':      'bool',
176     '*ipv6':      'bool',
177     '*ip':        'str',
178     '*net':       'str',
179     '*host':      'str',
180     '*tftp':      'str',
181     '*bootfile':  'str',
182     '*dhcpstart': 'str',
183     '*dns':       'str',
184     '*dnssearch': ['String'],
185     '*domainname': 'str',
186     '*ipv6-prefix':      'str',
187     '*ipv6-prefixlen':   'int',
188     '*ipv6-host':        'str',
189     '*ipv6-dns':         'str',
190     '*smb':       'str',
191     '*smbserver': 'str',
192     '*hostfwd':   ['String'],
193     '*guestfwd':  ['String'],
194     '*tftp-server-name': 'str' } }
197 # @NetdevTapOptions:
199 # Used to configure a host TAP network interface backend.
201 # @ifname: interface name
203 # @fd: file descriptor of an already opened tap
205 # @fds: multiple file descriptors of already opened multiqueue capable
206 #     tap
208 # @script: script to initialize the interface
210 # @downscript: script to shut down the interface
212 # @br: bridge name (since 2.8)
214 # @helper: command to execute to configure bridge
216 # @sndbuf: send buffer limit.  Understands [TGMKkb] suffixes.
218 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
220 # @vhost: enable vhost-net network accelerator
222 # @vhostfd: file descriptor of an already opened vhost net device
224 # @vhostfds: file descriptors of multiple already opened vhost net
225 #     devices
227 # @vhostforce: vhost on for non-MSIX virtio guests
229 # @queues: number of queues to be created for multiqueue capable tap
231 # @poll-us: maximum number of microseconds that could be spent on busy
232 #     polling for tap (since 2.7)
234 # Since: 1.2
236 { 'struct': 'NetdevTapOptions',
237   'data': {
238     '*ifname':     'str',
239     '*fd':         'str',
240     '*fds':        'str',
241     '*script':     'str',
242     '*downscript': 'str',
243     '*br':         'str',
244     '*helper':     'str',
245     '*sndbuf':     'size',
246     '*vnet_hdr':   'bool',
247     '*vhost':      'bool',
248     '*vhostfd':    'str',
249     '*vhostfds':   'str',
250     '*vhostforce': 'bool',
251     '*queues':     'uint32',
252     '*poll-us':    'uint32'} }
255 # @NetdevSocketOptions:
257 # Socket netdevs are used to establish a network connection to another
258 # QEMU virtual machine via a TCP socket.
260 # @fd: file descriptor of an already opened socket
262 # @listen: port number, and optional hostname, to listen on
264 # @connect: port number, and optional hostname, to connect to
266 # @mcast: UDP multicast address and port number
268 # @localaddr: source address and port for multicast and udp packets
270 # @udp: UDP unicast address and port number
272 # Since: 1.2
274 { 'struct': 'NetdevSocketOptions',
275   'data': {
276     '*fd':        'str',
277     '*listen':    'str',
278     '*connect':   'str',
279     '*mcast':     'str',
280     '*localaddr': 'str',
281     '*udp':       'str' } }
284 # @NetdevL2TPv3Options:
286 # Configure an Ethernet over L2TPv3 tunnel.
288 # @src: source address
290 # @dst: destination address
292 # @srcport: source port - mandatory for udp, optional for ip
294 # @dstport: destination port - mandatory for udp, optional for ip
296 # @ipv6: force the use of ipv6
298 # @udp: use the udp version of l2tpv3 encapsulation
300 # @cookie64: use 64 bit cookies
302 # @counter: have sequence counter
304 # @pincounter: pin sequence counter to zero - workaround for buggy
305 #     implementations or networks with packet reorder
307 # @txcookie: 32 or 64 bit transmit cookie
309 # @rxcookie: 32 or 64 bit receive cookie
311 # @txsession: 32 bit transmit session
313 # @rxsession: 32 bit receive session - if not specified set to the
314 #     same value as transmit
316 # @offset: additional offset - allows the insertion of additional
317 #     application-specific data before the packet payload
319 # Since: 2.1
321 { 'struct': 'NetdevL2TPv3Options',
322   'data': {
323     'src':          'str',
324     'dst':          'str',
325     '*srcport':     'str',
326     '*dstport':     'str',
327     '*ipv6':        'bool',
328     '*udp':         'bool',
329     '*cookie64':    'bool',
330     '*counter':     'bool',
331     '*pincounter':  'bool',
332     '*txcookie':    'uint64',
333     '*rxcookie':    'uint64',
334     'txsession':    'uint32',
335     '*rxsession':   'uint32',
336     '*offset':      'uint32' } }
339 # @NetdevVdeOptions:
341 # Connect to a vde switch running on the host.
343 # @sock: socket path
345 # @port: port number
347 # @group: group owner of socket
349 # @mode: permissions for socket
351 # Since: 1.2
353 { 'struct': 'NetdevVdeOptions',
354   'data': {
355     '*sock':  'str',
356     '*port':  'uint16',
357     '*group': 'str',
358     '*mode':  'uint16' } }
361 # @NetdevBridgeOptions:
363 # Connect a host TAP network interface to a host bridge device.
365 # @br: bridge name
367 # @helper: command to execute to configure bridge
369 # Since: 1.2
371 { 'struct': 'NetdevBridgeOptions',
372   'data': {
373     '*br':     'str',
374     '*helper': 'str' } }
377 # @NetdevHubPortOptions:
379 # Connect two or more net clients through a software hub.
381 # @hubid: hub identifier number
383 # @netdev: used to connect hub to a netdev instead of a device (since
384 #     2.12)
386 # Since: 1.2
388 { 'struct': 'NetdevHubPortOptions',
389   'data': {
390     'hubid':     'int32',
391     '*netdev':    'str' } }
394 # @NetdevNetmapOptions:
396 # Connect a client to a netmap-enabled NIC or to a VALE switch port
398 # @ifname: Either the name of an existing network interface supported
399 #     by netmap, or the name of a VALE port (created on the fly). A
400 #     VALE port name is in the form 'valeXXX:YYY', where XXX and YYY
401 #     are non-negative integers.  XXX identifies a switch and YYY
402 #     identifies a port of the switch.  VALE ports having the same XXX
403 #     are therefore connected to the same switch.
405 # @devname: path of the netmap device (default: '/dev/netmap').
407 # Since: 2.0
409 { 'struct': 'NetdevNetmapOptions',
410   'data': {
411     'ifname':     'str',
412     '*devname':    'str' } }
415 # @AFXDPMode:
417 # Attach mode for a default XDP program
419 # @skb: generic mode, no driver support necessary
421 # @native: DRV mode, program is attached to a driver, packets are passed to
422 #     the socket without allocation of skb.
424 # Since: 8.2
426 { 'enum': 'AFXDPMode',
427   'data': [ 'native', 'skb' ],
428   'if': 'CONFIG_AF_XDP' }
431 # @NetdevAFXDPOptions:
433 # AF_XDP network backend
435 # @ifname: The name of an existing network interface.
437 # @mode: Attach mode for a default XDP program.  If not specified, then
438 #     'native' will be tried first, then 'skb'.
440 # @force-copy: Force XDP copy mode even if device supports zero-copy.
441 #     (default: false)
443 # @queues: number of queues to be used for multiqueue interfaces (default: 1).
445 # @start-queue: Use @queues starting from this queue number (default: 0).
447 # @inhibit: Don't load a default XDP program, use one already loaded to
448 #     the interface (default: false).  Requires @sock-fds.
450 # @sock-fds: A colon (:) separated list of file descriptors for already open
451 #     but not bound AF_XDP sockets in the queue order.  One fd per queue.
452 #     These descriptors should already be added into XDP socket map for
453 #     corresponding queues.  Requires @inhibit.
455 # Since: 8.2
457 { 'struct': 'NetdevAFXDPOptions',
458   'data': {
459     'ifname':       'str',
460     '*mode':        'AFXDPMode',
461     '*force-copy':  'bool',
462     '*queues':      'int',
463     '*start-queue': 'int',
464     '*inhibit':     'bool',
465     '*sock-fds':    'str' },
466   'if': 'CONFIG_AF_XDP' }
469 # @NetdevVhostUserOptions:
471 # Vhost-user network backend
473 # @chardev: name of a unix socket chardev
475 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
477 # @queues: number of queues to be created for multiqueue vhost-user
478 #     (default: 1) (Since 2.5)
480 # Since: 2.1
482 { 'struct': 'NetdevVhostUserOptions',
483   'data': {
484     'chardev':        'str',
485     '*vhostforce':    'bool',
486     '*queues':        'int' } }
489 # @NetdevVhostVDPAOptions:
491 # Vhost-vdpa network backend
493 # vDPA device is a device that uses a datapath which complies with the
494 # virtio specifications with a vendor specific control path.
496 # @vhostdev: path of vhost-vdpa device (default:'/dev/vhost-vdpa-0')
498 # @vhostfd: file descriptor of an already opened vhost vdpa device
500 # @queues: number of queues to be created for multiqueue vhost-vdpa
501 #     (default: 1)
503 # @x-svq: Start device with (experimental) shadow virtqueue.  (Since
504 #     7.1) (default: false)
506 # Features:
508 # @unstable: Member @x-svq is experimental.
510 # Since: 5.1
512 { 'struct': 'NetdevVhostVDPAOptions',
513   'data': {
514     '*vhostdev':     'str',
515     '*vhostfd':      'str',
516     '*queues':       'int',
517     '*x-svq':        {'type': 'bool', 'features' : [ 'unstable'] } } }
520 # @NetdevVmnetHostOptions:
522 # vmnet (host mode) network backend.
524 # Allows the vmnet interface to communicate with other vmnet
525 # interfaces that are in host mode and also with the host.
527 # @start-address: The starting IPv4 address to use for the interface.
528 #     Must be in the private IP range (RFC 1918). Must be specified
529 #     along with @end-address and @subnet-mask.  This address is used
530 #     as the gateway address.  The subsequent address up to and
531 #     including end-address are placed in the DHCP pool.
533 # @end-address: The DHCP IPv4 range end address to use for the
534 #     interface.  Must be in the private IP range (RFC 1918). Must be
535 #     specified along with @start-address and @subnet-mask.
537 # @subnet-mask: The IPv4 subnet mask to use on the interface.  Must be
538 #     specified along with @start-address and @subnet-mask.
540 # @isolated: Enable isolation for this interface.  Interface isolation
541 #     ensures that vmnet interface is not able to communicate with any
542 #     other vmnet interfaces.  Only communication with host is
543 #     allowed.  Requires at least macOS Big Sur 11.0.
545 # @net-uuid: The identifier (UUID) to uniquely identify the isolated
546 #     network vmnet interface should be added to.  If set, no DHCP
547 #     service is provided for this interface and network communication
548 #     is allowed only with other interfaces added to this network
549 #     identified by the UUID. Requires at least macOS Big Sur 11.0.
551 # Since: 7.1
553 { 'struct': 'NetdevVmnetHostOptions',
554   'data': {
555     '*start-address': 'str',
556     '*end-address':   'str',
557     '*subnet-mask':   'str',
558     '*isolated':      'bool',
559     '*net-uuid':      'str' },
560   'if': 'CONFIG_VMNET' }
563 # @NetdevVmnetSharedOptions:
565 # vmnet (shared mode) network backend.
567 # Allows traffic originating from the vmnet interface to reach the
568 # Internet through a network address translator (NAT). The vmnet
569 # interface can communicate with the host and with other shared mode
570 # interfaces on the same subnet.  If no DHCP settings, subnet mask and
571 # IPv6 prefix specified, the interface can communicate with any of
572 # other interfaces in shared mode.
574 # @start-address: The starting IPv4 address to use for the interface.
575 #     Must be in the private IP range (RFC 1918). Must be specified
576 #     along with @end-address and @subnet-mask.  This address is used
577 #     as the gateway address.  The subsequent address up to and
578 #     including end-address are placed in the DHCP pool.
580 # @end-address: The DHCP IPv4 range end address to use for the
581 #     interface.  Must be in the private IP range (RFC 1918). Must be
582 #     specified along with @start-address and @subnet-mask.
584 # @subnet-mask: The IPv4 subnet mask to use on the interface.  Must be
585 #     specified along with @start-address and @subnet-mask.
587 # @isolated: Enable isolation for this interface.  Interface isolation
588 #     ensures that vmnet interface is not able to communicate with any
589 #     other vmnet interfaces.  Only communication with host is
590 #     allowed.  Requires at least macOS Big Sur 11.0.
592 # @nat66-prefix: The IPv6 prefix to use into guest network.  Must be a
593 #     unique local address i.e. start with fd00::/8 and have length of
594 #     64.
596 # Since: 7.1
598 { 'struct': 'NetdevVmnetSharedOptions',
599   'data': {
600     '*start-address': 'str',
601     '*end-address':   'str',
602     '*subnet-mask':   'str',
603     '*isolated':      'bool',
604     '*nat66-prefix':  'str' },
605   'if': 'CONFIG_VMNET' }
608 # @NetdevVmnetBridgedOptions:
610 # vmnet (bridged mode) network backend.
612 # Bridges the vmnet interface with a physical network interface.
614 # @ifname: The name of the physical interface to be bridged.
616 # @isolated: Enable isolation for this interface.  Interface isolation
617 #     ensures that vmnet interface is not able to communicate with any
618 #     other vmnet interfaces.  Only communication with host is
619 #     allowed.  Requires at least macOS Big Sur 11.0.
621 # Since: 7.1
623 { 'struct': 'NetdevVmnetBridgedOptions',
624   'data': {
625     'ifname':     'str',
626     '*isolated':  'bool' },
627   'if': 'CONFIG_VMNET' }
630 # @NetdevStreamOptions:
632 # Configuration info for stream socket netdev
634 # @addr: socket address to listen on (server=true) or connect to
635 #     (server=false)
637 # @server: create server socket (default: false)
639 # @reconnect: For a client socket, if a socket is disconnected, then
640 #     attempt a reconnect after the given number of seconds.  Setting
641 #     this to zero disables this function.  (default: 0) (since 8.0)
643 # Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
645 # Since: 7.2
647 { 'struct': 'NetdevStreamOptions',
648   'data': {
649     'addr':   'SocketAddress',
650     '*server': 'bool',
651     '*reconnect': 'uint32' } }
654 # @NetdevDgramOptions:
656 # Configuration info for datagram socket netdev.
658 # @remote: remote address
660 # @local: local address
662 # Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
664 # If remote address is present and it's a multicast address, local
665 # address is optional.  Otherwise local address is required and remote
666 # address is optional.
668 # .. table:: Valid parameters combination table
669 #    :widths: auto
671 #    =============  ========  =====
672 #    remote         local     okay?
673 #    =============  ========  =====
674 #    absent         absent    no
675 #    absent         not fd    no
676 #    absent         fd        yes
677 #    multicast      absent    yes
678 #    multicast      present   yes
679 #    not multicast  absent    no
680 #    not multicast  present   yes
681 #    =============  ========  =====
683 # Since: 7.2
685 { 'struct': 'NetdevDgramOptions',
686   'data': {
687     '*local':  'SocketAddress',
688     '*remote': 'SocketAddress' } }
691 # @NetClientDriver:
693 # Available netdev drivers.
695 # @l2tpv3: since 2.1
696 # @vhost-vdpa: since 5.1
697 # @vmnet-host: since 7.1
698 # @vmnet-shared: since 7.1
699 # @vmnet-bridged: since 7.1
700 # @stream: since 7.2
701 # @dgram: since 7.2
702 # @af-xdp: since 8.2
704 # Since: 2.7
706 { 'enum': 'NetClientDriver',
707   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream',
708             'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user',
709             'vhost-vdpa',
710             { 'name': 'af-xdp', 'if': 'CONFIG_AF_XDP' },
711             { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
712             { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
713             { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
716 # @Netdev:
718 # Captures the configuration of a network device.
720 # @id: identifier for monitor commands.
722 # @type: Specify the driver used for interpreting remaining arguments.
724 # Since: 1.2
726 { 'union': 'Netdev',
727   'base': { 'id': 'str', 'type': 'NetClientDriver' },
728   'discriminator': 'type',
729   'data': {
730     'nic':      'NetLegacyNicOptions',
731     'user':     'NetdevUserOptions',
732     'tap':      'NetdevTapOptions',
733     'l2tpv3':   'NetdevL2TPv3Options',
734     'socket':   'NetdevSocketOptions',
735     'stream':   'NetdevStreamOptions',
736     'dgram':    'NetdevDgramOptions',
737     'vde':      'NetdevVdeOptions',
738     'bridge':   'NetdevBridgeOptions',
739     'hubport':  'NetdevHubPortOptions',
740     'netmap':   'NetdevNetmapOptions',
741     'af-xdp':   { 'type': 'NetdevAFXDPOptions',
742                   'if': 'CONFIG_AF_XDP' },
743     'vhost-user': 'NetdevVhostUserOptions',
744     'vhost-vdpa': 'NetdevVhostVDPAOptions',
745     'vmnet-host': { 'type': 'NetdevVmnetHostOptions',
746                     'if': 'CONFIG_VMNET' },
747     'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions',
748                       'if': 'CONFIG_VMNET' },
749     'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions',
750                        'if': 'CONFIG_VMNET' } } }
753 # @RxState:
755 # Packets receiving state
757 # @normal: filter assigned packets according to the mac-table
759 # @none: don't receive any assigned packet
761 # @all: receive all assigned packets
763 # Since: 1.6
765 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
768 # @RxFilterInfo:
770 # Rx-filter information for a NIC.
772 # @name: net client name
774 # @promiscuous: whether promiscuous mode is enabled
776 # @multicast: multicast receive state
778 # @unicast: unicast receive state
780 # @vlan: vlan receive state (Since 2.0)
782 # @broadcast-allowed: whether to receive broadcast
784 # @multicast-overflow: multicast table is overflowed or not
786 # @unicast-overflow: unicast table is overflowed or not
788 # @main-mac: the main macaddr string
790 # @vlan-table: a list of active vlan id
792 # @unicast-table: a list of unicast macaddr string
794 # @multicast-table: a list of multicast macaddr string
796 # Since: 1.6
798 { 'struct': 'RxFilterInfo',
799   'data': {
800     'name':               'str',
801     'promiscuous':        'bool',
802     'multicast':          'RxState',
803     'unicast':            'RxState',
804     'vlan':               'RxState',
805     'broadcast-allowed':  'bool',
806     'multicast-overflow': 'bool',
807     'unicast-overflow':   'bool',
808     'main-mac':           'str',
809     'vlan-table':         ['int'],
810     'unicast-table':      ['str'],
811     'multicast-table':    ['str'] }}
814 # @query-rx-filter:
816 # Return rx-filter information for all NICs (or for the given NIC).
818 # @name: net client name
820 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
821 #     Returns an error if the given @name doesn't exist, or given NIC
822 #     doesn't support rx-filter querying, or given net client isn't a
823 #     NIC.
825 # Since: 1.6
827 # Example:
829 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
830 # <- { "return": [
831 #         {
832 #             "promiscuous": true,
833 #             "name": "vnet0",
834 #             "main-mac": "52:54:00:12:34:56",
835 #             "unicast": "normal",
836 #             "vlan": "normal",
837 #             "vlan-table": [
838 #                 4,
839 #                 0
840 #             ],
841 #             "unicast-table": [
842 #             ],
843 #             "multicast": "normal",
844 #             "multicast-overflow": false,
845 #             "unicast-overflow": false,
846 #             "multicast-table": [
847 #                 "01:00:5e:00:00:01",
848 #                 "33:33:00:00:00:01",
849 #                 "33:33:ff:12:34:56"
850 #             ],
851 #             "broadcast-allowed": false
852 #         }
853 #       ]
854 #    }
856 { 'command': 'query-rx-filter',
857   'data': { '*name': 'str' },
858   'returns': ['RxFilterInfo'] }
861 # @NIC_RX_FILTER_CHANGED:
863 # Emitted once until the 'query-rx-filter' command is executed, the
864 # first event will always be emitted
866 # @name: net client name
868 # @path: device path
870 # Since: 1.6
872 # Example:
874 # <- { "event": "NIC_RX_FILTER_CHANGED",
875 #      "data": { "name": "vnet0",
876 #                "path": "/machine/peripheral/vnet0/virtio-backend" },
877 #      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
879 { 'event': 'NIC_RX_FILTER_CHANGED',
880   'data': { '*name': 'str', 'path': 'str' } }
883 # @AnnounceParameters:
885 # Parameters for self-announce timers
887 # @initial: Initial delay (in ms) before sending the first GARP/RARP
888 #     announcement
890 # @max: Maximum delay (in ms) between GARP/RARP announcement packets
892 # @rounds: Number of self-announcement attempts
894 # @step: Delay increase (in ms) after each self-announcement attempt
896 # @interfaces: An optional list of interface names, which restricts
897 #     the announcement to the listed interfaces.  (Since 4.1)
899 # @id: A name to be used to identify an instance of announce-timers
900 #     and to allow it to modified later.  Not for use as part of the
901 #     migration parameters.  (Since 4.1)
903 # Since: 4.0
906 { 'struct': 'AnnounceParameters',
907   'data': { 'initial': 'int',
908             'max': 'int',
909             'rounds': 'int',
910             'step': 'int',
911             '*interfaces': ['str'],
912             '*id' : 'str' } }
915 # @announce-self:
917 # Trigger generation of broadcast RARP frames to update network
918 # switches.  This can be useful when network bonds fail-over the
919 # active slave.
921 # Example:
923 # -> { "execute": "announce-self",
924 #      "arguments": {
925 #          "initial": 50, "max": 550, "rounds": 10, "step": 50,
926 #          "interfaces": ["vn2", "vn3"], "id": "bob" } }
927 # <- { "return": {} }
929 # Since: 4.0
931 { 'command': 'announce-self', 'boxed': true,
932   'data' : 'AnnounceParameters'}
935 # @FAILOVER_NEGOTIATED:
937 # Emitted when VIRTIO_NET_F_STANDBY was enabled during feature
938 # negotiation.  Failover primary devices which were hidden (not
939 # hotplugged when requested) before will now be hotplugged by the
940 # virtio-net standby device.
942 # @device-id: QEMU device id of the unplugged device
944 # Since: 4.2
946 # Example:
948 # <- { "event": "FAILOVER_NEGOTIATED",
949 #      "data": { "device-id": "net1" },
950 #      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
952 { 'event': 'FAILOVER_NEGOTIATED',
953   'data': {'device-id': 'str'} }
956 # @NETDEV_STREAM_CONNECTED:
958 # Emitted when the netdev stream backend is connected
960 # @netdev-id: QEMU netdev id that is connected
962 # @addr: The destination address
964 # Since: 7.2
966 # Examples:
968 # <- { "event": "NETDEV_STREAM_CONNECTED",
969 #      "data": { "netdev-id": "netdev0",
970 #                "addr": { "port": "47666", "ipv6": true,
971 #                          "host": "::1", "type": "inet" } },
972 #      "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
974 # <- { "event": "NETDEV_STREAM_CONNECTED",
975 #      "data": { "netdev-id": "netdev0",
976 #                "addr": { "path": "/tmp/qemu0", "type": "unix" } },
977 #      "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
979 { 'event': 'NETDEV_STREAM_CONNECTED',
980   'data': { 'netdev-id': 'str',
981             'addr': 'SocketAddress' } }
984 # @NETDEV_STREAM_DISCONNECTED:
986 # Emitted when the netdev stream backend is disconnected
988 # @netdev-id: QEMU netdev id that is disconnected
990 # Since: 7.2
992 # Example:
994 # <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
995 #      'data': {'netdev-id': 'netdev0'},
996 #      'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
998 { 'event': 'NETDEV_STREAM_DISCONNECTED',
999   'data': { 'netdev-id': 'str' } }