xref: /openbmc/qemu/qapi/net.json (revision 21063bce)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4
5##
6# = Net devices
7##
8
9{ 'include': 'common.json' }
10{ 'include': 'sockets.json' }
11
12##
13# @set_link:
14#
15# Sets the link status of a virtual network adapter.
16#
17# @name: the device name of the virtual network adapter
18#
19# @up: true to set the link status to be up
20#
21# Returns: Nothing on success
22#          If @name is not a valid network device, DeviceNotFound
23#
24# Since: 0.14
25#
26# Notes: Not all network adapters support setting link status.  This command
27#        will succeed even if the network adapter does not support link status
28#        notification.
29#
30# Example:
31#
32# -> { "execute": "set_link",
33#      "arguments": { "name": "e1000.0", "up": false } }
34# <- { "return": {} }
35#
36##
37{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
38
39##
40# @netdev_add:
41#
42# Add a network backend.
43#
44# Additional arguments depend on the type.
45#
46# Since: 0.14
47#
48# Returns: Nothing on success
49#          If @type is not a valid network backend, DeviceNotFound
50#
51# Example:
52#
53# -> { "execute": "netdev_add",
54#      "arguments": { "type": "user", "id": "netdev1",
55#                     "dnssearch": [ { "str": "example.org" } ] } }
56# <- { "return": {} }
57#
58##
59{ 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true,
60  'allow-preconfig': true }
61
62##
63# @netdev_del:
64#
65# Remove a network backend.
66#
67# @id: the name of the network backend to remove
68#
69# Returns: Nothing on success
70#          If @id is not a valid network backend, DeviceNotFound
71#
72# Since: 0.14
73#
74# Example:
75#
76# -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
77# <- { "return": {} }
78#
79##
80{ 'command': 'netdev_del', 'data': {'id': 'str'},
81  'allow-preconfig': true }
82
83##
84# @NetLegacyNicOptions:
85#
86# Create a new Network Interface Card.
87#
88# @netdev: id of -netdev to connect to
89#
90# @macaddr: MAC address
91#
92# @model: device model (e1000, rtl8139, virtio etc.)
93#
94# @addr: PCI device address
95#
96# @vectors: number of MSI-x vectors, 0 to disable MSI-X
97#
98# Since: 1.2
99##
100{ 'struct': 'NetLegacyNicOptions',
101  'data': {
102    '*netdev':  'str',
103    '*macaddr': 'str',
104    '*model':   'str',
105    '*addr':    'str',
106    '*vectors': 'uint32' } }
107
108##
109# @NetdevUserOptions:
110#
111# Use the user mode network stack which requires no administrator privilege to
112# run.
113#
114# @hostname: client hostname reported by the builtin DHCP server
115#
116# @restrict: isolate the guest from the host
117#
118# @ipv4: whether to support IPv4, default true for enabled
119#        (since 2.6)
120#
121# @ipv6: whether to support IPv6, default true for enabled
122#        (since 2.6)
123#
124# @ip: legacy parameter, use net= instead
125#
126# @net: IP network address that the guest will see, in the
127#       form addr[/netmask] The netmask is optional, and can be
128#       either in the form a.b.c.d or as a number of valid top-most
129#       bits. Default is 10.0.2.0/24.
130#
131# @host: guest-visible address of the host
132#
133# @tftp: root directory of the built-in TFTP server
134#
135# @bootfile: BOOTP filename, for use with tftp=
136#
137# @dhcpstart: the first of the 16 IPs the built-in DHCP server can
138#             assign
139#
140# @dns: guest-visible address of the virtual nameserver
141#
142# @dnssearch: list of DNS suffixes to search, passed as DHCP option
143#             to the guest
144#
145# @domainname: guest-visible domain name of the virtual nameserver
146#              (since 3.0)
147#
148# @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
149#               2.6). The network prefix is given in the usual
150#               hexadecimal IPv6 address notation.
151#
152# @ipv6-prefixlen: IPv6 network prefix length (default is 64)
153#                  (since 2.6)
154#
155# @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
156#
157# @ipv6-dns: guest-visible IPv6 address of the virtual
158#            nameserver (since 2.6)
159#
160# @smb: root directory of the built-in SMB server
161#
162# @smbserver: IP address of the built-in SMB server
163#
164# @hostfwd: redirect incoming TCP or UDP host connections to guest
165#           endpoints
166#
167# @guestfwd: forward guest TCP connections
168#
169# @tftp-server-name: RFC2132 "TFTP server name" string (Since 3.1)
170#
171# Since: 1.2
172##
173{ 'struct': 'NetdevUserOptions',
174  'data': {
175    '*hostname':  'str',
176    '*restrict':  'bool',
177    '*ipv4':      'bool',
178    '*ipv6':      'bool',
179    '*ip':        'str',
180    '*net':       'str',
181    '*host':      'str',
182    '*tftp':      'str',
183    '*bootfile':  'str',
184    '*dhcpstart': 'str',
185    '*dns':       'str',
186    '*dnssearch': ['String'],
187    '*domainname': 'str',
188    '*ipv6-prefix':      'str',
189    '*ipv6-prefixlen':   'int',
190    '*ipv6-host':        'str',
191    '*ipv6-dns':         'str',
192    '*smb':       'str',
193    '*smbserver': 'str',
194    '*hostfwd':   ['String'],
195    '*guestfwd':  ['String'],
196    '*tftp-server-name': 'str' } }
197
198##
199# @NetdevTapOptions:
200#
201# Used to configure a host TAP network interface backend.
202#
203# @ifname: interface name
204#
205# @fd: file descriptor of an already opened tap
206#
207# @fds: multiple file descriptors of already opened multiqueue capable
208#       tap
209#
210# @script: script to initialize the interface
211#
212# @downscript: script to shut down the interface
213#
214# @br: bridge name (since 2.8)
215#
216# @helper: command to execute to configure bridge
217#
218# @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
219#
220# @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
221#
222# @vhost: enable vhost-net network accelerator
223#
224# @vhostfd: file descriptor of an already opened vhost net device
225#
226# @vhostfds: file descriptors of multiple already opened vhost net
227#            devices
228#
229# @vhostforce: vhost on for non-MSIX virtio guests
230#
231# @queues: number of queues to be created for multiqueue capable tap
232#
233# @poll-us: maximum number of microseconds that could
234#           be spent on busy polling for tap (since 2.7)
235#
236# Since: 1.2
237##
238{ 'struct': 'NetdevTapOptions',
239  'data': {
240    '*ifname':     'str',
241    '*fd':         'str',
242    '*fds':        'str',
243    '*script':     'str',
244    '*downscript': 'str',
245    '*br':         'str',
246    '*helper':     'str',
247    '*sndbuf':     'size',
248    '*vnet_hdr':   'bool',
249    '*vhost':      'bool',
250    '*vhostfd':    'str',
251    '*vhostfds':   'str',
252    '*vhostforce': 'bool',
253    '*queues':     'uint32',
254    '*poll-us':    'uint32'} }
255
256##
257# @NetdevSocketOptions:
258#
259# Socket netdevs are used to establish a network connection to another
260# QEMU virtual machine via a TCP socket.
261#
262# @fd: file descriptor of an already opened socket
263#
264# @listen: port number, and optional hostname, to listen on
265#
266# @connect: port number, and optional hostname, to connect to
267#
268# @mcast: UDP multicast address and port number
269#
270# @localaddr: source address and port for multicast and udp packets
271#
272# @udp: UDP unicast address and port number
273#
274# Since: 1.2
275##
276{ 'struct': 'NetdevSocketOptions',
277  'data': {
278    '*fd':        'str',
279    '*listen':    'str',
280    '*connect':   'str',
281    '*mcast':     'str',
282    '*localaddr': 'str',
283    '*udp':       'str' } }
284
285##
286# @NetdevL2TPv3Options:
287#
288# Configure an Ethernet over L2TPv3 tunnel.
289#
290# @src: source address
291#
292# @dst: destination address
293#
294# @srcport: source port - mandatory for udp, optional for ip
295#
296# @dstport: destination port - mandatory for udp, optional for ip
297#
298# @ipv6: force the use of ipv6
299#
300# @udp: use the udp version of l2tpv3 encapsulation
301#
302# @cookie64: use 64 bit cookies
303#
304# @counter: have sequence counter
305#
306# @pincounter: pin sequence counter to zero -
307#              workaround for buggy implementations or
308#              networks with packet reorder
309#
310# @txcookie: 32 or 64 bit transmit cookie
311#
312# @rxcookie: 32 or 64 bit receive cookie
313#
314# @txsession: 32 bit transmit session
315#
316# @rxsession: 32 bit receive session - if not specified
317#             set to the same value as transmit
318#
319# @offset: additional offset - allows the insertion of
320#          additional application-specific data before the packet payload
321#
322# Since: 2.1
323##
324{ 'struct': 'NetdevL2TPv3Options',
325  'data': {
326    'src':          'str',
327    'dst':          'str',
328    '*srcport':     'str',
329    '*dstport':     'str',
330    '*ipv6':        'bool',
331    '*udp':         'bool',
332    '*cookie64':    'bool',
333    '*counter':     'bool',
334    '*pincounter':  'bool',
335    '*txcookie':    'uint64',
336    '*rxcookie':    'uint64',
337    'txsession':    'uint32',
338    '*rxsession':   'uint32',
339    '*offset':      'uint32' } }
340
341##
342# @NetdevVdeOptions:
343#
344# Connect to a vde switch running on the host.
345#
346# @sock: socket path
347#
348# @port: port number
349#
350# @group: group owner of socket
351#
352# @mode: permissions for socket
353#
354# Since: 1.2
355##
356{ 'struct': 'NetdevVdeOptions',
357  'data': {
358    '*sock':  'str',
359    '*port':  'uint16',
360    '*group': 'str',
361    '*mode':  'uint16' } }
362
363##
364# @NetdevBridgeOptions:
365#
366# Connect a host TAP network interface to a host bridge device.
367#
368# @br: bridge name
369#
370# @helper: command to execute to configure bridge
371#
372# Since: 1.2
373##
374{ 'struct': 'NetdevBridgeOptions',
375  'data': {
376    '*br':     'str',
377    '*helper': 'str' } }
378
379##
380# @NetdevHubPortOptions:
381#
382# Connect two or more net clients through a software hub.
383#
384# @hubid: hub identifier number
385# @netdev: used to connect hub to a netdev instead of a device (since 2.12)
386#
387# Since: 1.2
388##
389{ 'struct': 'NetdevHubPortOptions',
390  'data': {
391    'hubid':     'int32',
392    '*netdev':    'str' } }
393
394##
395# @NetdevNetmapOptions:
396#
397# Connect a client to a netmap-enabled NIC or to a VALE switch port
398#
399# @ifname: Either the name of an existing network interface supported by
400#          netmap, or the name of a VALE port (created on the fly).
401#          A VALE port name is in the form 'valeXXX:YYY', where XXX and
402#          YYY are non-negative integers. XXX identifies a switch and
403#          YYY identifies a port of the switch. VALE ports having the
404#          same XXX are therefore connected to the same switch.
405#
406# @devname: path of the netmap device (default: '/dev/netmap').
407#
408# Since: 2.0
409##
410{ 'struct': 'NetdevNetmapOptions',
411  'data': {
412    'ifname':     'str',
413    '*devname':    'str' } }
414
415##
416# @NetdevVhostUserOptions:
417#
418# Vhost-user network backend
419#
420# @chardev: name of a unix socket chardev
421#
422# @vhostforce: vhost on for non-MSIX virtio guests (default: false).
423#
424# @queues: number of queues to be created for multiqueue vhost-user
425#          (default: 1) (Since 2.5)
426#
427# Since: 2.1
428##
429{ 'struct': 'NetdevVhostUserOptions',
430  'data': {
431    'chardev':        'str',
432    '*vhostforce':    'bool',
433    '*queues':        'int' } }
434
435##
436# @NetdevVhostVDPAOptions:
437#
438# Vhost-vdpa network backend
439#
440# vDPA device is a device that uses a datapath which complies with the virtio
441# specifications with a vendor specific control path.
442#
443# @vhostdev: path of vhost-vdpa device
444#            (default:'/dev/vhost-vdpa-0')
445#
446# @vhostfd: file descriptor of an already opened vhost vdpa device
447#
448# @queues: number of queues to be created for multiqueue vhost-vdpa
449#          (default: 1)
450#
451# @x-svq: Start device with (experimental) shadow virtqueue. (Since 7.1)
452#         (default: false)
453#
454# Features:
455# @unstable: Member @x-svq is experimental.
456#
457# Since: 5.1
458##
459{ 'struct': 'NetdevVhostVDPAOptions',
460  'data': {
461    '*vhostdev':     'str',
462    '*vhostfd':      'str',
463    '*queues':       'int',
464    '*x-svq':        {'type': 'bool', 'features' : [ 'unstable'] } } }
465
466##
467# @NetdevVmnetHostOptions:
468#
469# vmnet (host mode) network backend.
470#
471# Allows the vmnet interface to communicate with other vmnet
472# interfaces that are in host mode and also with the host.
473#
474# @start-address: The starting IPv4 address to use for the interface.
475#                 Must be in the private IP range (RFC 1918). Must be
476#                 specified along with @end-address and @subnet-mask.
477#                 This address is used as the gateway address. The
478#                 subsequent address up to and including end-address are
479#                 placed in the DHCP pool.
480#
481# @end-address: The DHCP IPv4 range end address to use for the
482#               interface. Must be in the private IP range (RFC 1918).
483#               Must be specified along with @start-address and
484#               @subnet-mask.
485#
486# @subnet-mask: The IPv4 subnet mask to use on the interface. Must
487#               be specified along with @start-address and @subnet-mask.
488#
489# @isolated: Enable isolation for this interface. Interface isolation
490#            ensures that vmnet interface is not able to communicate
491#            with any other vmnet interfaces. Only communication with
492#            host is allowed. Requires at least macOS Big Sur 11.0.
493#
494# @net-uuid: The identifier (UUID) to uniquely identify the isolated
495#            network vmnet interface should be added to. If
496#            set, no DHCP service is provided for this interface and
497#            network communication is allowed only with other interfaces
498#            added to this network identified by the UUID. Requires
499#            at least macOS Big Sur 11.0.
500#
501# Since: 7.1
502##
503{ 'struct': 'NetdevVmnetHostOptions',
504  'data': {
505    '*start-address': 'str',
506    '*end-address':   'str',
507    '*subnet-mask':   'str',
508    '*isolated':      'bool',
509    '*net-uuid':      'str' },
510  'if': 'CONFIG_VMNET' }
511
512##
513# @NetdevVmnetSharedOptions:
514#
515# vmnet (shared mode) network backend.
516#
517# Allows traffic originating from the vmnet interface to reach the
518# Internet through a network address translator (NAT).
519# The vmnet interface can communicate with the host and with
520# other shared mode interfaces on the same subnet. If no DHCP
521# settings, subnet mask and IPv6 prefix specified, the interface can
522# communicate with any of other interfaces in shared mode.
523#
524# @start-address: The starting IPv4 address to use for the interface.
525#                 Must be in the private IP range (RFC 1918). Must be
526#                 specified along with @end-address and @subnet-mask.
527#                 This address is used as the gateway address. The
528#                 subsequent address up to and including end-address are
529#                 placed in the DHCP pool.
530#
531# @end-address: The DHCP IPv4 range end address to use for the
532#               interface. Must be in the private IP range (RFC 1918).
533#               Must be specified along with @start-address and @subnet-mask.
534#
535# @subnet-mask: The IPv4 subnet mask to use on the interface. Must
536#                be specified along with @start-address and @subnet-mask.
537#
538# @isolated: Enable isolation for this interface. Interface isolation
539#            ensures that vmnet interface is not able to communicate
540#            with any other vmnet interfaces. Only communication with
541#            host is allowed. Requires at least macOS Big Sur 11.0.
542#
543# @nat66-prefix: The IPv6 prefix to use into guest network. Must be a
544#                unique local address i.e. start with fd00::/8 and have
545#                length of 64.
546#
547# Since: 7.1
548##
549{ 'struct': 'NetdevVmnetSharedOptions',
550  'data': {
551    '*start-address': 'str',
552    '*end-address':   'str',
553    '*subnet-mask':   'str',
554    '*isolated':      'bool',
555    '*nat66-prefix':  'str' },
556  'if': 'CONFIG_VMNET' }
557
558##
559# @NetdevVmnetBridgedOptions:
560#
561# vmnet (bridged mode) network backend.
562#
563# Bridges the vmnet interface with a physical network interface.
564#
565# @ifname: The name of the physical interface to be bridged.
566#
567# @isolated: Enable isolation for this interface. Interface isolation
568#            ensures that vmnet interface is not able to communicate
569#            with any other vmnet interfaces. Only communication with
570#            host is allowed. Requires at least macOS Big Sur 11.0.
571#
572# Since: 7.1
573##
574{ 'struct': 'NetdevVmnetBridgedOptions',
575  'data': {
576    'ifname':     'str',
577    '*isolated':  'bool' },
578  'if': 'CONFIG_VMNET' }
579
580##
581# @NetdevStreamOptions:
582#
583# Configuration info for stream socket netdev
584#
585# @addr: socket address to listen on (server=true)
586#        or connect to (server=false)
587# @server: create server socket (default: false)
588# @reconnect: For a client socket, if a socket is disconnected,
589#             then attempt a reconnect after the given number of seconds.
590#             Setting this to zero disables this function. (default: 0)
591#             (since 8.0)
592#
593# Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
594#
595# Since: 7.2
596##
597{ 'struct': 'NetdevStreamOptions',
598  'data': {
599    'addr':   'SocketAddress',
600    '*server': 'bool',
601    '*reconnect': 'uint32' } }
602
603##
604# @NetdevDgramOptions:
605#
606# Configuration info for datagram socket netdev.
607#
608# @remote: remote address
609# @local: local address
610#
611# Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
612#
613# If remote address is present and it's a multicast address, local address
614# is optional. Otherwise local address is required and remote address is
615# optional.
616#
617# .. table:: Valid parameters combination table
618#    :widths: auto
619#
620#    =============  ========  =====
621#    remote         local     okay?
622#    =============  ========  =====
623#    absent         absent    no
624#    absent         not fd    no
625#    absent         fd        yes
626#    multicast      absent    yes
627#    multicast      present   yes
628#    not multicast  absent    no
629#    not multicast  present   yes
630#    =============  ========  =====
631#
632# Since: 7.2
633##
634{ 'struct': 'NetdevDgramOptions',
635  'data': {
636    '*local':  'SocketAddress',
637    '*remote': 'SocketAddress' } }
638
639##
640# @NetClientDriver:
641#
642# Available netdev drivers.
643#
644# Since: 2.7
645#
646#        @vhost-vdpa since 5.1
647#        @vmnet-host since 7.1
648#        @vmnet-shared since 7.1
649#        @vmnet-bridged since 7.1
650#        @stream since 7.2
651#        @dgram since 7.2
652##
653{ 'enum': 'NetClientDriver',
654  'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream',
655            'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user',
656            'vhost-vdpa',
657            { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
658            { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
659            { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
660
661##
662# @Netdev:
663#
664# Captures the configuration of a network device.
665#
666# @id: identifier for monitor commands.
667#
668# @type: Specify the driver used for interpreting remaining arguments.
669#
670# Since: 1.2
671#
672#        'l2tpv3' - since 2.1
673#        'vmnet-host' - since 7.1
674#        'vmnet-shared' - since 7.1
675#        'vmnet-bridged' - since 7.1
676#        'stream' since 7.2
677#        'dgram' since 7.2
678##
679{ 'union': 'Netdev',
680  'base': { 'id': 'str', 'type': 'NetClientDriver' },
681  'discriminator': 'type',
682  'data': {
683    'nic':      'NetLegacyNicOptions',
684    'user':     'NetdevUserOptions',
685    'tap':      'NetdevTapOptions',
686    'l2tpv3':   'NetdevL2TPv3Options',
687    'socket':   'NetdevSocketOptions',
688    'stream':   'NetdevStreamOptions',
689    'dgram':    'NetdevDgramOptions',
690    'vde':      'NetdevVdeOptions',
691    'bridge':   'NetdevBridgeOptions',
692    'hubport':  'NetdevHubPortOptions',
693    'netmap':   'NetdevNetmapOptions',
694    'vhost-user': 'NetdevVhostUserOptions',
695    'vhost-vdpa': 'NetdevVhostVDPAOptions',
696    'vmnet-host': { 'type': 'NetdevVmnetHostOptions',
697                    'if': 'CONFIG_VMNET' },
698    'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions',
699                      'if': 'CONFIG_VMNET' },
700    'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions',
701                       'if': 'CONFIG_VMNET' } } }
702
703##
704# @RxState:
705#
706# Packets receiving state
707#
708# @normal: filter assigned packets according to the mac-table
709#
710# @none: don't receive any assigned packet
711#
712# @all: receive all assigned packets
713#
714# Since: 1.6
715##
716{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
717
718##
719# @RxFilterInfo:
720#
721# Rx-filter information for a NIC.
722#
723# @name: net client name
724#
725# @promiscuous: whether promiscuous mode is enabled
726#
727# @multicast: multicast receive state
728#
729# @unicast: unicast receive state
730#
731# @vlan: vlan receive state (Since 2.0)
732#
733# @broadcast-allowed: whether to receive broadcast
734#
735# @multicast-overflow: multicast table is overflowed or not
736#
737# @unicast-overflow: unicast table is overflowed or not
738#
739# @main-mac: the main macaddr string
740#
741# @vlan-table: a list of active vlan id
742#
743# @unicast-table: a list of unicast macaddr string
744#
745# @multicast-table: a list of multicast macaddr string
746#
747# Since: 1.6
748##
749{ 'struct': 'RxFilterInfo',
750  'data': {
751    'name':               'str',
752    'promiscuous':        'bool',
753    'multicast':          'RxState',
754    'unicast':            'RxState',
755    'vlan':               'RxState',
756    'broadcast-allowed':  'bool',
757    'multicast-overflow': 'bool',
758    'unicast-overflow':   'bool',
759    'main-mac':           'str',
760    'vlan-table':         ['int'],
761    'unicast-table':      ['str'],
762    'multicast-table':    ['str'] }}
763
764##
765# @query-rx-filter:
766#
767# Return rx-filter information for all NICs (or for the given NIC).
768#
769# @name: net client name
770#
771# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
772#          Returns an error if the given @name doesn't exist, or given
773#          NIC doesn't support rx-filter querying, or given net client
774#          isn't a NIC.
775#
776# Since: 1.6
777#
778# Example:
779#
780# -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
781# <- { "return": [
782#         {
783#             "promiscuous": true,
784#             "name": "vnet0",
785#             "main-mac": "52:54:00:12:34:56",
786#             "unicast": "normal",
787#             "vlan": "normal",
788#             "vlan-table": [
789#                 4,
790#                 0
791#             ],
792#             "unicast-table": [
793#             ],
794#             "multicast": "normal",
795#             "multicast-overflow": false,
796#             "unicast-overflow": false,
797#             "multicast-table": [
798#                 "01:00:5e:00:00:01",
799#                 "33:33:00:00:00:01",
800#                 "33:33:ff:12:34:56"
801#             ],
802#             "broadcast-allowed": false
803#         }
804#       ]
805#    }
806#
807##
808{ 'command': 'query-rx-filter',
809  'data': { '*name': 'str' },
810  'returns': ['RxFilterInfo'] }
811
812##
813# @NIC_RX_FILTER_CHANGED:
814#
815# Emitted once until the 'query-rx-filter' command is executed, the first event
816# will always be emitted
817#
818# @name: net client name
819#
820# @path: device path
821#
822# Since: 1.6
823#
824# Example:
825#
826# <- { "event": "NIC_RX_FILTER_CHANGED",
827#      "data": { "name": "vnet0",
828#                "path": "/machine/peripheral/vnet0/virtio-backend" },
829#      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
830#
831##
832{ 'event': 'NIC_RX_FILTER_CHANGED',
833  'data': { '*name': 'str', 'path': 'str' } }
834
835##
836# @AnnounceParameters:
837#
838# Parameters for self-announce timers
839#
840# @initial: Initial delay (in ms) before sending the first GARP/RARP
841#           announcement
842#
843# @max: Maximum delay (in ms) between GARP/RARP announcement packets
844#
845# @rounds: Number of self-announcement attempts
846#
847# @step: Delay increase (in ms) after each self-announcement attempt
848#
849# @interfaces: An optional list of interface names, which restricts the
850#              announcement to the listed interfaces. (Since 4.1)
851#
852# @id: A name to be used to identify an instance of announce-timers
853#      and to allow it to modified later.  Not for use as
854#      part of the migration parameters. (Since 4.1)
855#
856# Since: 4.0
857##
858
859{ 'struct': 'AnnounceParameters',
860  'data': { 'initial': 'int',
861            'max': 'int',
862            'rounds': 'int',
863            'step': 'int',
864            '*interfaces': ['str'],
865            '*id' : 'str' } }
866
867##
868# @announce-self:
869#
870# Trigger generation of broadcast RARP frames to update network switches.
871# This can be useful when network bonds fail-over the active slave.
872#
873# Example:
874#
875# -> { "execute": "announce-self",
876#      "arguments": {
877#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
878#          "interfaces": ["vn2", "vn3"], "id": "bob" } }
879# <- { "return": {} }
880#
881# Since: 4.0
882##
883{ 'command': 'announce-self', 'boxed': true,
884  'data' : 'AnnounceParameters'}
885
886##
887# @FAILOVER_NEGOTIATED:
888#
889# Emitted when VIRTIO_NET_F_STANDBY was enabled during feature negotiation.
890# Failover primary devices which were hidden (not hotplugged when requested)
891# before will now be hotplugged by the virtio-net standby device.
892#
893# @device-id: QEMU device id of the unplugged device
894#
895# Since: 4.2
896#
897# Example:
898#
899# <- { "event": "FAILOVER_NEGOTIATED",
900#      "data": { "device-id": "net1" },
901#      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
902#
903##
904{ 'event': 'FAILOVER_NEGOTIATED',
905  'data': {'device-id': 'str'} }
906
907##
908# @NETDEV_STREAM_CONNECTED:
909#
910# Emitted when the netdev stream backend is connected
911#
912# @netdev-id: QEMU netdev id that is connected
913# @addr: The destination address
914#
915# Since: 7.2
916#
917# Example:
918#
919# <- { "event": "NETDEV_STREAM_CONNECTED",
920#      "data": { "netdev-id": "netdev0",
921#                "addr": { "port": "47666", "ipv6": true,
922#                          "host": "::1", "type": "inet" } },
923#      "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
924#
925# or
926#
927# <- { "event": "NETDEV_STREAM_CONNECTED",
928#      "data": { "netdev-id": "netdev0",
929#                "addr": { "path": "/tmp/qemu0", "type": "unix" } },
930#      "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
931#
932##
933{ 'event': 'NETDEV_STREAM_CONNECTED',
934  'data': { 'netdev-id': 'str',
935            'addr': 'SocketAddress' } }
936
937##
938# @NETDEV_STREAM_DISCONNECTED:
939#
940# Emitted when the netdev stream backend is disconnected
941#
942# @netdev-id: QEMU netdev id that is disconnected
943#
944# Since: 7.2
945#
946# Example:
947#
948# <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
949#      'data': {'netdev-id': 'netdev0'},
950#      'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
951#
952##
953{ 'event': 'NETDEV_STREAM_DISCONNECTED',
954  'data': { 'netdev-id': 'str' } }
955