From patchwork Thu Jun 10 21:36:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Di Ciurcio Filho X-Patchwork-Id: 55264 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 06C161007D1 for ; Fri, 11 Jun 2010 07:40:18 +1000 (EST) Received: from localhost ([127.0.0.1]:45818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMpTr-0000SQ-5L for incoming@patchwork.ozlabs.org; Thu, 10 Jun 2010 17:40:07 -0400 Received: from [140.186.70.92] (port=59335 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMpSR-0000OP-Fe for qemu-devel@nongnu.org; Thu, 10 Jun 2010 17:38:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMpSQ-0004eP-3t for qemu-devel@nongnu.org; Thu, 10 Jun 2010 17:38:39 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:57937) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMpSQ-0004eH-1M for qemu-devel@nongnu.org; Thu, 10 Jun 2010 17:38:38 -0400 Received: by gyd5 with SMTP id 5so335726gyd.4 for ; Thu, 10 Jun 2010 14:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=uyjdteENoH1GQh/iEkNPNummtJR+oKLtOzZaO7MNjGE=; b=iTAFy1vm49/zWkSoSNzwHSc5M3YFPrGLm76GdBp9tDbyJHAVlhoFEF/ZTRlXE3fVof d8hzVYfMjVIHIjbXNlzPF3d/RDpwxuLuPbktLhuaOdYoBZAxc1Hgo2djmuaVk0EiWXVF IXqJ3ofyekecioQ4iJvlpxyifeBQNDPEk8A9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=I4JHhId1Hc07i5jLdcjuTEKEqTWB9VrsJTFEdoFT56OHXv4ESmW2S7+EgM89yMH3YG aq/bSIQ2vCBoFoQZknCdWDmUyu2VwbKQnZndePcrHgFAmdc/xcb0ELUmpb9hoGuszYSq Re/iJWg2OcuTSpydywj7+zJMm4+hfA70n9LdU= Received: by 10.150.160.16 with SMTP id i16mr2156291ybe.172.1276205917284; Thu, 10 Jun 2010 14:38:37 -0700 (PDT) Received: from localhost.localdomain ([189.61.230.202]) by mx.google.com with ESMTPS id v21sm4495622ybk.1.2010.06.10.14.38.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Jun 2010 14:38:36 -0700 (PDT) From: Miguel Di Ciurcio Filho To: qemu-devel@nongnu.org Date: Thu, 10 Jun 2010 18:36:59 -0300 Message-Id: <1276205825-1922-3-git-send-email-miguel.filho@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1276205825-1922-1-git-send-email-miguel.filho@gmail.com> References: <1276205825-1922-1-git-send-email-miguel.filho@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: armbru@redhat.com, lcapitulino@redhat.com, Miguel Di Ciurcio Filho , avi@redhat.com Subject: [Qemu-devel] [PATCH 2/8] QMP: Introduce the documentation for query-netdev and info netdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org These commands show the information about active backend network devices. Signed-off-by: Miguel Di Ciurcio Filho --- qemu-monitor.hx | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/qemu-monitor.hx b/qemu-monitor.hx index f6a94f2..14a0ba1 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -1674,6 +1674,59 @@ show the various VLANs and the associated devices ETEXI STEXI +@item info netdev +show information about the current backend network devices +ETEXI +SQMP +query-netdev +---------------- + +Each device is represented by a json-object. The returned value is a json-array +of all devices. + +Each json-object contain the following: + +- "id": the device's ID, must be unique (json-string) +- "vlan": QEMU's internal vlan identification. Only present if the device is + attached to a VLAN (json-int, optional) +- "peer": ID of the frontend device when on a 1:1 relationship (json-string, + optional) +- "info": json-object containing the configuration information about the device. + +Note: The supported device information is the same one supported by the '-net' +command-line argument, which are listed in the '-help' output or QEMU's manual. + +Example: + +-> { "execute": "query-netdev" } +<- { + "return": [ + { + "id": "tap.0", + "type": "tap", + "vlan": 0, + "info": { + "script": "/etc/qemu-ifup", + "downscript": "/etc/qemu-ifdown", + "ifname": "tap0", + "vhost": true + }, + }, + { + "id": "user.0", + "type": "user", + "peer": "e1000.0", + "info": { + "net": "10.0.2.0", + "netmask": "255.255.255.0" + }, + }, + ] + } + +EQMP + +STEXI @item info chardev show the character devices ETEXI