From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIpqO-0005uU-W3 for qemu-devel@nongnu.org; Mon, 01 Oct 2012 19:56:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIpqN-0003UX-OO for qemu-devel@nongnu.org; Mon, 01 Oct 2012 19:56:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIpqN-0003UL-Dr for qemu-devel@nongnu.org; Mon, 01 Oct 2012 19:56:11 -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 q91NuAew014323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Oct 2012 19:56:10 -0400 Message-ID: <506A2D98.4080300@redhat.com> Date: Mon, 01 Oct 2012 17:56:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1349103144-6827-1-git-send-email-pbonzini@redhat.com> <1349103144-6827-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1349103144-6827-3-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig3D1EDF33C01E53903744174E" Subject: Re: [Qemu-devel] [PATCH v2 2/9] 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3D1EDF33C01E53903744174E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/01/2012 08:52 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > qapi-schema.json | 53 ++++++++++++++++++++++++++++++++++++++++++++++++= +++++ > 1 file modificato, 53 inserzioni(+) >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index 191d921..b443a99 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2367,6 +2367,59 @@ > 'opts': 'NetClientOptions' } } > =20 > ## > +# @IPSocketAddress > +# > +# Captures a range of possible destination addresses for 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 I= Pv6 > +# #optional > +# > +# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and I= Pv6 > +# #optional > +# > +# Since 1.3 > +## > +{ 'type': 'IPSocketAddress', > + 'data': { > + 'host': 'str', > + 'port': 'str', > + '*to': 'uint16', I still think it's a bit weird to have: 'host':'localhost', 'port':'1000', 'to':1001 for a port range, all because of the possibility of named ports; should '*to' be a 'str' if only for symmetry in the output? But it's bike-shedding, so I'll live with whatever works (that is, I'm not requesting a v3 on this patch). > +## > +# @SocketAddress > +# > +# Captures the address of a socket, which could also be a named file d= escriptor > +# > +# Since 1.3 > +## > +{ 'union': 'SocketAddress', > + 'data': { > + 'inet': 'IPSocketAddress', > + 'unix': 'UnixSocketAddress', > + 'fd': 'String' } } I guess you had to use the String wrapper instead of 'str'; but a bit of reading in the file showed that this part is at least correct. Reviewed-by: Eric Blake --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig3D1EDF33C01E53903744174E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQai2YAAoJEKeha0olJ0NqE7EIAJb3mKjUVJ20SJxl67BDelfh zC7VUQaXaJuUlAa/zKgSeHE0Ks1hoe0CdblK/1q8P6UDTarZ+y7AHJC+qw2xh1U8 wZa3tDh9wGwSrfeFeaas+cH5JyBLTcCHJC5XQ+ss4zq6QtIN81heJtBIXDeDyh+Y PgpGo9NSJSb8i2+K1Uz7MvSB56fFeS1N5lAmPC9tqkalsZSGfdswmDAAJP6HWeLf o8uGldjz0r2d/fmFpvB6jb9wUVwCmDqSzooCk7QXpfDwD6cxDMPkDRMQbypQgy0W izOqcbiRTQVGczkBmZkl1hSWw2GZNSWuOl7bsqIB72jj+982QyaWNQjjS86DvrI= =AmcC -----END PGP SIGNATURE----- --------------enig3D1EDF33C01E53903744174E--