From patchwork Tue May 22 10:45:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 160606 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 896FFB6FA2 for ; Tue, 22 May 2012 21:19:17 +1000 (EST) Received: from localhost ([::1]:41821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWmas-0007B5-09 for incoming@patchwork.ozlabs.org; Tue, 22 May 2012 06:45:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWmaS-0006OS-24 for qemu-devel@nongnu.org; Tue, 22 May 2012 06:45:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWmaJ-0007Cn-Ag for qemu-devel@nongnu.org; Tue, 22 May 2012 06:45:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWmaJ-0007CQ-1P for qemu-devel@nongnu.org; Tue, 22 May 2012 06:44:59 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4MAivHh017818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 May 2012 06:44:57 -0400 Received: from lacos-laptop.usersys.redhat.com (dhcp-1-169.brq.redhat.com [10.34.1.169]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4MAim8h030413; Tue, 22 May 2012 06:44:56 -0400 From: Laszlo Ersek To: qemu-devel@nongnu.org, lersek@redhat.com Date: Tue, 22 May 2012 12:45:45 +0200 Message-Id: <1337683555-13301-7-git-send-email-lersek@redhat.com> In-Reply-To: <1337683555-13301-1-git-send-email-lersek@redhat.com> References: <1337683555-13301-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 06/16] qapi schema: add Netdev types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org NetdevTapOptions::sndbuf and NetdevDumpOptions::len use the new "size" type. Signed-off-by: Laszlo Ersek --- qapi-schema.json | 275 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 275 insertions(+), 0 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index a8b3803..fae2596 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1840,3 +1840,278 @@ # Since: 0.14.0 ## { 'command': 'netdev_del', 'data': {'id': 'str'} } + +## +# @NetdevNoneOptions +# +# Use it alone to have zero network devices. +# +# Since 1.2 +## +{ 'type': 'NetdevNoneOptions', + 'data': { } } + +## +# @NetLegacyNicOptions +# +# Create a new Network Interface Card. +# +# @netdev: #optional id of -netdev to connect to +# +# @macaddr: #optional MAC address +# +# @model: #optional device model (e1000, rtl8139, virtio etc.) +# +# @addr: #optional PCI device address +# +# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X +# +# Since 1.2 +## +{ 'type': 'NetLegacyNicOptions', + 'data': { + '*netdev': 'str', + '*macaddr': 'str', + '*model': 'str', + '*addr': 'str', + '*vectors': 'int' } } + +## +# @String +# +# A fat type wrapping 'str', to be embedded in lists. +# +# Since 1.2 +## +{ 'type': 'String', + 'data': { + 'str': 'str' } } + +## +# @NetdevUserOptions +# +# Use the user mode network stack which requires no administrator privilege to +# run. +# +# @hostname: #optional client hostname reported by the builtin DHCP server +# +# @restrict: #optional isolate the guest from the host +# +# @ip: #optional legacy parameter, use net= instead +# +# @net: #optional IP address and optional netmask +# +# @host: #optional guest-visible address of the host +# +# @tftp: #optional root directory of the built-in TFTP server +# +# @bootfile: #optional BOOTP filename, for use with tftp= +# +# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can +# assign +# +# @dns: #optional guest-visible address of the virtual nameserver +# +# @smb: #optional root directory of the built-in SMB server +# +# @smbserver: #optional IP address of the built-in SMB server +# +# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest +# endpoints +# +# @guestfwd: #optional forward guest TCP connections +# +# Since 1.2 +## +{ 'type': 'NetdevUserOptions', + 'data': { + '*hostname': 'str', + '*restrict': 'bool', + '*ip': 'str', + '*net': 'str', + '*host': 'str', + '*tftp': 'str', + '*bootfile': 'str', + '*dhcpstart': 'str', + '*dns': 'str', + '*smb': 'str', + '*smbserver': 'str', + '*hostfwd': ['String'], + '*guestfwd': ['String'] } } + +## +# @NetdevTapOptions +# +# Connect the host TAP network interface name to the VLAN. +# +# @ifname: #optional interface name +# +# @fd: #optional file descriptor of an already opened tap +# +# @script: #optional script to initialize the interface +# +# @downscript: #optional script to shut down the interface +# +# @helper: #optional command to execute to configure bridge +# +# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes. +# +# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface +# +# @vhost: #optional enable vhost-net network accelerator +# +# @vhostfd: #optional file descriptor of an already opened vhost net device +# +# @vhostforce: #optional vhost on for non-MSIX virtio guests +# +# Since 1.2 +## +{ 'type': 'NetdevTapOptions', + 'data': { + '*ifname': 'str', + '*fd': 'str', + '*script': 'str', + '*downscript': 'str', + '*helper': 'str', + '*sndbuf': 'size', + '*vnet_hdr': 'bool', + '*vhost': 'bool', + '*vhostfd': 'str', + '*vhostforce': 'bool' } } + +## +# @NetdevSocketOptions +# +# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP +# socket connection. +# +# @fd: #optional file descriptor of an already opened socket +# +# @listen: #optional port number, and optional hostname, to listen on +# +# @connect: #optional port number, and optional hostname, to connect to +# +# @mcast: #optional UDP multicast address and port number +# +# @localaddr: #optional source address and port for multicast and udp packets +# +# @udp: #optional UDP unicast address and port number +# +# Since 1.2 +## +{ 'type': 'NetdevSocketOptions', + 'data': { + '*fd': 'str', + '*listen': 'str', + '*connect': 'str', + '*mcast': 'str', + '*localaddr': 'str', + '*udp': 'str' } } + +## +# @NetdevVdeOptions +# +# Connect the VLAN to a vde switch running on the host. +# +# @sock: #optional socket path +# +# @port: #optional port number +# +# @group: #optional group owner of socket +# +# @mode: #optional permissions for socket +# +# Since 1.2 +## +{ 'type': 'NetdevVdeOptions', + 'data': { + '*sock': 'str', + '*port': 'int', + '*group': 'str', + '*mode': 'int' } } + +## +# @NetdevDumpOptions +# +# Dump VLAN network traffic to a file. +# +# @len: #optional per-packet size limit (64k default). Understands [TGMKkb] +# suffixes. +# +# @file: #optional dump file path (default is qemu-vlan0.pcap) +# +# Since 1.2 +## +{ 'type': 'NetdevDumpOptions', + 'data': { + '*len': 'size', + '*file': 'str' } } + +## +# @NetdevBridgeOptions +# +# Connect a host TAP network interface to a host bridge device. +# +# @br: #optional bridge name +# +# @helper: #optional command to execute to configure bridge +# +# Since 1.2 +## +{ 'type': 'NetdevBridgeOptions', + 'data': { + '*br': 'str', + '*helper': 'str' } } + +## +# @NetClientOptions +# +# A discriminated record of network device traits. +# +# Since 1.2 +## +{ 'union': 'NetClientOptions', + 'data': { + 'none': 'NetdevNoneOptions', + 'nic': 'NetLegacyNicOptions', + 'user': 'NetdevUserOptions', + 'tap': 'NetdevTapOptions', + 'socket': 'NetdevSocketOptions', + 'vde': 'NetdevVdeOptions', + 'dump': 'NetdevDumpOptions', + 'bridge': 'NetdevBridgeOptions' } } + +## +# @NetLegacy +# +# Captures the configuration of a network device; legacy. +# +# @vlan: #optional vlan number +# +# @name: #optional identifier for monitor commands +# +# @traits: device type specific properties (legacy) +# +# Since 1.2 +## +{ 'type': 'NetLegacy', + 'data': { + '*vlan': 'int', + 'name': 'str', + 'opts': 'NetClientOptions' } } + +## +# @Netdev +# +# Captures the configuration of a network device. +# +# @id: identifier for monitor commands. +# +# @traits: device type specific properties +# +# Since 1.2 +## +{ 'type': 'Netdev', + 'data': { + 'id': 'str', + 'opts': 'NetClientOptions' } }