Received: from eggs.gnu.org ([208.118.235.92]:39830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOWik-0007ot-78 for qemu-devel@nongnu.org; Wed, 17 Oct 2012 12:43:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOWii-0000td-P1 for qemu-devel@nongnu.org; Wed, 17 Oct 2012 12:43:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOWii-0000tO-Fd for qemu-devel@nongnu.org; Wed, 17 Oct 2012 12:43:48 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9HGhl7R015746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Oct 2012 12:43:47 -0400 From: Markus Armbruster References: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> <1349877786-23514-21-git-send-email-pbonzini@redhat.com> Date: Wed, 17 Oct 2012 18:43:46 +0200 In-Reply-To: <1349877786-23514-21-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Wed, 10 Oct 2012 16:03:01 +0200") Message-ID: <871ugxujzx.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 20/25] qapi: add socket address types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com Paolo Bonzini writes: > Acked-by: Luiz Capitulino > Signed-off-by: Paolo Bonzini > --- > qapi-schema.json | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file modificato, 53 inserzioni(+) > > diff --git a/qapi-schema.json b/qapi-schema.json > index f9dbdae..d40b5fc 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2505,6 +2505,59 @@ > 'opts': 'NetClientOptions' } } > > ## > +# @IPSocketAddress > +# > +# Captures the destination address of an IP socket What's a "destination address of an IP socket"? > +# > +# @host: host part of the address > +# > +# @port: port part of the address, or lowest port if @to is present > +# > +# @to: highest port to try > +# > +# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 > +# #optional > +# > +# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 > +# #optional > +# > +# Since 1.3 > +## > +{ 'type': 'IPSocketAddress', > + 'data': { > + 'host': 'str', > + 'port': 'str', > + '*to': 'uint16', Two port members, one is 'str', the other is 'uint16'. Ugly. > + '*ipv4': 'bool', > + '*ipv6': 'bool' } } > + > +## > +# @UnixSocketAddress > +# > +# Captures the destination address of a Unix socket What's a "destination address of a Unix socket"? > +# > +# @path: filesystem path to use > +# > +# Since 1.3 > +## > +{ 'type': 'UnixSocketAddress', > + 'data': { > + 'path': 'str' } } > + > +## > +# @SocketAddress > +# > +# Captures the address of a socket, which could also be a named file descriptor > +# > +# Since 1.3 > +## > +{ 'union': 'SocketAddress', > + 'data': { > + 'inet': 'IPSocketAddress', Call it InetSocketAddress, like 'inet', AF_INET, PF_INET, and so forth. > + 'unix': 'UnixSocketAddress', > + 'fd': 'String' } } > + > +## > # @getfd: > # > # Receive a file descriptor via SCM rights and assign it a name