xref: /openbmc/qemu/qapi/net.json (revision 954a6c4f)
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#
589# Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
590#
591# Since: 7.2
592##
593{ 'struct': 'NetdevStreamOptions',
594  'data': {
595    'addr':   'SocketAddress',
596    '*server': 'bool' } }
597
598##
599# @NetdevDgramOptions:
600#
601# Configuration info for datagram socket netdev.
602#
603# @remote: remote address
604# @local: local address
605#
606# Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
607#
608# If remote address is present and it's a multicast address, local address
609# is optional. Otherwise local address is required and remote address is
610# optional.
611#
612# .. table:: Valid parameters combination table
613#    :widths: auto
614#
615#    =============  ========  =====
616#    remote         local     okay?
617#    =============  ========  =====
618#    absent         absent    no
619#    absent         not fd    no
620#    absent         fd        yes
621#    multicast      absent    yes
622#    multicast      present   yes
623#    not multicast  absent    no
624#    not multicast  present   yes
625#    =============  ========  =====
626#
627# Since: 7.2
628##
629{ 'struct': 'NetdevDgramOptions',
630  'data': {
631    '*local':  'SocketAddress',
632    '*remote': 'SocketAddress' } }
633
634##
635# @NetClientDriver:
636#
637# Available netdev drivers.
638#
639# Since: 2.7
640#
641#        @vhost-vdpa since 5.1
642#        @vmnet-host since 7.1
643#        @vmnet-shared since 7.1
644#        @vmnet-bridged since 7.1
645#        @stream since 7.2
646#        @dgram since 7.2
647##
648{ 'enum': 'NetClientDriver',
649  'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream',
650            'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user',
651            'vhost-vdpa',
652            { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
653            { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
654            { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
655
656##
657# @Netdev:
658#
659# Captures the configuration of a network device.
660#
661# @id: identifier for monitor commands.
662#
663# @type: Specify the driver used for interpreting remaining arguments.
664#
665# Since: 1.2
666#
667#        'l2tpv3' - since 2.1
668#        'vmnet-host' - since 7.1
669#        'vmnet-shared' - since 7.1
670#        'vmnet-bridged' - since 7.1
671#        'stream' since 7.2
672#        'dgram' since 7.2
673##
674{ 'union': 'Netdev',
675  'base': { 'id': 'str', 'type': 'NetClientDriver' },
676  'discriminator': 'type',
677  'data': {
678    'nic':      'NetLegacyNicOptions',
679    'user':     'NetdevUserOptions',
680    'tap':      'NetdevTapOptions',
681    'l2tpv3':   'NetdevL2TPv3Options',
682    'socket':   'NetdevSocketOptions',
683    'stream':   'NetdevStreamOptions',
684    'dgram':    'NetdevDgramOptions',
685    'vde':      'NetdevVdeOptions',
686    'bridge':   'NetdevBridgeOptions',
687    'hubport':  'NetdevHubPortOptions',
688    'netmap':   'NetdevNetmapOptions',
689    'vhost-user': 'NetdevVhostUserOptions',
690    'vhost-vdpa': 'NetdevVhostVDPAOptions',
691    'vmnet-host': { 'type': 'NetdevVmnetHostOptions',
692                    'if': 'CONFIG_VMNET' },
693    'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions',
694                      'if': 'CONFIG_VMNET' },
695    'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions',
696                       'if': 'CONFIG_VMNET' } } }
697
698##
699# @RxState:
700#
701# Packets receiving state
702#
703# @normal: filter assigned packets according to the mac-table
704#
705# @none: don't receive any assigned packet
706#
707# @all: receive all assigned packets
708#
709# Since: 1.6
710##
711{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
712
713##
714# @RxFilterInfo:
715#
716# Rx-filter information for a NIC.
717#
718# @name: net client name
719#
720# @promiscuous: whether promiscuous mode is enabled
721#
722# @multicast: multicast receive state
723#
724# @unicast: unicast receive state
725#
726# @vlan: vlan receive state (Since 2.0)
727#
728# @broadcast-allowed: whether to receive broadcast
729#
730# @multicast-overflow: multicast table is overflowed or not
731#
732# @unicast-overflow: unicast table is overflowed or not
733#
734# @main-mac: the main macaddr string
735#
736# @vlan-table: a list of active vlan id
737#
738# @unicast-table: a list of unicast macaddr string
739#
740# @multicast-table: a list of multicast macaddr string
741#
742# Since: 1.6
743##
744{ 'struct': 'RxFilterInfo',
745  'data': {
746    'name':               'str',
747    'promiscuous':        'bool',
748    'multicast':          'RxState',
749    'unicast':            'RxState',
750    'vlan':               'RxState',
751    'broadcast-allowed':  'bool',
752    'multicast-overflow': 'bool',
753    'unicast-overflow':   'bool',
754    'main-mac':           'str',
755    'vlan-table':         ['int'],
756    'unicast-table':      ['str'],
757    'multicast-table':    ['str'] }}
758
759##
760# @query-rx-filter:
761#
762# Return rx-filter information for all NICs (or for the given NIC).
763#
764# @name: net client name
765#
766# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
767#          Returns an error if the given @name doesn't exist, or given
768#          NIC doesn't support rx-filter querying, or given net client
769#          isn't a NIC.
770#
771# Since: 1.6
772#
773# Example:
774#
775# -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
776# <- { "return": [
777#         {
778#             "promiscuous": true,
779#             "name": "vnet0",
780#             "main-mac": "52:54:00:12:34:56",
781#             "unicast": "normal",
782#             "vlan": "normal",
783#             "vlan-table": [
784#                 4,
785#                 0
786#             ],
787#             "unicast-table": [
788#             ],
789#             "multicast": "normal",
790#             "multicast-overflow": false,
791#             "unicast-overflow": false,
792#             "multicast-table": [
793#                 "01:00:5e:00:00:01",
794#                 "33:33:00:00:00:01",
795#                 "33:33:ff:12:34:56"
796#             ],
797#             "broadcast-allowed": false
798#         }
799#       ]
800#    }
801#
802##
803{ 'command': 'query-rx-filter',
804  'data': { '*name': 'str' },
805  'returns': ['RxFilterInfo'] }
806
807##
808# @NIC_RX_FILTER_CHANGED:
809#
810# Emitted once until the 'query-rx-filter' command is executed, the first event
811# will always be emitted
812#
813# @name: net client name
814#
815# @path: device path
816#
817# Since: 1.6
818#
819# Example:
820#
821# <- { "event": "NIC_RX_FILTER_CHANGED",
822#      "data": { "name": "vnet0",
823#                "path": "/machine/peripheral/vnet0/virtio-backend" },
824#      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
825#
826##
827{ 'event': 'NIC_RX_FILTER_CHANGED',
828  'data': { '*name': 'str', 'path': 'str' } }
829
830##
831# @AnnounceParameters:
832#
833# Parameters for self-announce timers
834#
835# @initial: Initial delay (in ms) before sending the first GARP/RARP
836#           announcement
837#
838# @max: Maximum delay (in ms) between GARP/RARP announcement packets
839#
840# @rounds: Number of self-announcement attempts
841#
842# @step: Delay increase (in ms) after each self-announcement attempt
843#
844# @interfaces: An optional list of interface names, which restricts the
845#              announcement to the listed interfaces. (Since 4.1)
846#
847# @id: A name to be used to identify an instance of announce-timers
848#      and to allow it to modified later.  Not for use as
849#      part of the migration parameters. (Since 4.1)
850#
851# Since: 4.0
852##
853
854{ 'struct': 'AnnounceParameters',
855  'data': { 'initial': 'int',
856            'max': 'int',
857            'rounds': 'int',
858            'step': 'int',
859            '*interfaces': ['str'],
860            '*id' : 'str' } }
861
862##
863# @announce-self:
864#
865# Trigger generation of broadcast RARP frames to update network switches.
866# This can be useful when network bonds fail-over the active slave.
867#
868# Example:
869#
870# -> { "execute": "announce-self",
871#      "arguments": {
872#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
873#          "interfaces": ["vn2", "vn3"], "id": "bob" } }
874# <- { "return": {} }
875#
876# Since: 4.0
877##
878{ 'command': 'announce-self', 'boxed': true,
879  'data' : 'AnnounceParameters'}
880
881##
882# @FAILOVER_NEGOTIATED:
883#
884# Emitted when VIRTIO_NET_F_STANDBY was enabled during feature negotiation.
885# Failover primary devices which were hidden (not hotplugged when requested)
886# before will now be hotplugged by the virtio-net standby device.
887#
888# @device-id: QEMU device id of the unplugged device
889#
890# Since: 4.2
891#
892# Example:
893#
894# <- { "event": "FAILOVER_NEGOTIATED",
895#      "data": { "device-id": "net1" },
896#      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
897#
898##
899{ 'event': 'FAILOVER_NEGOTIATED',
900  'data': {'device-id': 'str'} }
901
902##
903# @NETDEV_STREAM_CONNECTED:
904#
905# Emitted when the netdev stream backend is connected
906#
907# @netdev-id: QEMU netdev id that is connected
908# @addr: The destination address
909#
910# Since: 7.2
911#
912# Example:
913#
914# <- { "event": "NETDEV_STREAM_CONNECTED",
915#      "data": { "netdev-id": "netdev0",
916#                "addr": { "port": "47666", "ipv6": true,
917#                          "host": "::1", "type": "inet" } },
918#      "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
919#
920# or
921#
922# <- { "event": "NETDEV_STREAM_CONNECTED",
923#      "data": { "netdev-id": "netdev0",
924#                "addr": { "path": "/tmp/qemu0", "type": "unix" } },
925#      "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
926#
927##
928{ 'event': 'NETDEV_STREAM_CONNECTED',
929  'data': { 'netdev-id': 'str',
930            'addr': 'SocketAddress' } }
931
932##
933# @NETDEV_STREAM_DISCONNECTED:
934#
935# Emitted when the netdev stream backend is disconnected
936#
937# @netdev-id: QEMU netdev id that is disconnected
938#
939# Since: 7.2
940#
941# Example:
942#
943# <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
944#      'data': {'netdev-id': 'netdev0'},
945#      'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
946#
947##
948{ 'event': 'NETDEV_STREAM_DISCONNECTED',
949  'data': { 'netdev-id': 'str' } }
950