From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42021 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORS4U-00037H-Nu for qemu-devel@nongnu.org; Wed, 23 Jun 2010 11:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORS4T-0006fF-JL for qemu-devel@nongnu.org; Wed, 23 Jun 2010 11:41:02 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:43600) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORS4T-0006aC-F9 for qemu-devel@nongnu.org; Wed, 23 Jun 2010 11:41:01 -0400 Received: by mail-iw0-f173.google.com with SMTP id 10so3530042iwn.4 for ; Wed, 23 Jun 2010 08:41:01 -0700 (PDT) From: Miguel Di Ciurcio Filho Date: Wed, 23 Jun 2010 12:40:01 -0300 Message-Id: <1277307603-28960-6-git-send-email-miguel.filho@gmail.com> In-Reply-To: <1277307603-28960-1-git-send-email-miguel.filho@gmail.com> References: <1277307603-28960-1-git-send-email-miguel.filho@gmail.com> Subject: [Qemu-devel] [PATCH 5/7] net: vde: introduce info_dict List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: avi@redhat.com, Miguel Di Ciurcio Filho , armbru@redhat.com, lcapitulino@redhat.com Signed-off-by: Miguel Di Ciurcio Filho --- net/vde.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/net/vde.c b/net/vde.c index 0b46fa6..a8a5b03 100644 --- a/net/vde.c +++ b/net/vde.c @@ -31,6 +31,9 @@ #include "qemu-char.h" #include "qemu-common.h" #include "qemu-option.h" +#include "qdict.h" +#include "qstring.h" +#include "qint.h" #include "sysemu.h" typedef struct VDEState { @@ -102,6 +105,17 @@ static int net_vde_init(VLANState *vlan, const char *model, snprintf(nc->info_str, sizeof(nc->info_str), "sock=%s,fd=%d", sock, vde_datafd(vde)); + assert(nc->info_dict == NULL); + nc->info_dict = qdict_new(); + qdict_put(nc->info_dict, "sock", qstring_from_str(sock)); + qdict_put(nc->info_dict, "fd", qint_from_int(vde_datafd(vde))); + qdict_put(nc->info_dict, "port", qint_from_int(port)); + qdict_put(nc->info_dict, "mode", qint_from_int(mode)); + + if (group) { + qdict_put(nc->info_dict, "group", qstring_from_str(group)); + } + s = DO_UPCAST(VDEState, nc, nc); s->vde = vde; -- 1.7.1