| 1 | # -*- Mode: Python -*- |
| 2 | # vim: filetype=python |
| 3 | # |
| 4 | |
| 5 | ## |
| 6 | # *********** |
| 7 | # Net devices |
| 8 | # *********** |
| 9 | ## |
| 10 | |
| 11 | { 'include': 'sockets.json' } |
| 12 | |
| 13 | ## |
| 14 | # @set_link: |
| 15 | # |
| 16 | # Sets the link status of a virtual network adapter. |
| 17 | # |
| 18 | # @name: the device name of the virtual network adapter |
| 19 | # |
| 20 | # @up: true to set the link status to be up |
| 21 | # |
| 22 | # Errors: |
| 23 | # - If @name is not a valid network device, DeviceNotFound |
| 24 | # |
| 25 | # Since: 0.14 |
| 26 | # |
| 27 | # .. note:: Not all network adapters support setting link status. |
| 28 | # This command will succeed even if the network adapter does not |
| 29 | # support link status notification. |
| 30 | # |
| 31 | # .. qmp-example:: |
| 32 | # |
| 33 | # -> { "execute": "set_link", |
| 34 | # "arguments": { "name": "e1000.0", "up": false } } |
| 35 | # <- { "return": {} } |
| 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 | # Errors: |
| 49 | # - If @type is not a valid network backend, DeviceNotFound |
| 50 | # |
| 51 | # .. qmp-example:: |
| 52 | # |
| 53 | # -> { "execute": "netdev_add", |
| 54 | # "arguments": { "type": "user", "id": "netdev1", |
| 55 | # "dnssearch": [ { "str": "example.org" } ] } } |
| 56 | # <- { "return": {} } |
| 57 | ## |
| 58 | { 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true, |
| 59 | 'allow-preconfig': true } |
| 60 | |
| 61 | ## |
| 62 | # @netdev_del: |
| 63 | # |
| 64 | # Remove a network backend. |
| 65 | # |
| 66 | # @id: the name of the network backend to remove |
| 67 | # |
| 68 | # Errors: |
| 69 | # - If @id is not a valid network backend, DeviceNotFound |
| 70 | # |
| 71 | # Since: 0.14 |
| 72 | # |
| 73 | # .. qmp-example:: |
| 74 | # |
| 75 | # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } |
| 76 | # <- { "return": {} } |
| 77 | ## |
| 78 | { 'command': 'netdev_del', 'data': {'id': 'str'}, |
| 79 | 'allow-preconfig': true } |
| 80 | |
| 81 | ## |
| 82 | # @NetLegacyNicOptions: |
| 83 | # |
| 84 | # Create a new Network Interface Card. |
| 85 | # |
| 86 | # @netdev: id of -netdev to connect to |
| 87 | # |
| 88 | # @macaddr: MAC address |
| 89 | # |
| 90 | # @model: device model (e1000, rtl8139, virtio etc.) |
| 91 | # |
| 92 | # @addr: PCI device address |
| 93 | # |
| 94 | # @vectors: number of MSI-x vectors, 0 to disable MSI-X |
| 95 | # |
| 96 | # Since: 1.2 |
| 97 | ## |
| 98 | { 'struct': 'NetLegacyNicOptions', |
| 99 | 'data': { |
| 100 | '*netdev': 'str', |
| 101 | '*macaddr': 'str', |
| 102 | '*model': 'str', |
| 103 | '*addr': 'str', |
| 104 | '*vectors': 'uint32' } } |
| 105 | |
| 106 | ## |
| 107 | # @PasstSearch: |
| 108 | # |
| 109 | # @str: DNS domain name suffix for host name lookup, or "none". See |
| 110 | # passt(1) option --search. |
| 111 | # |
| 112 | # Since: 10.1 |
| 113 | ## |
| 114 | { 'struct': 'PasstSearch', |
| 115 | 'data': { |
| 116 | 'str': 'str' } } |
| 117 | |
| 118 | ## |
| 119 | # @PasstPortForward: |
| 120 | # |
| 121 | # @str: passt port forwarding specification, see passt(1) option |
| 122 | # --tcp-ports and --udp-ports. |
| 123 | # |
| 124 | # Since: 10.1 |
| 125 | ## |
| 126 | { 'struct': 'PasstPortForward', |
| 127 | 'data': { |
| 128 | 'str': 'str' } } |
| 129 | |
| 130 | ## |
| 131 | # @PasstParameter: |
| 132 | # |
| 133 | # @str: Additional arguments for the passt executable, see passt(1) |
| 134 | # |
| 135 | # Since: 10.1 |
| 136 | ## |
| 137 | { 'struct': 'PasstParameter', |
| 138 | 'data': { |
| 139 | 'str': 'str' } } |
| 140 | |
| 141 | ## |
| 142 | # @NetdevPasstOptions: |
| 143 | # |
| 144 | # Unprivileged user-mode network connectivity using passt |
| 145 | # |
| 146 | # @path: Filename of the passt program to run (by default 'passt', and |
| 147 | # use PATH) |
| 148 | # |
| 149 | # @quiet: don't print informational messages (default, passed as |
| 150 | # '--quiet') |
| 151 | # |
| 152 | # @vhost-user: enable vhost-user |
| 153 | # |
| 154 | # @mtu: assign MTU via DHCP/NDP |
| 155 | # |
| 156 | # @address: IPv4 or IPv6 address |
| 157 | # |
| 158 | # @netmask: IPv4 mask |
| 159 | # |
| 160 | # @mac: source MAC address |
| 161 | # |
| 162 | # @gateway: IPv4 or IPv6 address as gateway |
| 163 | # |
| 164 | # @interface: interface for addresses and routes |
| 165 | # |
| 166 | # @outbound: bind to address as outbound source |
| 167 | # |
| 168 | # @outbound-if4: bind to outbound interface for IPv4 |
| 169 | # |
| 170 | # @outbound-if6: bind to outbound interface for IPv6 |
| 171 | # |
| 172 | # @dns: IPv4 or IPv6 address as DNS |
| 173 | # |
| 174 | # @search: search domains |
| 175 | # |
| 176 | # @fqdn: FQDN to configure client with |
| 177 | # |
| 178 | # @dhcp-dns: enable/disable DNS list in DHCP/DHCPv6/NDP |
| 179 | # |
| 180 | # @dhcp-search: enable/disable list in DHCP/DHCPv6/NDP |
| 181 | # |
| 182 | # @map-host-loopback: addresse to refer to host |
| 183 | # |
| 184 | # @map-guest-addr: addr to translate to guest's address |
| 185 | # |
| 186 | # @dns-forward: forward DNS queries sent to |
| 187 | # |
| 188 | # @dns-host: host nameserver to direct queries to |
| 189 | # |
| 190 | # @tcp: enable/disable TCP |
| 191 | # |
| 192 | # @udp: enable/disable UDP |
| 193 | # |
| 194 | # @icmp: enable/disable ICMP |
| 195 | # |
| 196 | # @dhcp: enable/disable DHCP |
| 197 | # |
| 198 | # @ndp: enable/disable NDP |
| 199 | # |
| 200 | # @dhcpv6: enable/disable DHCPv6 |
| 201 | # |
| 202 | # @ra: enable/disable route advertisements |
| 203 | # |
| 204 | # @freebind: bind to any address for forwarding |
| 205 | # |
| 206 | # @ipv4: enable/disable IPv4 |
| 207 | # |
| 208 | # @ipv6: enable/disable IPv6 |
| 209 | # |
| 210 | # @tcp-ports: TCP ports to forward |
| 211 | # |
| 212 | # @udp-ports: UDP ports to forward |
| 213 | # |
| 214 | # @param: parameter to pass to passt command |
| 215 | # |
| 216 | # Since: 10.1 |
| 217 | ## |
| 218 | { 'struct': 'NetdevPasstOptions', |
| 219 | 'data': { |
| 220 | '*path': 'str', |
| 221 | '*quiet': 'bool', |
| 222 | '*vhost-user': 'bool', |
| 223 | '*mtu': 'int', |
| 224 | '*address': 'str', |
| 225 | '*netmask': 'str', |
| 226 | '*mac': 'str', |
| 227 | '*gateway': 'str', |
| 228 | '*interface': 'str', |
| 229 | '*outbound': 'str', |
| 230 | '*outbound-if4': 'str', |
| 231 | '*outbound-if6': 'str', |
| 232 | '*dns': 'str', |
| 233 | '*search': ['PasstSearch'], |
| 234 | '*fqdn': 'str', |
| 235 | '*dhcp-dns': 'bool', |
| 236 | '*dhcp-search': 'bool', |
| 237 | '*map-host-loopback': 'str', |
| 238 | '*map-guest-addr': 'str', |
| 239 | '*dns-forward': 'str', |
| 240 | '*dns-host': 'str', |
| 241 | '*tcp': 'bool', |
| 242 | '*udp': 'bool', |
| 243 | '*icmp': 'bool', |
| 244 | '*dhcp': 'bool', |
| 245 | '*ndp': 'bool', |
| 246 | '*dhcpv6': 'bool', |
| 247 | '*ra': 'bool', |
| 248 | '*freebind': 'bool', |
| 249 | '*ipv4': 'bool', |
| 250 | '*ipv6': 'bool', |
| 251 | '*tcp-ports': ['PasstPortForward'], |
| 252 | '*udp-ports': ['PasstPortForward'], |
| 253 | '*param': ['PasstParameter'] }, |
| 254 | 'if': 'CONFIG_PASST' } |
| 255 | |
| 256 | ## |
| 257 | # @NetdevUserDomainSuffix: |
| 258 | # |
| 259 | # @str: DNS domain name suffix for host name lookup, similar to |
| 260 | # resolv.conf(5) |
| 261 | # |
| 262 | # Since: 1.2 |
| 263 | ## |
| 264 | { 'struct': 'NetdevUserDomainSuffix', |
| 265 | 'data': { |
| 266 | 'str': 'str' } } |
| 267 | |
| 268 | ## |
| 269 | # @NetdevUserHostForward: |
| 270 | # |
| 271 | # @str: Host port forwarding rule |
| 272 | # |
| 273 | # TODO: This string gets parsed by slirp_hostfwd(). We fail to |
| 274 | # document syntax and semantics here. We do in qemu-options.hx. |
| 275 | # Parsing structured configuration from strings is a no-no for QMP. |
| 276 | # This should really be a struct. Not sure it's worth the bother |
| 277 | # now. |
| 278 | # |
| 279 | # Since: 1.2 |
| 280 | ## |
| 281 | { 'struct': 'NetdevUserHostForward', |
| 282 | 'data': { |
| 283 | 'str': 'str' } } |
| 284 | |
| 285 | ## |
| 286 | # @NetdevUserGuestForward: |
| 287 | # |
| 288 | # @str: Guest port forwarding rule |
| 289 | # |
| 290 | # TODO: This string gets parsed by slirp_guestfwd(). We fail to |
| 291 | # document syntax and semantics here. We do in qemu-options.hx. |
| 292 | # Parsing structured configuration from strings is a no-no for QMP. |
| 293 | # This should really be a struct. Not sure it's worth the bother |
| 294 | # now. |
| 295 | # |
| 296 | # Since: 1.2 |
| 297 | ## |
| 298 | { 'struct': 'NetdevUserGuestForward', |
| 299 | 'data': { |
| 300 | 'str': 'str' } } |
| 301 | |
| 302 | ## |
| 303 | # @NetdevUserOptions: |
| 304 | # |
| 305 | # Use the user mode network stack which requires no administrator |
| 306 | # privilege to run. |
| 307 | # |
| 308 | # @hostname: client hostname reported by the builtin DHCP server |
| 309 | # |
| 310 | # @restrict: isolate the guest from the host |
| 311 | # |
| 312 | # @ipv4: whether to support IPv4, default true for enabled (since 2.6) |
| 313 | # |
| 314 | # @ipv6: whether to support IPv6, default true for enabled (since 2.6) |
| 315 | # |
| 316 | # @ip: legacy parameter, use net= instead |
| 317 | # |
| 318 | # @net: IP network address that the guest will see, in the form |
| 319 | # addr[/netmask] The netmask is optional, and can be either in the |
| 320 | # form a.b.c.d or as a number of valid top-most bits. Default is |
| 321 | # 10.0.2.0/24. |
| 322 | # |
| 323 | # @host: guest-visible address of the host |
| 324 | # |
| 325 | # @tftp: root directory of the built-in TFTP server |
| 326 | # |
| 327 | # @bootfile: BOOTP filename, for use with tftp= |
| 328 | # |
| 329 | # @dhcpstart: the first of the 16 IPs the built-in DHCP server can |
| 330 | # assign |
| 331 | # |
| 332 | # @dns: guest-visible address of the virtual nameserver |
| 333 | # |
| 334 | # @dnssearch: list of DNS suffixes to search, passed as DHCP option to |
| 335 | # the guest |
| 336 | # |
| 337 | # @domainname: guest-visible domain name of the virtual nameserver |
| 338 | # (since 3.0) |
| 339 | # |
| 340 | # @ipv6-prefix: IPv6 network prefix (default is fec0::). The network |
| 341 | # prefix is given in the usual hexadecimal IPv6 address notation. |
| 342 | # (since 2.6) |
| 343 | # |
| 344 | # @ipv6-prefixlen: IPv6 network prefix length (default is 64) |
| 345 | # (since 2.6) |
| 346 | # |
| 347 | # @ipv6-host: guest-visible IPv6 address of the host (since 2.6) |
| 348 | # |
| 349 | # @ipv6-dns: guest-visible IPv6 address of the virtual nameserver |
| 350 | # (since 2.6) |
| 351 | # |
| 352 | # @smb: root directory of the built-in SMB server |
| 353 | # |
| 354 | # @smbserver: IP address of the built-in SMB server |
| 355 | # |
| 356 | # @hostfwd: redirect incoming TCP, UDP or UNIX host connections to |
| 357 | # guest endpoints |
| 358 | # |
| 359 | # @guestfwd: forward guest TCP connections |
| 360 | # |
| 361 | # @tftp-server-name: RFC2132 "TFTP server name" string (Since 3.1) |
| 362 | # |
| 363 | # Since: 1.2 |
| 364 | ## |
| 365 | { 'struct': 'NetdevUserOptions', |
| 366 | 'data': { |
| 367 | '*hostname': 'str', |
| 368 | '*restrict': 'bool', |
| 369 | '*ipv4': 'bool', |
| 370 | '*ipv6': 'bool', |
| 371 | '*ip': 'str', |
| 372 | '*net': 'str', |
| 373 | '*host': 'str', |
| 374 | '*tftp': 'str', |
| 375 | '*bootfile': 'str', |
| 376 | '*dhcpstart': 'str', |
| 377 | '*dns': 'str', |
| 378 | '*dnssearch': ['NetdevUserDomainSuffix'], |
| 379 | '*domainname': 'str', |
| 380 | '*ipv6-prefix': 'str', |
| 381 | '*ipv6-prefixlen': 'int', |
| 382 | '*ipv6-host': 'str', |
| 383 | '*ipv6-dns': 'str', |
| 384 | '*smb': 'str', |
| 385 | '*smbserver': 'str', |
| 386 | '*hostfwd': ['NetdevUserHostForward'], |
| 387 | '*guestfwd': ['NetdevUserGuestForward'], |
| 388 | '*tftp-server-name': 'str' } } |
| 389 | |
| 390 | ## |
| 391 | # @NetdevTapOptions: |
| 392 | # |
| 393 | # Used to configure a host TAP network interface backend. |
| 394 | # |
| 395 | # @ifname: interface name |
| 396 | # |
| 397 | # @fd: file descriptor of an already opened tap |
| 398 | # |
| 399 | # @fds: multiple file descriptors of already opened multiqueue capable |
| 400 | # tap |
| 401 | # |
| 402 | # @script: script to initialize the interface |
| 403 | # |
| 404 | # @downscript: script to shut down the interface |
| 405 | # |
| 406 | # @br: bridge name (since 2.8) |
| 407 | # |
| 408 | # @helper: command to execute to configure bridge |
| 409 | # |
| 410 | # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes. |
| 411 | # |
| 412 | # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface |
| 413 | # |
| 414 | # @vhost: enable vhost-net network accelerator |
| 415 | # |
| 416 | # @vhostfd: file descriptor of an already opened vhost net device |
| 417 | # |
| 418 | # @vhostfds: file descriptors of multiple already opened vhost net |
| 419 | # devices |
| 420 | # |
| 421 | # @vhostforce: vhost on for non-MSIX virtio guests |
| 422 | # |
| 423 | # @queues: number of queues to be created for multiqueue capable tap |
| 424 | # |
| 425 | # @poll-us: maximum number of microseconds that could be spent on busy |
| 426 | # polling for tap (since 2.7) |
| 427 | # |
| 428 | # Since: 1.2 |
| 429 | ## |
| 430 | { 'struct': 'NetdevTapOptions', |
| 431 | 'data': { |
| 432 | '*ifname': 'str', |
| 433 | '*fd': 'str', |
| 434 | '*fds': 'str', |
| 435 | '*script': 'str', |
| 436 | '*downscript': 'str', |
| 437 | '*br': 'str', |
| 438 | '*helper': 'str', |
| 439 | '*sndbuf': 'size', |
| 440 | '*vnet_hdr': 'bool', |
| 441 | '*vhost': 'bool', |
| 442 | '*vhostfd': 'str', |
| 443 | '*vhostfds': 'str', |
| 444 | '*vhostforce': 'bool', |
| 445 | '*queues': 'uint32', |
| 446 | '*poll-us': 'uint32'} } |
| 447 | |
| 448 | ## |
| 449 | # @NetdevSocketOptions: |
| 450 | # |
| 451 | # Socket netdevs are used to establish a network connection to another |
| 452 | # QEMU virtual machine via a TCP socket. |
| 453 | # |
| 454 | # @fd: file descriptor of an already opened socket |
| 455 | # |
| 456 | # @listen: port number, and optional hostname, to listen on |
| 457 | # |
| 458 | # @connect: port number, and optional hostname, to connect to |
| 459 | # |
| 460 | # @mcast: UDP multicast address and port number |
| 461 | # |
| 462 | # @localaddr: source address and port for multicast and udp packets |
| 463 | # |
| 464 | # @udp: UDP unicast address and port number |
| 465 | # |
| 466 | # Since: 1.2 |
| 467 | ## |
| 468 | { 'struct': 'NetdevSocketOptions', |
| 469 | 'data': { |
| 470 | '*fd': 'str', |
| 471 | '*listen': 'str', |
| 472 | '*connect': 'str', |
| 473 | '*mcast': 'str', |
| 474 | '*localaddr': 'str', |
| 475 | '*udp': 'str' } } |
| 476 | |
| 477 | ## |
| 478 | # @NetdevL2TPv3Options: |
| 479 | # |
| 480 | # Configure an Ethernet over L2TPv3 tunnel. |
| 481 | # |
| 482 | # @src: source address |
| 483 | # |
| 484 | # @dst: destination address |
| 485 | # |
| 486 | # @srcport: source port - mandatory for udp, optional for ip |
| 487 | # |
| 488 | # @dstport: destination port - mandatory for udp, optional for ip |
| 489 | # |
| 490 | # @ipv6: force the use of ipv6 |
| 491 | # |
| 492 | # @udp: use the udp version of l2tpv3 encapsulation |
| 493 | # |
| 494 | # @cookie64: use 64 bit cookies |
| 495 | # |
| 496 | # @counter: have sequence counter |
| 497 | # |
| 498 | # @pincounter: pin sequence counter to zero - workaround for buggy |
| 499 | # implementations or networks with packet reorder |
| 500 | # |
| 501 | # @txcookie: 32 or 64 bit transmit cookie |
| 502 | # |
| 503 | # @rxcookie: 32 or 64 bit receive cookie |
| 504 | # |
| 505 | # @txsession: 32 bit transmit session |
| 506 | # |
| 507 | # @rxsession: 32 bit receive session - if not specified set to the |
| 508 | # same value as transmit |
| 509 | # |
| 510 | # @offset: additional offset - allows the insertion of additional |
| 511 | # application-specific data before the packet payload |
| 512 | # |
| 513 | # Since: 2.1 |
| 514 | ## |
| 515 | { 'struct': 'NetdevL2TPv3Options', |
| 516 | 'data': { |
| 517 | 'src': 'str', |
| 518 | 'dst': 'str', |
| 519 | '*srcport': 'str', |
| 520 | '*dstport': 'str', |
| 521 | '*ipv6': 'bool', |
| 522 | '*udp': 'bool', |
| 523 | '*cookie64': 'bool', |
| 524 | '*counter': 'bool', |
| 525 | '*pincounter': 'bool', |
| 526 | '*txcookie': 'uint64', |
| 527 | '*rxcookie': 'uint64', |
| 528 | 'txsession': 'uint32', |
| 529 | '*rxsession': 'uint32', |
| 530 | '*offset': 'uint32' } } |
| 531 | |
| 532 | ## |
| 533 | # @NetdevVdeOptions: |
| 534 | # |
| 535 | # Connect to a vde switch running on the host. |
| 536 | # |
| 537 | # @sock: socket path |
| 538 | # |
| 539 | # @port: port number |
| 540 | # |
| 541 | # @group: group owner of socket |
| 542 | # |
| 543 | # @mode: permissions for socket |
| 544 | # |
| 545 | # Since: 1.2 |
| 546 | ## |
| 547 | { 'struct': 'NetdevVdeOptions', |
| 548 | 'data': { |
| 549 | '*sock': 'str', |
| 550 | '*port': 'uint16', |
| 551 | '*group': 'str', |
| 552 | '*mode': 'uint16' } } |
| 553 | |
| 554 | ## |
| 555 | # @NetdevBridgeOptions: |
| 556 | # |
| 557 | # Connect a host TAP network interface to a host bridge device. |
| 558 | # |
| 559 | # @br: bridge name |
| 560 | # |
| 561 | # @helper: command to execute to configure bridge |
| 562 | # |
| 563 | # Since: 1.2 |
| 564 | ## |
| 565 | { 'struct': 'NetdevBridgeOptions', |
| 566 | 'data': { |
| 567 | '*br': 'str', |
| 568 | '*helper': 'str' } } |
| 569 | |
| 570 | ## |
| 571 | # @NetdevHubPortOptions: |
| 572 | # |
| 573 | # Connect two or more net clients through a software hub. |
| 574 | # |
| 575 | # @hubid: hub identifier number |
| 576 | # |
| 577 | # @netdev: used to connect hub to a netdev instead of a device |
| 578 | # (since 2.12) |
| 579 | # |
| 580 | # Since: 1.2 |
| 581 | ## |
| 582 | { 'struct': 'NetdevHubPortOptions', |
| 583 | 'data': { |
| 584 | 'hubid': 'int32', |
| 585 | '*netdev': 'str' } } |
| 586 | |
| 587 | ## |
| 588 | # @NetdevNetmapOptions: |
| 589 | # |
| 590 | # Connect a client to a netmap-enabled NIC or to a VALE switch port |
| 591 | # |
| 592 | # @ifname: Either the name of an existing network interface supported |
| 593 | # by netmap, or the name of a VALE port (created on the fly). A |
| 594 | # VALE port name is in the form 'valeXXX:YYY', where XXX and YYY |
| 595 | # are non-negative integers. XXX identifies a switch and YYY |
| 596 | # identifies a port of the switch. VALE ports having the same XXX |
| 597 | # are therefore connected to the same switch. |
| 598 | # |
| 599 | # @devname: path of the netmap device (default: '/dev/netmap'). |
| 600 | # |
| 601 | # Since: 2.0 |
| 602 | ## |
| 603 | { 'struct': 'NetdevNetmapOptions', |
| 604 | 'data': { |
| 605 | 'ifname': 'str', |
| 606 | '*devname': 'str' } } |
| 607 | |
| 608 | ## |
| 609 | # @AFXDPMode: |
| 610 | # |
| 611 | # Attach mode for a default XDP program |
| 612 | # |
| 613 | # @skb: generic mode, no driver support necessary |
| 614 | # |
| 615 | # @native: DRV mode, program is attached to a driver, packets are |
| 616 | # passed to the socket without allocation of skb. |
| 617 | # |
| 618 | # Since: 8.2 |
| 619 | ## |
| 620 | { 'enum': 'AFXDPMode', |
| 621 | 'data': [ 'native', 'skb' ], |
| 622 | 'if': 'CONFIG_AF_XDP' } |
| 623 | |
| 624 | ## |
| 625 | # @NetdevAFXDPOptions: |
| 626 | # |
| 627 | # AF_XDP network backend |
| 628 | # |
| 629 | # @ifname: The name of an existing network interface. |
| 630 | # |
| 631 | # @mode: Attach mode for a default XDP program. If not specified, |
| 632 | # then 'native' will be tried first, then 'skb'. |
| 633 | # |
| 634 | # @force-copy: Force XDP copy mode even if device supports zero-copy. |
| 635 | # (default: false) |
| 636 | # |
| 637 | # @queues: number of queues to be used for multiqueue interfaces |
| 638 | # (default: 1). |
| 639 | # |
| 640 | # @start-queue: Use @queues starting from this queue number |
| 641 | # (default: 0). |
| 642 | # |
| 643 | # @inhibit: Don't load a default XDP program, use one already loaded |
| 644 | # to the interface (default: false). Requires @sock-fds or |
| 645 | # @map-path. |
| 646 | # |
| 647 | # @sock-fds: A colon (:) separated list of file descriptors for |
| 648 | # already open but not bound AF_XDP sockets in the queue order. |
| 649 | # One fd per queue. These descriptors should already be added |
| 650 | # into XDP socket map for corresponding queues. @sock-fds and |
| 651 | # @map-path are mutually exclusive. Requires @inhibit. |
| 652 | # |
| 653 | # @map-path: The path to a pinned xsk map to push file descriptors |
| 654 | # for bound AF_XDP sockets into. @map-path and @sock-fds are |
| 655 | # mutually exclusive. Requires @inhibit. (Since 10.1) |
| 656 | # |
| 657 | # @map-start-index: Use @map-path to insert xsk sockets starting from |
| 658 | # this index number (default: 0). Requires @map-path. |
| 659 | # (Since 10.1) |
| 660 | # |
| 661 | # Since: 8.2 |
| 662 | ## |
| 663 | { 'struct': 'NetdevAFXDPOptions', |
| 664 | 'data': { |
| 665 | 'ifname': 'str', |
| 666 | '*mode': 'AFXDPMode', |
| 667 | '*force-copy': 'bool', |
| 668 | '*queues': 'int', |
| 669 | '*start-queue': 'int', |
| 670 | '*inhibit': 'bool', |
| 671 | '*sock-fds': 'str', |
| 672 | '*map-path': 'str', |
| 673 | '*map-start-index': 'int32' }, |
| 674 | 'if': 'CONFIG_AF_XDP' } |
| 675 | |
| 676 | ## |
| 677 | # @NetdevVhostUserOptions: |
| 678 | # |
| 679 | # Vhost-user network backend |
| 680 | # |
| 681 | # @chardev: name of a unix socket chardev |
| 682 | # |
| 683 | # @vhostforce: vhost on for non-MSIX virtio guests (default: false). |
| 684 | # |
| 685 | # @queues: number of queues to be created for multiqueue vhost-user |
| 686 | # (default: 1) (Since 2.5) |
| 687 | # |
| 688 | # Since: 2.1 |
| 689 | ## |
| 690 | { 'struct': 'NetdevVhostUserOptions', |
| 691 | 'data': { |
| 692 | 'chardev': 'str', |
| 693 | '*vhostforce': 'bool', |
| 694 | '*queues': 'int' } } |
| 695 | |
| 696 | ## |
| 697 | # @NetdevVhostVDPAOptions: |
| 698 | # |
| 699 | # Vhost-vdpa network backend |
| 700 | # |
| 701 | # vDPA device is a device that uses a datapath which complies with the |
| 702 | # virtio specifications with a vendor specific control path. |
| 703 | # |
| 704 | # @vhostdev: path of vhost-vdpa device (default:'/dev/vhost-vdpa-0') |
| 705 | # |
| 706 | # @vhostfd: file descriptor of an already opened vhost vdpa device |
| 707 | # |
| 708 | # @queues: number of queues to be created for multiqueue vhost-vdpa |
| 709 | # (default: 1) |
| 710 | # |
| 711 | # @x-svq: Start device with (experimental) shadow virtqueue. |
| 712 | # (Since 7.1) (default: false) |
| 713 | # |
| 714 | # Features: |
| 715 | # |
| 716 | # @unstable: Member @x-svq is experimental. |
| 717 | # |
| 718 | # Since: 5.1 |
| 719 | ## |
| 720 | { 'struct': 'NetdevVhostVDPAOptions', |
| 721 | 'data': { |
| 722 | '*vhostdev': 'str', |
| 723 | '*vhostfd': 'str', |
| 724 | '*queues': 'int', |
| 725 | '*x-svq': {'type': 'bool', 'features' : [ 'unstable'] } } } |
| 726 | |
| 727 | ## |
| 728 | # @NetdevVmnetHostOptions: |
| 729 | # |
| 730 | # vmnet (host mode) network backend. |
| 731 | # |
| 732 | # Allows the vmnet interface to communicate with other vmnet |
| 733 | # interfaces that are in host mode and also with the host. |
| 734 | # |
| 735 | # @start-address: The starting IPv4 address to use for the interface. |
| 736 | # Must be in the private IP range (RFC 1918). Must be specified |
| 737 | # along with @end-address and @subnet-mask. This address is used |
| 738 | # as the gateway address. The subsequent address up to and |
| 739 | # including end-address are placed in the DHCP pool. |
| 740 | # |
| 741 | # @end-address: The DHCP IPv4 range end address to use for the |
| 742 | # interface. Must be in the private IP range (RFC 1918). Must be |
| 743 | # specified along with @start-address and @subnet-mask. |
| 744 | # |
| 745 | # @subnet-mask: The IPv4 subnet mask to use on the interface. Must be |
| 746 | # specified along with @start-address and @subnet-mask. |
| 747 | # |
| 748 | # @isolated: Enable isolation for this interface. Interface isolation |
| 749 | # ensures that vmnet interface is not able to communicate with any |
| 750 | # other vmnet interfaces. Only communication with host is |
| 751 | # allowed. Requires at least macOS Big Sur 11.0. |
| 752 | # |
| 753 | # @net-uuid: The identifier (UUID) to uniquely identify the isolated |
| 754 | # network vmnet interface should be added to. If set, no DHCP |
| 755 | # service is provided for this interface and network communication |
| 756 | # is allowed only with other interfaces added to this network |
| 757 | # identified by the UUID. Requires at least macOS Big Sur 11.0. |
| 758 | # |
| 759 | # Since: 7.1 |
| 760 | ## |
| 761 | { 'struct': 'NetdevVmnetHostOptions', |
| 762 | 'data': { |
| 763 | '*start-address': 'str', |
| 764 | '*end-address': 'str', |
| 765 | '*subnet-mask': 'str', |
| 766 | '*isolated': 'bool', |
| 767 | '*net-uuid': 'str' }, |
| 768 | 'if': 'CONFIG_VMNET' } |
| 769 | |
| 770 | ## |
| 771 | # @NetdevVmnetSharedOptions: |
| 772 | # |
| 773 | # vmnet (shared mode) network backend. |
| 774 | # |
| 775 | # Allows traffic originating from the vmnet interface to reach the |
| 776 | # Internet through a network address translator (NAT). The vmnet |
| 777 | # interface can communicate with the host and with other shared mode |
| 778 | # interfaces on the same subnet. If no DHCP settings, subnet mask and |
| 779 | # IPv6 prefix specified, the interface can communicate with any of |
| 780 | # other interfaces in shared mode. |
| 781 | # |
| 782 | # @start-address: The starting IPv4 address to use for the interface. |
| 783 | # Must be in the private IP range (RFC 1918). Must be specified |
| 784 | # along with @end-address and @subnet-mask. This address is used |
| 785 | # as the gateway address. The subsequent address up to and |
| 786 | # including end-address are placed in the DHCP pool. |
| 787 | # |
| 788 | # @end-address: The DHCP IPv4 range end address to use for the |
| 789 | # interface. Must be in the private IP range (RFC 1918). Must be |
| 790 | # specified along with @start-address and @subnet-mask. |
| 791 | # |
| 792 | # @subnet-mask: The IPv4 subnet mask to use on the interface. Must be |
| 793 | # specified along with @start-address and @subnet-mask. |
| 794 | # |
| 795 | # @isolated: Enable isolation for this interface. Interface isolation |
| 796 | # ensures that vmnet interface is not able to communicate with any |
| 797 | # other vmnet interfaces. Only communication with host is |
| 798 | # allowed. Requires at least macOS Big Sur 11.0. |
| 799 | # |
| 800 | # @nat66-prefix: The IPv6 prefix to use into guest network. Must be a |
| 801 | # unique local address i.e. start with fd00::/8 and have length of |
| 802 | # 64. |
| 803 | # |
| 804 | # Since: 7.1 |
| 805 | ## |
| 806 | { 'struct': 'NetdevVmnetSharedOptions', |
| 807 | 'data': { |
| 808 | '*start-address': 'str', |
| 809 | '*end-address': 'str', |
| 810 | '*subnet-mask': 'str', |
| 811 | '*isolated': 'bool', |
| 812 | '*nat66-prefix': 'str' }, |
| 813 | 'if': 'CONFIG_VMNET' } |
| 814 | |
| 815 | ## |
| 816 | # @NetdevVmnetBridgedOptions: |
| 817 | # |
| 818 | # vmnet (bridged mode) network backend. |
| 819 | # |
| 820 | # Bridges the vmnet interface with a physical network interface. |
| 821 | # |
| 822 | # @ifname: The name of the physical interface to be bridged. |
| 823 | # |
| 824 | # @isolated: Enable isolation for this interface. Interface isolation |
| 825 | # ensures that vmnet interface is not able to communicate with any |
| 826 | # other vmnet interfaces. Only communication with host is |
| 827 | # allowed. Requires at least macOS Big Sur 11.0. |
| 828 | # |
| 829 | # Since: 7.1 |
| 830 | ## |
| 831 | { 'struct': 'NetdevVmnetBridgedOptions', |
| 832 | 'data': { |
| 833 | 'ifname': 'str', |
| 834 | '*isolated': 'bool' }, |
| 835 | 'if': 'CONFIG_VMNET' } |
| 836 | |
| 837 | ## |
| 838 | # @NetdevStreamOptions: |
| 839 | # |
| 840 | # Configuration info for stream socket netdev |
| 841 | # |
| 842 | # @addr: socket address to listen on (server=true) or connect to |
| 843 | # (server=false) |
| 844 | # |
| 845 | # @server: create server socket (default: false) |
| 846 | # |
| 847 | # @reconnect-ms: For a client socket, if a socket is disconnected, |
| 848 | # then attempt a reconnect after the given number of milliseconds. |
| 849 | # Setting this to zero disables this function. |
| 850 | # (default: 0) (Since: 9.2) |
| 851 | # |
| 852 | # Only `SocketAddress` types 'unix', 'inet' and 'fd' are supported. |
| 853 | # |
| 854 | # Since: 7.2 |
| 855 | ## |
| 856 | { 'struct': 'NetdevStreamOptions', |
| 857 | 'data': { |
| 858 | 'addr': 'SocketAddress', |
| 859 | '*server': 'bool', |
| 860 | '*reconnect-ms': 'int' } } |
| 861 | |
| 862 | ## |
| 863 | # @NetdevDgramOptions: |
| 864 | # |
| 865 | # Configuration info for datagram socket netdev. |
| 866 | # |
| 867 | # @remote: remote address |
| 868 | # |
| 869 | # @local: local address |
| 870 | # |
| 871 | # Only `SocketAddress` types 'unix', 'inet' and 'fd' are supported. |
| 872 | # |
| 873 | # If remote address is present and it's a multicast address, local |
| 874 | # address is optional. Otherwise local address is required and remote |
| 875 | # address is optional. |
| 876 | # |
| 877 | # .. table:: Valid parameters combination table |
| 878 | # :widths: auto |
| 879 | # |
| 880 | # ============= ======== ===== |
| 881 | # remote local okay? |
| 882 | # ============= ======== ===== |
| 883 | # absent absent no |
| 884 | # absent not fd no |
| 885 | # absent fd yes |
| 886 | # multicast absent yes |
| 887 | # multicast present yes |
| 888 | # not multicast absent no |
| 889 | # not multicast present yes |
| 890 | # ============= ======== ===== |
| 891 | # |
| 892 | # Since: 7.2 |
| 893 | ## |
| 894 | { 'struct': 'NetdevDgramOptions', |
| 895 | 'data': { |
| 896 | '*local': 'SocketAddress', |
| 897 | '*remote': 'SocketAddress' } } |
| 898 | |
| 899 | ## |
| 900 | # @NetClientDriver: |
| 901 | # |
| 902 | # Available netdev drivers. |
| 903 | # |
| 904 | # @l2tpv3: since 2.1 |
| 905 | # |
| 906 | # @vhost-vdpa: since 5.1 |
| 907 | # |
| 908 | # @vmnet-host: since 7.1 |
| 909 | # |
| 910 | # @vmnet-shared: since 7.1 |
| 911 | # |
| 912 | # @vmnet-bridged: since 7.1 |
| 913 | # |
| 914 | # @stream: since 7.2 |
| 915 | # |
| 916 | # @dgram: since 7.2 |
| 917 | # |
| 918 | # @af-xdp: since 8.2 |
| 919 | # |
| 920 | # @passt: since 10.1 |
| 921 | # |
| 922 | # Since: 2.7 |
| 923 | ## |
| 924 | { 'enum': 'NetClientDriver', |
| 925 | 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'stream', |
| 926 | 'dgram', 'vde', 'bridge', 'hubport', 'netmap', 'vhost-user', |
| 927 | 'vhost-vdpa', |
| 928 | { 'name': 'passt', 'if': 'CONFIG_PASST' }, |
| 929 | { 'name': 'af-xdp', 'if': 'CONFIG_AF_XDP' }, |
| 930 | { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' }, |
| 931 | { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' }, |
| 932 | { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] } |
| 933 | |
| 934 | ## |
| 935 | # @Netdev: |
| 936 | # |
| 937 | # Captures the configuration of a network device. |
| 938 | # |
| 939 | # @id: identifier for monitor commands. |
| 940 | # |
| 941 | # @type: Specify the driver used for interpreting remaining arguments. |
| 942 | # |
| 943 | # Since: 1.2 |
| 944 | ## |
| 945 | { 'union': 'Netdev', |
| 946 | 'base': { 'id': 'str', 'type': 'NetClientDriver' }, |
| 947 | 'discriminator': 'type', |
| 948 | 'data': { |
| 949 | 'nic': 'NetLegacyNicOptions', |
| 950 | 'passt': { 'type': 'NetdevPasstOptions', |
| 951 | 'if': 'CONFIG_PASST' }, |
| 952 | 'user': 'NetdevUserOptions', |
| 953 | 'tap': 'NetdevTapOptions', |
| 954 | 'l2tpv3': 'NetdevL2TPv3Options', |
| 955 | 'socket': 'NetdevSocketOptions', |
| 956 | 'stream': 'NetdevStreamOptions', |
| 957 | 'dgram': 'NetdevDgramOptions', |
| 958 | 'vde': 'NetdevVdeOptions', |
| 959 | 'bridge': 'NetdevBridgeOptions', |
| 960 | 'hubport': 'NetdevHubPortOptions', |
| 961 | 'netmap': 'NetdevNetmapOptions', |
| 962 | 'af-xdp': { 'type': 'NetdevAFXDPOptions', |
| 963 | 'if': 'CONFIG_AF_XDP' }, |
| 964 | 'vhost-user': 'NetdevVhostUserOptions', |
| 965 | 'vhost-vdpa': 'NetdevVhostVDPAOptions', |
| 966 | 'vmnet-host': { 'type': 'NetdevVmnetHostOptions', |
| 967 | 'if': 'CONFIG_VMNET' }, |
| 968 | 'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions', |
| 969 | 'if': 'CONFIG_VMNET' }, |
| 970 | 'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions', |
| 971 | 'if': 'CONFIG_VMNET' } } } |
| 972 | |
| 973 | ## |
| 974 | # @RxState: |
| 975 | # |
| 976 | # Packets receiving state |
| 977 | # |
| 978 | # @normal: filter assigned packets according to the mac-table |
| 979 | # |
| 980 | # @none: don't receive any assigned packet |
| 981 | # |
| 982 | # @all: receive all assigned packets |
| 983 | # |
| 984 | # Since: 1.6 |
| 985 | ## |
| 986 | { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] } |
| 987 | |
| 988 | ## |
| 989 | # @RxFilterInfo: |
| 990 | # |
| 991 | # Rx-filter information for a NIC. |
| 992 | # |
| 993 | # @name: net client name |
| 994 | # |
| 995 | # @promiscuous: whether promiscuous mode is enabled |
| 996 | # |
| 997 | # @multicast: multicast receive state |
| 998 | # |
| 999 | # @unicast: unicast receive state |
| 1000 | # |
| 1001 | # @vlan: vlan receive state (Since 2.0) |
| 1002 | # |
| 1003 | # @broadcast-allowed: whether to receive broadcast |
| 1004 | # |
| 1005 | # @multicast-overflow: multicast table is overflowed or not |
| 1006 | # |
| 1007 | # @unicast-overflow: unicast table is overflowed or not |
| 1008 | # |
| 1009 | # @main-mac: the main macaddr string |
| 1010 | # |
| 1011 | # @vlan-table: a list of active vlan id |
| 1012 | # |
| 1013 | # @unicast-table: a list of unicast macaddr string |
| 1014 | # |
| 1015 | # @multicast-table: a list of multicast macaddr string |
| 1016 | # |
| 1017 | # Since: 1.6 |
| 1018 | ## |
| 1019 | { 'struct': 'RxFilterInfo', |
| 1020 | 'data': { |
| 1021 | 'name': 'str', |
| 1022 | 'promiscuous': 'bool', |
| 1023 | 'multicast': 'RxState', |
| 1024 | 'unicast': 'RxState', |
| 1025 | 'vlan': 'RxState', |
| 1026 | 'broadcast-allowed': 'bool', |
| 1027 | 'multicast-overflow': 'bool', |
| 1028 | 'unicast-overflow': 'bool', |
| 1029 | 'main-mac': 'str', |
| 1030 | 'vlan-table': ['int'], |
| 1031 | 'unicast-table': ['str'], |
| 1032 | 'multicast-table': ['str'] }} |
| 1033 | |
| 1034 | ## |
| 1035 | # @query-rx-filter: |
| 1036 | # |
| 1037 | # Return rx-filter information for all NICs (or for the given NIC). |
| 1038 | # |
| 1039 | # @name: net client name |
| 1040 | # |
| 1041 | # Returns: list of info for all NICs (or for the given NIC). |
| 1042 | # |
| 1043 | # Errors: |
| 1044 | # - if the given @name doesn't exist |
| 1045 | # - if the given NIC doesn't support rx-filter querying |
| 1046 | # - if the given net client isn't a NIC |
| 1047 | # |
| 1048 | # Since: 1.6 |
| 1049 | # |
| 1050 | # .. qmp-example:: |
| 1051 | # |
| 1052 | # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } |
| 1053 | # <- { "return": [ |
| 1054 | # { |
| 1055 | # "promiscuous": true, |
| 1056 | # "name": "vnet0", |
| 1057 | # "main-mac": "52:54:00:12:34:56", |
| 1058 | # "unicast": "normal", |
| 1059 | # "vlan": "normal", |
| 1060 | # "vlan-table": [ |
| 1061 | # 4, |
| 1062 | # 0 |
| 1063 | # ], |
| 1064 | # "unicast-table": [ |
| 1065 | # ], |
| 1066 | # "multicast": "normal", |
| 1067 | # "multicast-overflow": false, |
| 1068 | # "unicast-overflow": false, |
| 1069 | # "multicast-table": [ |
| 1070 | # "01:00:5e:00:00:01", |
| 1071 | # "33:33:00:00:00:01", |
| 1072 | # "33:33:ff:12:34:56" |
| 1073 | # ], |
| 1074 | # "broadcast-allowed": false |
| 1075 | # } |
| 1076 | # ] |
| 1077 | # } |
| 1078 | ## |
| 1079 | { 'command': 'query-rx-filter', |
| 1080 | 'data': { '*name': 'str' }, |
| 1081 | 'returns': ['RxFilterInfo'] } |
| 1082 | |
| 1083 | ## |
| 1084 | # @NIC_RX_FILTER_CHANGED: |
| 1085 | # |
| 1086 | # Emitted once until the `query-rx-filter` command is executed, the |
| 1087 | # first event will always be emitted |
| 1088 | # |
| 1089 | # @name: net client name |
| 1090 | # |
| 1091 | # @path: device path |
| 1092 | # |
| 1093 | # Since: 1.6 |
| 1094 | # |
| 1095 | # .. qmp-example:: |
| 1096 | # |
| 1097 | # <- { "event": "NIC_RX_FILTER_CHANGED", |
| 1098 | # "data": { "name": "vnet0", |
| 1099 | # "path": "/machine/peripheral/vnet0/virtio-backend" }, |
| 1100 | # "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } |
| 1101 | ## |
| 1102 | { 'event': 'NIC_RX_FILTER_CHANGED', |
| 1103 | 'data': { '*name': 'str', 'path': 'str' } } |
| 1104 | |
| 1105 | ## |
| 1106 | # @AnnounceParameters: |
| 1107 | # |
| 1108 | # Parameters for self-announce timers |
| 1109 | # |
| 1110 | # @initial: Initial delay (in ms) before sending the first GARP/RARP |
| 1111 | # announcement |
| 1112 | # |
| 1113 | # @max: Maximum delay (in ms) between GARP/RARP announcement packets |
| 1114 | # |
| 1115 | # @rounds: Number of self-announcement attempts |
| 1116 | # |
| 1117 | # @step: Delay increase (in ms) after each self-announcement attempt |
| 1118 | # |
| 1119 | # @interfaces: An optional list of interface names, which restricts |
| 1120 | # the announcement to the listed interfaces. (Since 4.1) |
| 1121 | # |
| 1122 | # @id: A name to be used to identify an instance of announce-timers |
| 1123 | # and to allow it to modified later. Not for use as part of the |
| 1124 | # migration parameters. (Since 4.1) |
| 1125 | # |
| 1126 | # Since: 4.0 |
| 1127 | ## |
| 1128 | { 'struct': 'AnnounceParameters', |
| 1129 | 'data': { 'initial': 'int', |
| 1130 | 'max': 'int', |
| 1131 | 'rounds': 'int', |
| 1132 | 'step': 'int', |
| 1133 | '*interfaces': ['str'], |
| 1134 | '*id' : 'str' } } |
| 1135 | |
| 1136 | ## |
| 1137 | # @announce-self: |
| 1138 | # |
| 1139 | # Trigger generation of broadcast RARP frames to update network |
| 1140 | # switches. This can be useful when network bonds fail-over the |
| 1141 | # active slave. |
| 1142 | # |
| 1143 | # TODO: This line is a hack to separate the example from the body |
| 1144 | # |
| 1145 | # .. qmp-example:: |
| 1146 | # |
| 1147 | # -> { "execute": "announce-self", |
| 1148 | # "arguments": { |
| 1149 | # "initial": 50, "max": 550, "rounds": 10, "step": 50, |
| 1150 | # "interfaces": ["vn2", "vn3"], "id": "bob" } } |
| 1151 | # <- { "return": {} } |
| 1152 | # |
| 1153 | # Since: 4.0 |
| 1154 | ## |
| 1155 | { 'command': 'announce-self', 'boxed': true, |
| 1156 | 'data' : 'AnnounceParameters'} |
| 1157 | |
| 1158 | ## |
| 1159 | # @FAILOVER_NEGOTIATED: |
| 1160 | # |
| 1161 | # Emitted when VIRTIO_NET_F_STANDBY was enabled during feature |
| 1162 | # negotiation. Failover primary devices which were hidden (not |
| 1163 | # hotplugged when requested) before will now be hotplugged by the |
| 1164 | # virtio-net standby device. |
| 1165 | # |
| 1166 | # @device-id: QEMU device id of the unplugged device |
| 1167 | # |
| 1168 | # Since: 4.2 |
| 1169 | # |
| 1170 | # .. qmp-example:: |
| 1171 | # |
| 1172 | # <- { "event": "FAILOVER_NEGOTIATED", |
| 1173 | # "data": { "device-id": "net1" }, |
| 1174 | # "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } |
| 1175 | ## |
| 1176 | { 'event': 'FAILOVER_NEGOTIATED', |
| 1177 | 'data': {'device-id': 'str'} } |
| 1178 | |
| 1179 | ## |
| 1180 | # @NETDEV_STREAM_CONNECTED: |
| 1181 | # |
| 1182 | # Emitted when the netdev stream backend is connected |
| 1183 | # |
| 1184 | # @netdev-id: QEMU netdev id that is connected |
| 1185 | # |
| 1186 | # @addr: The destination address |
| 1187 | # |
| 1188 | # Since: 7.2 |
| 1189 | # |
| 1190 | # .. qmp-example:: |
| 1191 | # |
| 1192 | # <- { "event": "NETDEV_STREAM_CONNECTED", |
| 1193 | # "data": { "netdev-id": "netdev0", |
| 1194 | # "addr": { "port": "47666", "ipv6": true, |
| 1195 | # "host": "::1", "type": "inet" } }, |
| 1196 | # "timestamp": { "seconds": 1666269863, "microseconds": 311222 } } |
| 1197 | # |
| 1198 | # .. qmp-example:: |
| 1199 | # |
| 1200 | # <- { "event": "NETDEV_STREAM_CONNECTED", |
| 1201 | # "data": { "netdev-id": "netdev0", |
| 1202 | # "addr": { "path": "/tmp/qemu0", "type": "unix" } }, |
| 1203 | # "timestamp": { "seconds": 1666269706, "microseconds": 413651 } } |
| 1204 | ## |
| 1205 | { 'event': 'NETDEV_STREAM_CONNECTED', |
| 1206 | 'data': { 'netdev-id': 'str', |
| 1207 | 'addr': 'SocketAddress' } } |
| 1208 | |
| 1209 | ## |
| 1210 | # @NETDEV_STREAM_DISCONNECTED: |
| 1211 | # |
| 1212 | # Emitted when the netdev stream backend is disconnected |
| 1213 | # |
| 1214 | # @netdev-id: QEMU netdev id that is disconnected |
| 1215 | # |
| 1216 | # Since: 7.2 |
| 1217 | # |
| 1218 | # .. qmp-example:: |
| 1219 | # |
| 1220 | # <- { "event": "NETDEV_STREAM_DISCONNECTED", |
| 1221 | # "data": {"netdev-id": "netdev0"}, |
| 1222 | # "timestamp": {"seconds": 1663330937, "microseconds": 526695} } |
| 1223 | ## |
| 1224 | { 'event': 'NETDEV_STREAM_DISCONNECTED', |
| 1225 | 'data': { 'netdev-id': 'str' } } |
| 1226 | |
| 1227 | ## |
| 1228 | # @NETDEV_VHOST_USER_CONNECTED: |
| 1229 | # |
| 1230 | # Emitted when the vhost-user chardev is connected |
| 1231 | # |
| 1232 | # @netdev-id: QEMU netdev id that is connected |
| 1233 | # |
| 1234 | # @chardev-id: The character device id used by the QEMU netdev |
| 1235 | # |
| 1236 | # Since: 10.0 |
| 1237 | # |
| 1238 | # .. qmp-example:: |
| 1239 | # |
| 1240 | # <- { "timestamp": {"seconds": 1739538638, "microseconds": 354181 }, |
| 1241 | # "event": "NETDEV_VHOST_USER_CONNECTED", |
| 1242 | # "data": { "netdev-id": "netdev0", "chardev-id": "chr0" } } |
| 1243 | ## |
| 1244 | { 'event': 'NETDEV_VHOST_USER_CONNECTED', |
| 1245 | 'data': { 'netdev-id': 'str', 'chardev-id': 'str' } } |
| 1246 | |
| 1247 | ## |
| 1248 | # @NETDEV_VHOST_USER_DISCONNECTED: |
| 1249 | # |
| 1250 | # Emitted when the vhost-user chardev is disconnected |
| 1251 | # |
| 1252 | # @netdev-id: QEMU netdev id that is disconnected |
| 1253 | # |
| 1254 | # Since: 10.0 |
| 1255 | # |
| 1256 | # .. qmp-example:: |
| 1257 | # |
| 1258 | # <- { "timestamp": { "seconds": 1739538634, "microseconds": 920450 }, |
| 1259 | # "event": "NETDEV_VHOST_USER_DISCONNECTED", |
| 1260 | # "data": { "netdev-id": "netdev0" } } |
| 1261 | ## |
| 1262 | { 'event': 'NETDEV_VHOST_USER_DISCONNECTED', |
| 1263 | 'data': { 'netdev-id': 'str' } } |
| 1264 | |
| 1265 | ## |
| 1266 | # @UsernetInfo: |
| 1267 | # |
| 1268 | # Information about a user-mode network stack (slirp). |
| 1269 | # |
| 1270 | # @hub-id: The hub id, if available. |
| 1271 | # |
| 1272 | # @hub-name: The name of the hub. |
| 1273 | # |
| 1274 | # @info: Network information from slirp. |
| 1275 | # |
| 1276 | # Since: 11.2 |
| 1277 | ## |
| 1278 | { 'struct': 'UsernetInfo', |
| 1279 | 'data': { |
| 1280 | '*hub-id': 'int', |
| 1281 | 'hub-name': 'str', |
| 1282 | 'info': 'str' }, |
| 1283 | 'if': 'CONFIG_SLIRP' } |
| 1284 | |
| 1285 | ## |
| 1286 | # @x-query-usernet: |
| 1287 | # |
| 1288 | # Query user-mode network stack connection states. |
| 1289 | # |
| 1290 | # Features: |
| 1291 | # |
| 1292 | # @unstable: This command is meant for debugging. |
| 1293 | # |
| 1294 | # Returns: list of user-mode network stack information. |
| 1295 | # |
| 1296 | # Since: 11.2 |
| 1297 | # |
| 1298 | # .. qmp-example:: |
| 1299 | # |
| 1300 | # -> { "execute": "x-query-usernet" } |
| 1301 | # <- { "return": [ { "hub-id": 0, "hub-name": "vnet", |
| 1302 | # "info": "..." } ] } |
| 1303 | ## |
| 1304 | { 'command': 'x-query-usernet', |
| 1305 | 'returns': ['UsernetInfo'], |
| 1306 | 'if': 'CONFIG_SLIRP', |
| 1307 | 'features': [ 'unstable' ] } |
| 1308 | |
| 1309 | ## |
| 1310 | # @NetFilterInfo: |
| 1311 | # |
| 1312 | # Information about a netfilter attached to a network client. |
| 1313 | # |
| 1314 | # @name: filter object name (QOM path component) |
| 1315 | # |
| 1316 | # @type: QOM type name (e.g. "filter-mirror") |
| 1317 | # |
| 1318 | # @info: filter properties as comma-separated key=value pairs |
| 1319 | # (excluding @type) |
| 1320 | # |
| 1321 | # Since: 11.2 |
| 1322 | ## |
| 1323 | { 'struct': 'NetFilterInfo', |
| 1324 | 'data': { |
| 1325 | 'name': 'str', |
| 1326 | 'type': 'str', |
| 1327 | 'info': 'str' } } |
| 1328 | |
| 1329 | ## |
| 1330 | # @NetworkClientInfo: |
| 1331 | # |
| 1332 | # Information about a network client. |
| 1333 | # |
| 1334 | # @name: unique network client identifier |
| 1335 | # |
| 1336 | # @queue-index: index of this queue (0 for single-queue clients) |
| 1337 | # |
| 1338 | # @type: network client driver type |
| 1339 | # |
| 1340 | # @info-str: driver-specific formatted information string (e.g. |
| 1341 | # "model=e1000,macaddr=52:54:00:12:34:56") |
| 1342 | # |
| 1343 | # @peer: the connected peer client (always a leaf; the peer's own |
| 1344 | # peer field is never populated) |
| 1345 | # |
| 1346 | # @filters: attached netfilters |
| 1347 | # |
| 1348 | # Since: 11.2 |
| 1349 | ## |
| 1350 | { 'struct': 'NetworkClientInfo', |
| 1351 | 'data': { |
| 1352 | 'name': 'str', |
| 1353 | 'queue-index': 'uint32', |
| 1354 | 'type': 'NetClientDriver', |
| 1355 | 'info-str': 'str', |
| 1356 | '*peer': 'NetworkClientInfo', |
| 1357 | 'filters': ['NetFilterInfo'] } } |
| 1358 | |
| 1359 | ## |
| 1360 | # @NetHubPortInfo: |
| 1361 | # |
| 1362 | # Information about a hub port. |
| 1363 | # |
| 1364 | # @name: hub port identifier |
| 1365 | # |
| 1366 | # @peer: the network client connected through this port |
| 1367 | # |
| 1368 | # Since: 11.2 |
| 1369 | ## |
| 1370 | { 'struct': 'NetHubPortInfo', |
| 1371 | 'data': { |
| 1372 | 'name': 'str', |
| 1373 | '*peer': 'NetworkClientInfo' } } |
| 1374 | |
| 1375 | ## |
| 1376 | # @NetHubInfo: |
| 1377 | # |
| 1378 | # Information about a network hub. |
| 1379 | # |
| 1380 | # @id: hub identifier |
| 1381 | # |
| 1382 | # @ports: list of ports on this hub |
| 1383 | # |
| 1384 | # Since: 11.2 |
| 1385 | ## |
| 1386 | { 'struct': 'NetHubInfo', |
| 1387 | 'data': { |
| 1388 | 'id': 'int', |
| 1389 | 'ports': ['NetHubPortInfo'] } } |
| 1390 | |
| 1391 | ## |
| 1392 | # @NetworkInfo: |
| 1393 | # |
| 1394 | # Information about the network configuration. |
| 1395 | # |
| 1396 | # @hubs: network hubs and their ports |
| 1397 | # |
| 1398 | # @clients: network clients not associated with a hub |
| 1399 | # |
| 1400 | # Since: 11.2 |
| 1401 | ## |
| 1402 | { 'struct': 'NetworkInfo', |
| 1403 | 'data': { |
| 1404 | 'hubs': ['NetHubInfo'], |
| 1405 | 'clients': ['NetworkClientInfo'] } } |
| 1406 | |
| 1407 | ## |
| 1408 | # @x-query-network: |
| 1409 | # |
| 1410 | # Query the network configuration including hubs and clients. |
| 1411 | # |
| 1412 | # Features: |
| 1413 | # |
| 1414 | # @unstable: This command is meant for debugging. |
| 1415 | # |
| 1416 | # Returns: @NetworkInfo describing hubs and clients. |
| 1417 | # |
| 1418 | # Since: 11.2 |
| 1419 | # |
| 1420 | # .. qmp-example:: |
| 1421 | # |
| 1422 | # -> { "execute": "x-query-network" } |
| 1423 | # <- { "return": { "clients": [ { "name": "st0", |
| 1424 | # "queue-index": 0, "type": "stream", |
| 1425 | # "info-str": "listening" } ] } } |
| 1426 | ## |
| 1427 | { 'command': 'x-query-network', |
| 1428 | 'returns': 'NetworkInfo', |
| 1429 | 'features': [ 'unstable' ] } |