From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIcLV-0005Vh-2Q for qemu-devel@nongnu.org; Mon, 11 Jan 2016 08:17:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIcLQ-0000g8-8s for qemu-devel@nongnu.org; Mon, 11 Jan 2016 08:17:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIcLQ-0000g3-2l for qemu-devel@nongnu.org; Mon, 11 Jan 2016 08:17:12 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id B733A8E757 for ; Mon, 11 Jan 2016 13:17:11 +0000 (UTC) From: "Daniel P. Berrange" Date: Mon, 11 Jan 2016 13:17:00 +0000 Message-Id: <1452518225-11751-1-git-send-email-berrange@redhat.com> Subject: [Qemu-devel] [PATCH v3 0/5] Convert qemu-socket to use QAPI exclusively List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini An updated posting of: v2: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg03927.html v1: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04950.html All the callers of the qemu-sockets module now use the APIs which take a QAPI SocketAddress. Thus we now have the fun situation with VNC & Chardevs that they use QemuOpts to parse the CLI args, then convert to a SocketAddress, pass it into qemu-sockets which converts it back into a QemuOpts instance. This series rips out all usage of QemuOpts from qemu-sockets so that the code exclusively uses QAPI SocketAddress objects. Now when parsing CLI args, we just convert from QemuOpts to SocketAddress and use that directly, and when using the monitor there's no conversion at all, we have SocketAddress all the way. This conversion also fixes a bug in the code where use of ipv4=off and ipv6=off at the same time, resulted in using PF_UNSPEC and so was in effective equivalent to using ipv4=on and ipv6=on. We now report an explicit error for the ipv4=off + ipv6=off scenario, since it is an invalid request to make. Finally, the VNC code is fixed to honour the distinction between ipv4/ipv6 being omitted vs set to 'off'. Changed in v3: - Removed misleading/obsolete text from commit message - Expanded comment about logic we're applying to getaddrinfo Changed in v2: - Optimization suggested by Paolo - Removed accidental debug g_printerr()s - Resolved conflicts with QAPI generator changes that renamed various struct fields Daniel P. Berrange (5): sockets: remove use of QemuOpts from header file sockets: remove use of QemuOpts from socket_listen sockets: remove use of QemuOpts from socket_connect sockets: remove use of QemuOpts from socket_dgram vnc: distiguish between ipv4/ipv6 omitted vs set to off include/qemu/sockets.h | 10 -- ui/vnc.c | 18 ++- util/qemu-sockets.c | 344 ++++++++++++++++++++++--------------------------- 3 files changed, 169 insertions(+), 203 deletions(-) -- 2.5.0