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