iotests: Make 144 deterministic again
[qemu/kevin.git] / qapi / net.json
blob0a993e1a3d2ba0eb374541fe9f597afabc7eef64
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Net devices
7 ##
9 { 'include': 'sockets.json' }
12 # @set_link:
14 # Sets the link status of a virtual network adapter.
16 # @name: the device name of the virtual network adapter
18 # @up: true to set the link status to be up
20 # Returns:
21 #     - Nothing on success
22 #     - If @name is not a valid network device, DeviceNotFound
24 # Since: 0.14
26 # Notes: Not all network adapters support setting link status.  This
27 #     command will succeed even if the network adapter does not
28 #     support link status notification.
30 # Example:
32 # -> { "execute": "set_link",
33 #      "arguments": { "name": "e1000.0", "up": false } }
34 # <- { "return": {} }
36 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
39 # @netdev_add:
41 # Add a network backend.
43 # Additional arguments depend on the type.
45 # Since: 0.14
47 # Returns:
48 #     - Nothing on success
49 #     - If @type is not a valid network backend, DeviceNotFound
51 # Example:
53 # -> { "execute": "netdev_add",
54 #      "arguments": { "type": "user", "id": "netdev1",
55 #                     "dnssearch": [ { "str": "example.org" } ] } }
56 # <- { "return": {} }
58 { 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true,
59   'allow-preconfig': true }
62 # @netdev_del:
64 # Remove a network backend.
66 # @id: the name of the network backend to remove
68 # Returns:
69 #     - Nothing on success
70 #     - If @id is not a valid network backend, DeviceNotFound
72 # Since: 0.14
74 # Example:
76 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
77 # <- { "return": {} }
79 { 'command': 'netdev_del', 'data': {'id': 'str'},
80   'allow-preconfig': true }
83 # @NetLegacyNicOptions:
85 # Create a new Network Interface Card.
87 # @netdev: id of -netdev to connect to
89 # @macaddr: MAC address
91 # @model: device model (e1000, rtl8139, virtio etc.)
93 # @addr: PCI device address
95 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
97 # Since: 1.2
99 { 'struct': 'NetLegacyNicOptions',
100   'data': {
101     '*netdev':  'str',
102     '*macaddr': 'str',
103     '*model':   'str',
104     '*addr':    'str',
105     '*vectors': 'uint32' } }
108 # @String:
110 # A fat type wrapping 'str', to be embedded in lists.
112 # Since: 1.2
114 { 'struct': 'String',
115   'data': {
116     'str': 'str' } }
119 # @NetdevUserOptions:
121 # Use the user mode network stack which requires no administrator
122 # privilege to run.
124 # @hostname: client hostname reported by the builtin DHCP server
126 # @restrict: isolate the guest from the host
128 # @ipv4: whether to support IPv4, default true for enabled (since 2.6)
130 # @ipv6: whether to support IPv6, default true for enabled (since 2.6)
132 # @ip: legacy parameter, use net= instead
134 # @net: IP network address that the guest will see, in the form
135 #     addr[/netmask] The netmask is optional, and can be either in the
136 #     form a.b.c.d or as a number of valid top-most bits.  Default is
137 #     10.0.2.0/24.
139 # @host: guest-visible address of the host
141 # @tftp: root directory of the built-in TFTP server
143 # @bootfile: BOOTP filename, for use with tftp=
145 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
146 #     assign
148 # @dns: guest-visible address of the virtual nameserver
150 # @dnssearch: list of DNS suffixes to search, passed as DHCP option to
151 #     the guest
153 # @domainname: guest-visible domain name of the virtual nameserver
154 #     (since 3.0)
156 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since 2.6).
157 #     The network prefix is given in the usual hexadecimal IPv6
158 #     address notation.
160 # @ipv6-prefixlen: IPv6 network prefix length (default is 64) (since
161 #     2.6)
163 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
165 # @ipv6-dns: guest-visible IPv6 address of the virtual nameserver
166 #     (since 2.6)
168 # @smb: root directory of the built-in SMB server
170 # @smbserver: IP address of the built-in SMB server
172 # @hostfwd: redirect incoming TCP or UDP host connections to guest
173 #     endpoints
175 # @guestfwd: forward guest TCP connections
177 # @tftp-server-name: RFC2132 "TFTP server name" string (Since 3.1)
179 # Since: 1.2
181 { 'struct': 'NetdevUserOptions',
182   'data': {
183     '*hostname':  'str',
184     '*restrict':  'bool',
185     '*ipv4':      'bool',
186     '*ipv6':      'bool',
187     '*ip':        'str',
188     '*net':       'str',
189     '*host':      'str',
190     '*tftp':      'str',
191     '*bootfile':  'str',
192     '*dhcpstart': 'str',
193     '*dns':       'str',
194     '*dnssearch': ['String'],
195     '*domainname': 'str',
196     '*ipv6-prefix':      'str',
197     '*ipv6-prefixlen':   'int',
198     '*ipv6-host':        'str',
199     '*ipv6-dns':         'str',
200     '*smb':       'str',
201     '*smbserver': 'str',
202     '*hostfwd':   ['String'],
203     '*guestfwd':  ['String'],
204     '*tftp-server-name': 'str' } }
207 # @NetdevTapOptions:
209 # Used to configure a host TAP network interface backend.
211 # @ifname: interface name
213 # @fd: file descriptor of an already opened tap
215 # @fds: multiple file descriptors of already opened multiqueue capable
216 #     tap
218 # @script: script to initialize the interface
220 # @downscript: script to shut down the interface
222 # @br: bridge name (since 2.8)
224 # @helper: command to execute to configure bridge
226 # @sndbuf: send buffer limit.  Understands [TGMKkb] suffixes.
228 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
230 # @vhost: enable vhost-net network accelerator
232 # @vhostfd: file descriptor of an already opened vhost net device
234 # @vhostfds: file descriptors of multiple already opened vhost net
235 #     devices
237 # @vhostforce: vhost on for non-MSIX virtio guests
239 # @queues: number of queues to be created for multiqueue capable tap
241 # @poll-us: maximum number of microseconds that could be spent on busy
242 #     polling for tap (since 2.7)
244 # Since: 1.2
246 { 'struct': 'NetdevTapOptions',
247   'data': {
248     '*ifname':     'str',
249     '*fd':         'str',
250     '*fds':        'str',
251     '*script':     'str',
252     '*downscript': 'str',
253     '*br':         'str',
254     '*helper':     'str',
255     '*sndbuf':     'size',
256     '*vnet_hdr':   'bool',
257     '*vhost':      'bool',
258     '*vhostfd':    'str',
259     '*vhostfds':   'str',
260     '*vhostforce': 'bool',
261     '*queues':     'uint32',
262     '*poll-us':    'uint32'} }
265 # @NetdevSocketOptions:
267 # Socket netdevs are used to establish a network connection to another
268 # QEMU virtual machine via a TCP socket.
270 # @fd: file descriptor of an already opened socket
272 # @listen: port number, and optional hostname, to listen on
274 # @connect: port number, and optional hostname, to connect to
276 # @mcast: UDP multicast address and port number
278 # @localaddr: source address and port for multicast and udp packets
280 # @udp: UDP unicast address and port number
282 # Since: 1.2
284 { 'struct': 'NetdevSocketOptions',
285   'data': {
286     '*fd':        'str',
287     '*listen':    'str',
288     '*connect':   'str',
289     '*mcast':     'str',
290     '*localaddr': 'str',
291     '*udp':       'str' } }
294 # @NetdevL2TPv3Options:
296 # Configure an Ethernet over L2TPv3 tunnel.
298 # @src: source address
300 # @dst: destination address
302 # @srcport: source port - mandatory for udp, optional for ip
304 # @dstport: destination port - mandatory for udp, optional for ip
306 # @ipv6: force the use of ipv6
308 # @udp: use the udp version of l2tpv3 encapsulation
310 # @cookie64: use 64 bit cookies
312 # @counter: have sequence counter
314 # @pincounter: pin sequence counter to zero - workaround for buggy
315 #     implementations or networks with packet reorder
317 # @txcookie: 32 or 64 bit transmit cookie
319 # @rxcookie: 32 or 64 bit receive cookie
321 # @txsession: 32 bit transmit session
323 # @rxsession: 32 bit receive session - if not specified set to the
324 #     same value as transmit
326 # @offset: additional offset - allows the insertion of additional
327 #     application-specific data before the packet payload
329 # Since: 2.1
331 { 'struct': 'NetdevL2TPv3Options',
332   'data': {
333     'src':          'str',
334     'dst':          'str',
335     '*srcport':     'str',
336     '*dstport':     'str',
337     '*ipv6':        'bool',
338     '*udp':         'bool',
339     '*cookie64':    'bool',
340     '*counter':     'bool',
341     '*pincounter':  'bool',
342     '*txcookie':    'uint64',
343     '*rxcookie':    'uint64',
344     'txsession':    'uint32',
345     '*rxsession':   'uint32',
346     '*offset':      'uint32' } }
349 # @NetdevVdeOptions:
351 # Connect to a vde switch running on the host.
353 # @sock: socket path
355 # @port: port number
357 # @group: group owner of socket
359 # @mode: permissions for socket
361 # Since: 1.2
363 { 'struct': 'NetdevVdeOptions',
364   'data': {
365     '*sock':  'str',
366     '*port':  'uint16',
367     '*group': 'str',
368     '*mode':  'uint16' } }
371 # @NetdevBridgeOptions:
373 # Connect a host TAP network interface to a host bridge device.
375 # @br: bridge name
377 # @helper: command to execute to configure bridge
379 # Since: 1.2
381 { 'struct': 'NetdevBridgeOptions',
382   'data': {
383     '*br':     'str',
384     '*helper': 'str' } }
387 # @NetdevHubPortOptions:
389 # Connect two or more net clients through a software hub.
391 # @hubid: hub identifier number
393 # @netdev: used to connect hub to a netdev instead of a device (since
394 #     2.12)
396 # Since: 1.2
398 { 'struct': 'NetdevHubPortOptions',
399   'data': {
400     'hubid':     'int32',
401     '*netdev':    'str' } }
404 # @NetdevNetmapOptions:
406 # Connect a client to a netmap-enabled NIC or to a VALE switch port
408 # @ifname: Either the name of an existing network interface supported
409 #     by netmap, or the name of a VALE port (created on the fly). A
410 #     VALE port name is in the form 'valeXXX:YYY', where XXX and YYY
411 #     are non-negative integers.  XXX identifies a switch and YYY
412 #     identifies a port of the switch.  VALE ports having the same XXX
413 #     are therefore connected to the same switch.
415 # @devname: path of the netmap device (default: '/dev/netmap').
417 # Since: 2.0
419 { 'struct': 'NetdevNetmapOptions',
420   'data': {
421     'ifname':     'str',
422     '*devname':    'str' } }
425 # @AFXDPMode:
427 # Attach mode for a default XDP program
429 # @skb: generic mode, no driver support necessary
431 # @native: DRV mode, program is attached to a driver, packets are passed to
432 #     the socket without allocation of skb.
434 # Since: 8.2
436 { 'enum': 'AFXDPMode',
437   'data': [ 'native', 'skb' ],
438   'if': 'CONFIG_AF_XDP' }
441 # @NetdevAFXDPOptions:
443 # AF_XDP network backend
445 # @ifname: The name of an existing network interface.
447 # @mode: Attach mode for a default XDP program.  If not specified, then
448 #     'native' will be tried first, then 'skb'.
450 # @force-copy: Force XDP copy mode even if device supports zero-copy.
451 #     (default: false)
453 # @queues: number of queues to be used for multiqueue interfaces (default: 1).
455 # @start-queue: Use @queues starting from this queue number (default: 0).
457 # @inhibit: Don't load a default XDP program, use one already loaded to
458 #     the interface (default: false).  Requires @sock-fds.
460 # @sock-fds: A colon (:) separated list of file descriptors for already open
461 #     but not bound AF_XDP sockets in the queue order.  One fd per queue.
462 #     These descriptors should already be added into XDP socket map for
463 #     corresponding queues.  Requires @inhibit.
465 # Since: 8.2
467 { 'struct': 'NetdevAFXDPOptions',
468   'data': {
469     'ifname':       'str',
470     '*mode':        'AFXDPMode',
471     '*force-copy':  'bool',
472     '*queues':      'int',
473     '*start-queue': 'int',
474     '*inhibit':     'bool',
475     '*sock-fds':    'str' },
476   'if': 'CONFIG_AF_XDP' }
479 # @NetdevVhostUserOptions:
481 # Vhost-user network backend
483 # @chardev: name of a unix socket chardev
485 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
487 # @queues: number of queues to be created for multiqueue vhost-user
488 #     (default: 1) (Since 2.5)
490 # Since: 2.1
492 { 'struct': 'NetdevVhostUserOptions',
493   'data': {
494     'chardev':        'str',
495     '*vhostforce':    'bool',
496     '*queues':        'int' } }
499 # @NetdevVhostVDPAOptions:
501 # Vhost-vdpa network backend
503 # vDPA device is a device that uses a datapath which complies with the
504 # virtio specifications with a vendor specific control path.
506 # @vhostdev: path of vhost-vdpa device (default:'/dev/vhost-vdpa-0')
508 # @vhostfd: file descriptor of an already opened vhost vdpa device
510 # @queues: number of queues to be created for multiqueue vhost-vdpa
511 #     (default: 1)
513 # @x-svq: Start device with (experimental) shadow virtqueue.  (Since
514 #     7.1) (default: false)
516 # Features:
518 # @unstable: Member @x-svq is experimental.
520 # Since: 5.1
522 { 'struct': 'NetdevVhostVDPAOptions',
523   'data': {
524     '*vhostdev':     'str',
525     '*vhostfd':      'str',
526     '*queues':       'int',
527     '*x-svq':        {'type': 'bool', 'features' : [ 'unstable'] } } }
530 # @NetdevVmnetHostOptions:
532 # vmnet (host mode) network backend.
534 # Allows the vmnet interface to communicate with other vmnet
535 # interfaces that are in host mode and also with the host.
537 # @start-address: The starting IPv4 address to use for the interface.
538 #     Must be in the private IP range (RFC 1918). Must be specified
539 #     along with @end-address and @subnet-mask.  This address is used
540 #     as the gateway address.  The subsequent address up to and
541 #     including end-address are placed in the DHCP pool.
543 # @end-address: The DHCP IPv4 range end address to use for the
544 #     interface.  Must be in the private IP range (RFC 1918). Must be
545 #     specified along with @start-address and @subnet-mask.
547 # @subnet-mask: The IPv4 subnet mask to use on the interface.  Must be
548 #     specified along with @start-address and @subnet-mask.
550 # @isolated: Enable isolation for this interface.  Interface isolation
551 #     ensures that vmnet interface is not able to communicate with any
552 #     other vmnet interfaces.  Only communication with host is
553 #     allowed.  Requires at least macOS Big Sur 11.0.
555 # @net-uuid: The identifier (UUID) to uniquely identify the isolated
556 #     network vmnet interface should be added to.  If set, no DHCP
557 #     service is provided for this interface and network communication
558 #     is allowed only with other interfaces added to this network
559 #     identified by the UUID. Requires at least macOS Big Sur 11.0.
561 # Since: 7.1
563 { 'struct': 'NetdevVmnetHostOptions',
564   'data': {
565     '*start-address': 'str',
566     '*end-address':   'str',
567     '*subnet-mask':   'str',
568     '*isolated':      'bool',
569     '*net-uuid':      'str' },
570   'if': 'CONFIG_VMNET' }
573 # @NetdevVmnetSharedOptions:
575 # vmnet (shared mode) network backend.
577 # Allows traffic originating from the vmnet interface to reach the
578 # Internet through a network address translator (NAT). The vmnet
579 # interface can communicate with the host and with other shared mode
580 # interfaces on the same subnet.  If no DHCP settings, subnet mask and
581 # IPv6 prefix specified, the interface can communicate with any of
582 # other interfaces in shared mode.
584 # @start-address: The starting IPv4 address to use for the interface.
585 #     Must be in the private IP range (RFC 1918). Must be specified
586 #     along with @end-address and @subnet-mask.  This address is used
587 #     as the gateway address.  The subsequent address up to and
588 #     including end-address are placed in the DHCP pool.
590 # @end-address: The DHCP IPv4 range end address to use for the
591 #     interface.  Must be in the private IP range (RFC 1918). Must be
592 #     specified along with @start-address and @subnet-mask.
594 # @subnet-mask: The IPv4 subnet mask to use on the interface.  Must be
595 #     specified along with @start-address and @subnet-mask.
597 # @isolated: Enable isolation for this interface.  Interface isolation
598 #     ensures that vmnet interface is not able to communicate with any
599 #     other vmnet interfaces.  Only communication with host is
600 #     allowed.  Requires at least macOS Big Sur 11.0.
602 # @nat66-prefix: The IPv6 prefix to use into guest network.  Must be a
603 #     unique local address i.e. start with fd00::/8 and have length of
604 #     64.
606 # Since: 7.1
608 { 'struct': 'NetdevVmnetSharedOptions',
609   'data': {
610     '*start-address': 'str',
611     '*end-address':   'str',
612     '*subnet-mask':   'str',
613     '*isolated':      'bool',
614     '*nat66-prefix':  'str' },
615   'if': 'CONFIG_VMNET' }
618 # @NetdevVmnetBridgedOptions:
620 # vmnet (bridged mode) network backend.
622 # Bridges the vmnet interface with a physical network interface.
624 # @ifname: The name of the physical interface to be bridged.
626 # @isolated: Enable isolation for this interface.  Interface isolation
627 #     ensures that vmnet interface is not able to communicate with any
628 #     other vmnet interfaces.  Only communication with host is
629 #     allowed.  Requires at least macOS Big Sur 11.0.
631 # Since: 7.1
633 { 'struct': 'NetdevVmnetBridgedOptions',
634   'data': {
635     'ifname':     'str',
636     '*isolated':  'bool' },
637   'if': 'CONFIG_VMNET' }
640 # @NetdevStreamOptions:
642 # Configuration info for stream socket netdev
644 # @addr: socket address to listen on (server=true) or connect to
645 #     (server=false)
647 # @server: create server socket (default: false)
649 # @reconnect: For a client socket, if a socket is disconnected, then
650 #     attempt a reconnect after the given number of seconds.  Setting
651 #     this to zero disables this function.  (default: 0) (since 8.0)
653 # Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
655 # Since: 7.2
657 { 'struct': 'NetdevStreamOptions',
658   'data': {
659     'addr':   'SocketAddress',
660     '*server': 'bool',
661     '*reconnect': 'uint32' } }
664 # @NetdevDgramOptions:
666 # Configuration info for datagram socket netdev.
668 # @remote: remote address
670 # @local: local address
672 # Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
674 # If remote address is present and it's a multicast address, local
675 # address is optional.  Otherwise local address is required and remote
676 # address is optional.
678 # .. table:: Valid parameters combination table
679 #    :widths: auto
681 #    =============  ========  =====
682 #    remote         local     okay?
683 #    =============  ========  =====
684 #    absent         absent    no
685 #    absent         not fd    no
686 #    absent         fd        yes
687 #    multicast      absent    yes
688 #    multicast      present   yes
689 #    not multicast  absent    no
690 #    not multicast  present   yes
691 #    =============  ========  =====
693 # Since: 7.2
695 { 'struct': 'NetdevDgramOptions',
696   'data': {
697     '*local':  'SocketAddress',
698     '*remote': 'SocketAddress' } }
701 # @NetClientDriver:
703 # Available netdev drivers.
705 # @l2tpv3: since 2.1
706 # @vhost-vdpa: since 5.1
707 # @vmnet-host: since 7.1
708 # @vmnet-shared: since 7.1
709 # @vmnet-bridged: since 7.1
710 # @stream: since 7.2
711 # @dgram: since 7.2
712 # @af-xdp: since 8.2
714 # Since: 2.7
716 { 'enum': 'NetClientDriver',
717   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream',
718             'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user',
719             'vhost-vdpa',
720             { 'name': 'af-xdp', 'if': 'CONFIG_AF_XDP' },
721             { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
722             { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
723             { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
726 # @Netdev:
728 # Captures the configuration of a network device.
730 # @id: identifier for monitor commands.
732 # @type: Specify the driver used for interpreting remaining arguments.
734 # Since: 1.2
736 { 'union': 'Netdev',
737   'base': { 'id': 'str', 'type': 'NetClientDriver' },
738   'discriminator': 'type',
739   'data': {
740     'nic':      'NetLegacyNicOptions',
741     'user':     'NetdevUserOptions',
742     'tap':      'NetdevTapOptions',
743     'l2tpv3':   'NetdevL2TPv3Options',
744     'socket':   'NetdevSocketOptions',
745     'stream':   'NetdevStreamOptions',
746     'dgram':    'NetdevDgramOptions',
747     'vde':      'NetdevVdeOptions',
748     'bridge':   'NetdevBridgeOptions',
749     'hubport':  'NetdevHubPortOptions',
750     'netmap':   'NetdevNetmapOptions',
751     'af-xdp':   { 'type': 'NetdevAFXDPOptions',
752                   'if': 'CONFIG_AF_XDP' },
753     'vhost-user': 'NetdevVhostUserOptions',
754     'vhost-vdpa': 'NetdevVhostVDPAOptions',
755     'vmnet-host': { 'type': 'NetdevVmnetHostOptions',
756                     'if': 'CONFIG_VMNET' },
757     'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions',
758                       'if': 'CONFIG_VMNET' },
759     'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions',
760                        'if': 'CONFIG_VMNET' } } }
763 # @RxState:
765 # Packets receiving state
767 # @normal: filter assigned packets according to the mac-table
769 # @none: don't receive any assigned packet
771 # @all: receive all assigned packets
773 # Since: 1.6
775 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
778 # @RxFilterInfo:
780 # Rx-filter information for a NIC.
782 # @name: net client name
784 # @promiscuous: whether promiscuous mode is enabled
786 # @multicast: multicast receive state
788 # @unicast: unicast receive state
790 # @vlan: vlan receive state (Since 2.0)
792 # @broadcast-allowed: whether to receive broadcast
794 # @multicast-overflow: multicast table is overflowed or not
796 # @unicast-overflow: unicast table is overflowed or not
798 # @main-mac: the main macaddr string
800 # @vlan-table: a list of active vlan id
802 # @unicast-table: a list of unicast macaddr string
804 # @multicast-table: a list of multicast macaddr string
806 # Since: 1.6
808 { 'struct': 'RxFilterInfo',
809   'data': {
810     'name':               'str',
811     'promiscuous':        'bool',
812     'multicast':          'RxState',
813     'unicast':            'RxState',
814     'vlan':               'RxState',
815     'broadcast-allowed':  'bool',
816     'multicast-overflow': 'bool',
817     'unicast-overflow':   'bool',
818     'main-mac':           'str',
819     'vlan-table':         ['int'],
820     'unicast-table':      ['str'],
821     'multicast-table':    ['str'] }}
824 # @query-rx-filter:
826 # Return rx-filter information for all NICs (or for the given NIC).
828 # @name: net client name
830 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
831 #     Returns an error if the given @name doesn't exist, or given NIC
832 #     doesn't support rx-filter querying, or given net client isn't a
833 #     NIC.
835 # Since: 1.6
837 # Example:
839 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
840 # <- { "return": [
841 #         {
842 #             "promiscuous": true,
843 #             "name": "vnet0",
844 #             "main-mac": "52:54:00:12:34:56",
845 #             "unicast": "normal",
846 #             "vlan": "normal",
847 #             "vlan-table": [
848 #                 4,
849 #                 0
850 #             ],
851 #             "unicast-table": [
852 #             ],
853 #             "multicast": "normal",
854 #             "multicast-overflow": false,
855 #             "unicast-overflow": false,
856 #             "multicast-table": [
857 #                 "01:00:5e:00:00:01",
858 #                 "33:33:00:00:00:01",
859 #                 "33:33:ff:12:34:56"
860 #             ],
861 #             "broadcast-allowed": false
862 #         }
863 #       ]
864 #    }
866 { 'command': 'query-rx-filter',
867   'data': { '*name': 'str' },
868   'returns': ['RxFilterInfo'] }
871 # @NIC_RX_FILTER_CHANGED:
873 # Emitted once until the 'query-rx-filter' command is executed, the
874 # first event will always be emitted
876 # @name: net client name
878 # @path: device path
880 # Since: 1.6
882 # Example:
884 # <- { "event": "NIC_RX_FILTER_CHANGED",
885 #      "data": { "name": "vnet0",
886 #                "path": "/machine/peripheral/vnet0/virtio-backend" },
887 #      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
889 { 'event': 'NIC_RX_FILTER_CHANGED',
890   'data': { '*name': 'str', 'path': 'str' } }
893 # @AnnounceParameters:
895 # Parameters for self-announce timers
897 # @initial: Initial delay (in ms) before sending the first GARP/RARP
898 #     announcement
900 # @max: Maximum delay (in ms) between GARP/RARP announcement packets
902 # @rounds: Number of self-announcement attempts
904 # @step: Delay increase (in ms) after each self-announcement attempt
906 # @interfaces: An optional list of interface names, which restricts
907 #     the announcement to the listed interfaces.  (Since 4.1)
909 # @id: A name to be used to identify an instance of announce-timers
910 #     and to allow it to modified later.  Not for use as part of the
911 #     migration parameters.  (Since 4.1)
913 # Since: 4.0
916 { 'struct': 'AnnounceParameters',
917   'data': { 'initial': 'int',
918             'max': 'int',
919             'rounds': 'int',
920             'step': 'int',
921             '*interfaces': ['str'],
922             '*id' : 'str' } }
925 # @announce-self:
927 # Trigger generation of broadcast RARP frames to update network
928 # switches.  This can be useful when network bonds fail-over the
929 # active slave.
931 # Example:
933 # -> { "execute": "announce-self",
934 #      "arguments": {
935 #          "initial": 50, "max": 550, "rounds": 10, "step": 50,
936 #          "interfaces": ["vn2", "vn3"], "id": "bob" } }
937 # <- { "return": {} }
939 # Since: 4.0
941 { 'command': 'announce-self', 'boxed': true,
942   'data' : 'AnnounceParameters'}
945 # @FAILOVER_NEGOTIATED:
947 # Emitted when VIRTIO_NET_F_STANDBY was enabled during feature
948 # negotiation.  Failover primary devices which were hidden (not
949 # hotplugged when requested) before will now be hotplugged by the
950 # virtio-net standby device.
952 # @device-id: QEMU device id of the unplugged device
954 # Since: 4.2
956 # Example:
958 # <- { "event": "FAILOVER_NEGOTIATED",
959 #      "data": { "device-id": "net1" },
960 #      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
962 { 'event': 'FAILOVER_NEGOTIATED',
963   'data': {'device-id': 'str'} }
966 # @NETDEV_STREAM_CONNECTED:
968 # Emitted when the netdev stream backend is connected
970 # @netdev-id: QEMU netdev id that is connected
972 # @addr: The destination address
974 # Since: 7.2
976 # Examples:
978 # <- { "event": "NETDEV_STREAM_CONNECTED",
979 #      "data": { "netdev-id": "netdev0",
980 #                "addr": { "port": "47666", "ipv6": true,
981 #                          "host": "::1", "type": "inet" } },
982 #      "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
984 # <- { "event": "NETDEV_STREAM_CONNECTED",
985 #      "data": { "netdev-id": "netdev0",
986 #                "addr": { "path": "/tmp/qemu0", "type": "unix" } },
987 #      "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
989 { 'event': 'NETDEV_STREAM_CONNECTED',
990   'data': { 'netdev-id': 'str',
991             'addr': 'SocketAddress' } }
994 # @NETDEV_STREAM_DISCONNECTED:
996 # Emitted when the netdev stream backend is disconnected
998 # @netdev-id: QEMU netdev id that is disconnected
1000 # Since: 7.2
1002 # Example:
1004 # <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
1005 #      'data': {'netdev-id': 'netdev0'},
1006 #      'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
1008 { 'event': 'NETDEV_STREAM_DISCONNECTED',
1009   'data': { 'netdev-id': 'str' } }