tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol
[qemu/kevin.git] / qapi / net.json
blob417b61a32140501a01aad09dbbf806021b5a6ab5
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 # Errors:
21 #     - If @name is not a valid network device, DeviceNotFound
23 # Since: 0.14
25 # Notes: Not all network adapters support setting link status.  This
26 #     command will succeed even if the network adapter does not
27 #     support link status notification.
29 # Example:
31 #     -> { "execute": "set_link",
32 #          "arguments": { "name": "e1000.0", "up": false } }
33 #     <- { "return": {} }
35 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
38 # @netdev_add:
40 # Add a network backend.
42 # Additional arguments depend on the type.
44 # Since: 0.14
46 # Errors:
47 #     - If @type is not a valid network backend, DeviceNotFound
49 # Example:
51 #     -> { "execute": "netdev_add",
52 #          "arguments": { "type": "user", "id": "netdev1",
53 #                         "dnssearch": [ { "str": "example.org" } ] } }
54 #     <- { "return": {} }
56 { 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true,
57   'allow-preconfig': true }
60 # @netdev_del:
62 # Remove a network backend.
64 # @id: the name of the network backend to remove
66 # Errors:
67 #     - If @id is not a valid network backend, DeviceNotFound
69 # Since: 0.14
71 # Example:
73 #     -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
74 #     <- { "return": {} }
76 { 'command': 'netdev_del', 'data': {'id': 'str'},
77   'allow-preconfig': true }
80 # @NetLegacyNicOptions:
82 # Create a new Network Interface Card.
84 # @netdev: id of -netdev to connect to
86 # @macaddr: MAC address
88 # @model: device model (e1000, rtl8139, virtio etc.)
90 # @addr: PCI device address
92 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
94 # Since: 1.2
96 { 'struct': 'NetLegacyNicOptions',
97   'data': {
98     '*netdev':  'str',
99     '*macaddr': 'str',
100     '*model':   'str',
101     '*addr':    'str',
102     '*vectors': 'uint32' } }
105 # @String:
107 # A fat type wrapping 'str', to be embedded in lists.
109 # Since: 1.2
111 { 'struct': 'String',
112   'data': {
113     'str': 'str' } }
116 # @NetdevUserOptions:
118 # Use the user mode network stack which requires no administrator
119 # privilege to run.
121 # @hostname: client hostname reported by the builtin DHCP server
123 # @restrict: isolate the guest from the host
125 # @ipv4: whether to support IPv4, default true for enabled (since 2.6)
127 # @ipv6: whether to support IPv6, default true for enabled (since 2.6)
129 # @ip: legacy parameter, use net= instead
131 # @net: IP network address that the guest will see, in the form
132 #     addr[/netmask] The netmask is optional, and can be either in the
133 #     form a.b.c.d or as a number of valid top-most bits.  Default is
134 #     10.0.2.0/24.
136 # @host: guest-visible address of the host
138 # @tftp: root directory of the built-in TFTP server
140 # @bootfile: BOOTP filename, for use with tftp=
142 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
143 #     assign
145 # @dns: guest-visible address of the virtual nameserver
147 # @dnssearch: list of DNS suffixes to search, passed as DHCP option to
148 #     the guest
150 # @domainname: guest-visible domain name of the virtual nameserver
151 #     (since 3.0)
153 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since 2.6).
154 #     The network prefix is given in the usual hexadecimal IPv6
155 #     address notation.
157 # @ipv6-prefixlen: IPv6 network prefix length (default is 64) (since
158 #     2.6)
160 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
162 # @ipv6-dns: guest-visible IPv6 address of the virtual nameserver
163 #     (since 2.6)
165 # @smb: root directory of the built-in SMB server
167 # @smbserver: IP address of the built-in SMB server
169 # @hostfwd: redirect incoming TCP or UDP host connections to guest
170 #     endpoints
172 # @guestfwd: forward guest TCP connections
174 # @tftp-server-name: RFC2132 "TFTP server name" string (Since 3.1)
176 # Since: 1.2
178 { 'struct': 'NetdevUserOptions',
179   'data': {
180     '*hostname':  'str',
181     '*restrict':  'bool',
182     '*ipv4':      'bool',
183     '*ipv6':      'bool',
184     '*ip':        'str',
185     '*net':       'str',
186     '*host':      'str',
187     '*tftp':      'str',
188     '*bootfile':  'str',
189     '*dhcpstart': 'str',
190     '*dns':       'str',
191     '*dnssearch': ['String'],
192     '*domainname': 'str',
193     '*ipv6-prefix':      'str',
194     '*ipv6-prefixlen':   'int',
195     '*ipv6-host':        'str',
196     '*ipv6-dns':         'str',
197     '*smb':       'str',
198     '*smbserver': 'str',
199     '*hostfwd':   ['String'],
200     '*guestfwd':  ['String'],
201     '*tftp-server-name': 'str' } }
204 # @NetdevTapOptions:
206 # Used to configure a host TAP network interface backend.
208 # @ifname: interface name
210 # @fd: file descriptor of an already opened tap
212 # @fds: multiple file descriptors of already opened multiqueue capable
213 #     tap
215 # @script: script to initialize the interface
217 # @downscript: script to shut down the interface
219 # @br: bridge name (since 2.8)
221 # @helper: command to execute to configure bridge
223 # @sndbuf: send buffer limit.  Understands [TGMKkb] suffixes.
225 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
227 # @vhost: enable vhost-net network accelerator
229 # @vhostfd: file descriptor of an already opened vhost net device
231 # @vhostfds: file descriptors of multiple already opened vhost net
232 #     devices
234 # @vhostforce: vhost on for non-MSIX virtio guests
236 # @queues: number of queues to be created for multiqueue capable tap
238 # @poll-us: maximum number of microseconds that could be spent on busy
239 #     polling for tap (since 2.7)
241 # Since: 1.2
243 { 'struct': 'NetdevTapOptions',
244   'data': {
245     '*ifname':     'str',
246     '*fd':         'str',
247     '*fds':        'str',
248     '*script':     'str',
249     '*downscript': 'str',
250     '*br':         'str',
251     '*helper':     'str',
252     '*sndbuf':     'size',
253     '*vnet_hdr':   'bool',
254     '*vhost':      'bool',
255     '*vhostfd':    'str',
256     '*vhostfds':   'str',
257     '*vhostforce': 'bool',
258     '*queues':     'uint32',
259     '*poll-us':    'uint32'} }
262 # @NetdevSocketOptions:
264 # Socket netdevs are used to establish a network connection to another
265 # QEMU virtual machine via a TCP socket.
267 # @fd: file descriptor of an already opened socket
269 # @listen: port number, and optional hostname, to listen on
271 # @connect: port number, and optional hostname, to connect to
273 # @mcast: UDP multicast address and port number
275 # @localaddr: source address and port for multicast and udp packets
277 # @udp: UDP unicast address and port number
279 # Since: 1.2
281 { 'struct': 'NetdevSocketOptions',
282   'data': {
283     '*fd':        'str',
284     '*listen':    'str',
285     '*connect':   'str',
286     '*mcast':     'str',
287     '*localaddr': 'str',
288     '*udp':       'str' } }
291 # @NetdevL2TPv3Options:
293 # Configure an Ethernet over L2TPv3 tunnel.
295 # @src: source address
297 # @dst: destination address
299 # @srcport: source port - mandatory for udp, optional for ip
301 # @dstport: destination port - mandatory for udp, optional for ip
303 # @ipv6: force the use of ipv6
305 # @udp: use the udp version of l2tpv3 encapsulation
307 # @cookie64: use 64 bit cookies
309 # @counter: have sequence counter
311 # @pincounter: pin sequence counter to zero - workaround for buggy
312 #     implementations or networks with packet reorder
314 # @txcookie: 32 or 64 bit transmit cookie
316 # @rxcookie: 32 or 64 bit receive cookie
318 # @txsession: 32 bit transmit session
320 # @rxsession: 32 bit receive session - if not specified set to the
321 #     same value as transmit
323 # @offset: additional offset - allows the insertion of additional
324 #     application-specific data before the packet payload
326 # Since: 2.1
328 { 'struct': 'NetdevL2TPv3Options',
329   'data': {
330     'src':          'str',
331     'dst':          'str',
332     '*srcport':     'str',
333     '*dstport':     'str',
334     '*ipv6':        'bool',
335     '*udp':         'bool',
336     '*cookie64':    'bool',
337     '*counter':     'bool',
338     '*pincounter':  'bool',
339     '*txcookie':    'uint64',
340     '*rxcookie':    'uint64',
341     'txsession':    'uint32',
342     '*rxsession':   'uint32',
343     '*offset':      'uint32' } }
346 # @NetdevVdeOptions:
348 # Connect to a vde switch running on the host.
350 # @sock: socket path
352 # @port: port number
354 # @group: group owner of socket
356 # @mode: permissions for socket
358 # Since: 1.2
360 { 'struct': 'NetdevVdeOptions',
361   'data': {
362     '*sock':  'str',
363     '*port':  'uint16',
364     '*group': 'str',
365     '*mode':  'uint16' } }
368 # @NetdevBridgeOptions:
370 # Connect a host TAP network interface to a host bridge device.
372 # @br: bridge name
374 # @helper: command to execute to configure bridge
376 # Since: 1.2
378 { 'struct': 'NetdevBridgeOptions',
379   'data': {
380     '*br':     'str',
381     '*helper': 'str' } }
384 # @NetdevHubPortOptions:
386 # Connect two or more net clients through a software hub.
388 # @hubid: hub identifier number
390 # @netdev: used to connect hub to a netdev instead of a device (since
391 #     2.12)
393 # Since: 1.2
395 { 'struct': 'NetdevHubPortOptions',
396   'data': {
397     'hubid':     'int32',
398     '*netdev':    'str' } }
401 # @NetdevNetmapOptions:
403 # Connect a client to a netmap-enabled NIC or to a VALE switch port
405 # @ifname: Either the name of an existing network interface supported
406 #     by netmap, or the name of a VALE port (created on the fly). A
407 #     VALE port name is in the form 'valeXXX:YYY', where XXX and YYY
408 #     are non-negative integers.  XXX identifies a switch and YYY
409 #     identifies a port of the switch.  VALE ports having the same XXX
410 #     are therefore connected to the same switch.
412 # @devname: path of the netmap device (default: '/dev/netmap').
414 # Since: 2.0
416 { 'struct': 'NetdevNetmapOptions',
417   'data': {
418     'ifname':     'str',
419     '*devname':    'str' } }
422 # @AFXDPMode:
424 # Attach mode for a default XDP program
426 # @skb: generic mode, no driver support necessary
428 # @native: DRV mode, program is attached to a driver, packets are passed to
429 #     the socket without allocation of skb.
431 # Since: 8.2
433 { 'enum': 'AFXDPMode',
434   'data': [ 'native', 'skb' ],
435   'if': 'CONFIG_AF_XDP' }
438 # @NetdevAFXDPOptions:
440 # AF_XDP network backend
442 # @ifname: The name of an existing network interface.
444 # @mode: Attach mode for a default XDP program.  If not specified, then
445 #     'native' will be tried first, then 'skb'.
447 # @force-copy: Force XDP copy mode even if device supports zero-copy.
448 #     (default: false)
450 # @queues: number of queues to be used for multiqueue interfaces (default: 1).
452 # @start-queue: Use @queues starting from this queue number (default: 0).
454 # @inhibit: Don't load a default XDP program, use one already loaded to
455 #     the interface (default: false).  Requires @sock-fds.
457 # @sock-fds: A colon (:) separated list of file descriptors for already open
458 #     but not bound AF_XDP sockets in the queue order.  One fd per queue.
459 #     These descriptors should already be added into XDP socket map for
460 #     corresponding queues.  Requires @inhibit.
462 # Since: 8.2
464 { 'struct': 'NetdevAFXDPOptions',
465   'data': {
466     'ifname':       'str',
467     '*mode':        'AFXDPMode',
468     '*force-copy':  'bool',
469     '*queues':      'int',
470     '*start-queue': 'int',
471     '*inhibit':     'bool',
472     '*sock-fds':    'str' },
473   'if': 'CONFIG_AF_XDP' }
476 # @NetdevVhostUserOptions:
478 # Vhost-user network backend
480 # @chardev: name of a unix socket chardev
482 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
484 # @queues: number of queues to be created for multiqueue vhost-user
485 #     (default: 1) (Since 2.5)
487 # Since: 2.1
489 { 'struct': 'NetdevVhostUserOptions',
490   'data': {
491     'chardev':        'str',
492     '*vhostforce':    'bool',
493     '*queues':        'int' } }
496 # @NetdevVhostVDPAOptions:
498 # Vhost-vdpa network backend
500 # vDPA device is a device that uses a datapath which complies with the
501 # virtio specifications with a vendor specific control path.
503 # @vhostdev: path of vhost-vdpa device (default:'/dev/vhost-vdpa-0')
505 # @vhostfd: file descriptor of an already opened vhost vdpa device
507 # @queues: number of queues to be created for multiqueue vhost-vdpa
508 #     (default: 1)
510 # @x-svq: Start device with (experimental) shadow virtqueue.  (Since
511 #     7.1) (default: false)
513 # Features:
515 # @unstable: Member @x-svq is experimental.
517 # Since: 5.1
519 { 'struct': 'NetdevVhostVDPAOptions',
520   'data': {
521     '*vhostdev':     'str',
522     '*vhostfd':      'str',
523     '*queues':       'int',
524     '*x-svq':        {'type': 'bool', 'features' : [ 'unstable'] } } }
527 # @NetdevVmnetHostOptions:
529 # vmnet (host mode) network backend.
531 # Allows the vmnet interface to communicate with other vmnet
532 # interfaces that are in host mode and also with the host.
534 # @start-address: The starting IPv4 address to use for the interface.
535 #     Must be in the private IP range (RFC 1918). Must be specified
536 #     along with @end-address and @subnet-mask.  This address is used
537 #     as the gateway address.  The subsequent address up to and
538 #     including end-address are placed in the DHCP pool.
540 # @end-address: The DHCP IPv4 range end address to use for the
541 #     interface.  Must be in the private IP range (RFC 1918). Must be
542 #     specified along with @start-address and @subnet-mask.
544 # @subnet-mask: The IPv4 subnet mask to use on the interface.  Must be
545 #     specified along with @start-address and @subnet-mask.
547 # @isolated: Enable isolation for this interface.  Interface isolation
548 #     ensures that vmnet interface is not able to communicate with any
549 #     other vmnet interfaces.  Only communication with host is
550 #     allowed.  Requires at least macOS Big Sur 11.0.
552 # @net-uuid: The identifier (UUID) to uniquely identify the isolated
553 #     network vmnet interface should be added to.  If set, no DHCP
554 #     service is provided for this interface and network communication
555 #     is allowed only with other interfaces added to this network
556 #     identified by the UUID. Requires at least macOS Big Sur 11.0.
558 # Since: 7.1
560 { 'struct': 'NetdevVmnetHostOptions',
561   'data': {
562     '*start-address': 'str',
563     '*end-address':   'str',
564     '*subnet-mask':   'str',
565     '*isolated':      'bool',
566     '*net-uuid':      'str' },
567   'if': 'CONFIG_VMNET' }
570 # @NetdevVmnetSharedOptions:
572 # vmnet (shared mode) network backend.
574 # Allows traffic originating from the vmnet interface to reach the
575 # Internet through a network address translator (NAT). The vmnet
576 # interface can communicate with the host and with other shared mode
577 # interfaces on the same subnet.  If no DHCP settings, subnet mask and
578 # IPv6 prefix specified, the interface can communicate with any of
579 # other interfaces in shared mode.
581 # @start-address: The starting IPv4 address to use for the interface.
582 #     Must be in the private IP range (RFC 1918). Must be specified
583 #     along with @end-address and @subnet-mask.  This address is used
584 #     as the gateway address.  The subsequent address up to and
585 #     including end-address are placed in the DHCP pool.
587 # @end-address: The DHCP IPv4 range end address to use for the
588 #     interface.  Must be in the private IP range (RFC 1918). Must be
589 #     specified along with @start-address and @subnet-mask.
591 # @subnet-mask: The IPv4 subnet mask to use on the interface.  Must be
592 #     specified along with @start-address and @subnet-mask.
594 # @isolated: Enable isolation for this interface.  Interface isolation
595 #     ensures that vmnet interface is not able to communicate with any
596 #     other vmnet interfaces.  Only communication with host is
597 #     allowed.  Requires at least macOS Big Sur 11.0.
599 # @nat66-prefix: The IPv6 prefix to use into guest network.  Must be a
600 #     unique local address i.e. start with fd00::/8 and have length of
601 #     64.
603 # Since: 7.1
605 { 'struct': 'NetdevVmnetSharedOptions',
606   'data': {
607     '*start-address': 'str',
608     '*end-address':   'str',
609     '*subnet-mask':   'str',
610     '*isolated':      'bool',
611     '*nat66-prefix':  'str' },
612   'if': 'CONFIG_VMNET' }
615 # @NetdevVmnetBridgedOptions:
617 # vmnet (bridged mode) network backend.
619 # Bridges the vmnet interface with a physical network interface.
621 # @ifname: The name of the physical interface to be bridged.
623 # @isolated: Enable isolation for this interface.  Interface isolation
624 #     ensures that vmnet interface is not able to communicate with any
625 #     other vmnet interfaces.  Only communication with host is
626 #     allowed.  Requires at least macOS Big Sur 11.0.
628 # Since: 7.1
630 { 'struct': 'NetdevVmnetBridgedOptions',
631   'data': {
632     'ifname':     'str',
633     '*isolated':  'bool' },
634   'if': 'CONFIG_VMNET' }
637 # @NetdevStreamOptions:
639 # Configuration info for stream socket netdev
641 # @addr: socket address to listen on (server=true) or connect to
642 #     (server=false)
644 # @server: create server socket (default: false)
646 # @reconnect: For a client socket, if a socket is disconnected, then
647 #     attempt a reconnect after the given number of seconds.  Setting
648 #     this to zero disables this function.  (default: 0) (since 8.0)
650 # Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
652 # Since: 7.2
654 { 'struct': 'NetdevStreamOptions',
655   'data': {
656     'addr':   'SocketAddress',
657     '*server': 'bool',
658     '*reconnect': 'uint32' } }
661 # @NetdevDgramOptions:
663 # Configuration info for datagram socket netdev.
665 # @remote: remote address
667 # @local: local address
669 # Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
671 # If remote address is present and it's a multicast address, local
672 # address is optional.  Otherwise local address is required and remote
673 # address is optional.
675 # .. table:: Valid parameters combination table
676 #    :widths: auto
678 #    =============  ========  =====
679 #    remote         local     okay?
680 #    =============  ========  =====
681 #    absent         absent    no
682 #    absent         not fd    no
683 #    absent         fd        yes
684 #    multicast      absent    yes
685 #    multicast      present   yes
686 #    not multicast  absent    no
687 #    not multicast  present   yes
688 #    =============  ========  =====
690 # Since: 7.2
692 { 'struct': 'NetdevDgramOptions',
693   'data': {
694     '*local':  'SocketAddress',
695     '*remote': 'SocketAddress' } }
698 # @NetClientDriver:
700 # Available netdev drivers.
702 # @l2tpv3: since 2.1
703 # @vhost-vdpa: since 5.1
704 # @vmnet-host: since 7.1
705 # @vmnet-shared: since 7.1
706 # @vmnet-bridged: since 7.1
707 # @stream: since 7.2
708 # @dgram: since 7.2
709 # @af-xdp: since 8.2
711 # Since: 2.7
713 { 'enum': 'NetClientDriver',
714   'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream',
715             'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user',
716             'vhost-vdpa',
717             { 'name': 'af-xdp', 'if': 'CONFIG_AF_XDP' },
718             { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
719             { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
720             { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
723 # @Netdev:
725 # Captures the configuration of a network device.
727 # @id: identifier for monitor commands.
729 # @type: Specify the driver used for interpreting remaining arguments.
731 # Since: 1.2
733 { 'union': 'Netdev',
734   'base': { 'id': 'str', 'type': 'NetClientDriver' },
735   'discriminator': 'type',
736   'data': {
737     'nic':      'NetLegacyNicOptions',
738     'user':     'NetdevUserOptions',
739     'tap':      'NetdevTapOptions',
740     'l2tpv3':   'NetdevL2TPv3Options',
741     'socket':   'NetdevSocketOptions',
742     'stream':   'NetdevStreamOptions',
743     'dgram':    'NetdevDgramOptions',
744     'vde':      'NetdevVdeOptions',
745     'bridge':   'NetdevBridgeOptions',
746     'hubport':  'NetdevHubPortOptions',
747     'netmap':   'NetdevNetmapOptions',
748     'af-xdp':   { 'type': 'NetdevAFXDPOptions',
749                   'if': 'CONFIG_AF_XDP' },
750     'vhost-user': 'NetdevVhostUserOptions',
751     'vhost-vdpa': 'NetdevVhostVDPAOptions',
752     'vmnet-host': { 'type': 'NetdevVmnetHostOptions',
753                     'if': 'CONFIG_VMNET' },
754     'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions',
755                       'if': 'CONFIG_VMNET' },
756     'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions',
757                        'if': 'CONFIG_VMNET' } } }
760 # @RxState:
762 # Packets receiving state
764 # @normal: filter assigned packets according to the mac-table
766 # @none: don't receive any assigned packet
768 # @all: receive all assigned packets
770 # Since: 1.6
772 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
775 # @RxFilterInfo:
777 # Rx-filter information for a NIC.
779 # @name: net client name
781 # @promiscuous: whether promiscuous mode is enabled
783 # @multicast: multicast receive state
785 # @unicast: unicast receive state
787 # @vlan: vlan receive state (Since 2.0)
789 # @broadcast-allowed: whether to receive broadcast
791 # @multicast-overflow: multicast table is overflowed or not
793 # @unicast-overflow: unicast table is overflowed or not
795 # @main-mac: the main macaddr string
797 # @vlan-table: a list of active vlan id
799 # @unicast-table: a list of unicast macaddr string
801 # @multicast-table: a list of multicast macaddr string
803 # Since: 1.6
805 { 'struct': 'RxFilterInfo',
806   'data': {
807     'name':               'str',
808     'promiscuous':        'bool',
809     'multicast':          'RxState',
810     'unicast':            'RxState',
811     'vlan':               'RxState',
812     'broadcast-allowed':  'bool',
813     'multicast-overflow': 'bool',
814     'unicast-overflow':   'bool',
815     'main-mac':           'str',
816     'vlan-table':         ['int'],
817     'unicast-table':      ['str'],
818     'multicast-table':    ['str'] }}
821 # @query-rx-filter:
823 # Return rx-filter information for all NICs (or for the given NIC).
825 # @name: net client name
827 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
829 # Errors:
830 #     - if the given @name doesn't exist
831 #     - if the given NIC doesn't support rx-filter querying
832 #     - if the given net client isn't a NIC
834 # Since: 1.6
836 # Example:
838 #     -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
839 #     <- { "return": [
840 #             {
841 #                 "promiscuous": true,
842 #                 "name": "vnet0",
843 #                 "main-mac": "52:54:00:12:34:56",
844 #                 "unicast": "normal",
845 #                 "vlan": "normal",
846 #                 "vlan-table": [
847 #                     4,
848 #                     0
849 #                 ],
850 #                 "unicast-table": [
851 #                 ],
852 #                 "multicast": "normal",
853 #                 "multicast-overflow": false,
854 #                 "unicast-overflow": false,
855 #                 "multicast-table": [
856 #                     "01:00:5e:00:00:01",
857 #                     "33:33:00:00:00:01",
858 #                     "33:33:ff:12:34:56"
859 #                 ],
860 #                 "broadcast-allowed": false
861 #             }
862 #           ]
863 #        }
865 { 'command': 'query-rx-filter',
866   'data': { '*name': 'str' },
867   'returns': ['RxFilterInfo'] }
870 # @NIC_RX_FILTER_CHANGED:
872 # Emitted once until the 'query-rx-filter' command is executed, the
873 # first event will always be emitted
875 # @name: net client name
877 # @path: device path
879 # Since: 1.6
881 # Example:
883 #     <- { "event": "NIC_RX_FILTER_CHANGED",
884 #          "data": { "name": "vnet0",
885 #                    "path": "/machine/peripheral/vnet0/virtio-backend" },
886 #          "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
888 { 'event': 'NIC_RX_FILTER_CHANGED',
889   'data': { '*name': 'str', 'path': 'str' } }
892 # @AnnounceParameters:
894 # Parameters for self-announce timers
896 # @initial: Initial delay (in ms) before sending the first GARP/RARP
897 #     announcement
899 # @max: Maximum delay (in ms) between GARP/RARP announcement packets
901 # @rounds: Number of self-announcement attempts
903 # @step: Delay increase (in ms) after each self-announcement attempt
905 # @interfaces: An optional list of interface names, which restricts
906 #     the announcement to the listed interfaces.  (Since 4.1)
908 # @id: A name to be used to identify an instance of announce-timers
909 #     and to allow it to modified later.  Not for use as part of the
910 #     migration parameters.  (Since 4.1)
912 # Since: 4.0
915 { 'struct': 'AnnounceParameters',
916   'data': { 'initial': 'int',
917             'max': 'int',
918             'rounds': 'int',
919             'step': 'int',
920             '*interfaces': ['str'],
921             '*id' : 'str' } }
924 # @announce-self:
926 # Trigger generation of broadcast RARP frames to update network
927 # switches.  This can be useful when network bonds fail-over the
928 # active slave.
930 # Example:
932 #     -> { "execute": "announce-self",
933 #          "arguments": {
934 #              "initial": 50, "max": 550, "rounds": 10, "step": 50,
935 #              "interfaces": ["vn2", "vn3"], "id": "bob" } }
936 #     <- { "return": {} }
938 # Since: 4.0
940 { 'command': 'announce-self', 'boxed': true,
941   'data' : 'AnnounceParameters'}
944 # @FAILOVER_NEGOTIATED:
946 # Emitted when VIRTIO_NET_F_STANDBY was enabled during feature
947 # negotiation.  Failover primary devices which were hidden (not
948 # hotplugged when requested) before will now be hotplugged by the
949 # virtio-net standby device.
951 # @device-id: QEMU device id of the unplugged device
953 # Since: 4.2
955 # Example:
957 #     <- { "event": "FAILOVER_NEGOTIATED",
958 #          "data": { "device-id": "net1" },
959 #          "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
961 { 'event': 'FAILOVER_NEGOTIATED',
962   'data': {'device-id': 'str'} }
965 # @NETDEV_STREAM_CONNECTED:
967 # Emitted when the netdev stream backend is connected
969 # @netdev-id: QEMU netdev id that is connected
971 # @addr: The destination address
973 # Since: 7.2
975 # Examples:
977 #     <- { "event": "NETDEV_STREAM_CONNECTED",
978 #          "data": { "netdev-id": "netdev0",
979 #                    "addr": { "port": "47666", "ipv6": true,
980 #                              "host": "::1", "type": "inet" } },
981 #          "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
983 #     <- { "event": "NETDEV_STREAM_CONNECTED",
984 #          "data": { "netdev-id": "netdev0",
985 #                    "addr": { "path": "/tmp/qemu0", "type": "unix" } },
986 #          "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
988 { 'event': 'NETDEV_STREAM_CONNECTED',
989   'data': { 'netdev-id': 'str',
990             'addr': 'SocketAddress' } }
993 # @NETDEV_STREAM_DISCONNECTED:
995 # Emitted when the netdev stream backend is disconnected
997 # @netdev-id: QEMU netdev id that is disconnected
999 # Since: 7.2
1001 # Example:
1003 #     <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
1004 #          'data': {'netdev-id': 'netdev0'},
1005 #          'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
1007 { 'event': 'NETDEV_STREAM_DISCONNECTED',
1008   'data': { 'netdev-id': 'str' } }