[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 20/25] qapi: add socket address types
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 20/25] qapi: add socket address types |
Date: |
Wed, 17 Oct 2012 18:48:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 |
Il 17/10/2012 18:43, Markus Armbruster ha scritto:
> Paolo Bonzini <address@hidden> writes:
>
>> Acked-by: Luiz Capitulino <address@hidden>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>> 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"?
Any suggestions?
>> +#
>> +# @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.
This is because port can be a service name. Using a union was deemed
overkill.
>> + '*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.
Ok. Luiz, at this point please unqueue the series. I'll send a pull
request myself to Anthony.
Paolo
>> + 'unix': 'UnixSocketAddress',
>> + 'fd': 'String' } }
>> +
>> +##
>> # @getfd:
>> #
>> # Receive a file descriptor via SCM rights and assign it a name
- Re: [Qemu-devel] [PATCH 15/25] qemu-sockets: add error propagation to inet_connect_addr, (continued)
[Qemu-devel] [PATCH 18/25] qemu-sockets: add error propagation to Unix socket functions, Paolo Bonzini, 2012/10/10
[Qemu-devel] [PATCH 25/25] hmp: add NBD server commands, Paolo Bonzini, 2012/10/10
[Qemu-devel] [PATCH 20/25] qapi: add socket address types, Paolo Bonzini, 2012/10/10
[Qemu-devel] [PATCH 19/25] build: add QAPI files to the tools, Paolo Bonzini, 2012/10/10
Re: [Qemu-devel] [PULL for Luiz 00/25] Combined qemu-sockets cleanup v2 + NBD server, Luiz Capitulino, 2012/10/16
Re: [Qemu-devel] [PULL for Luiz 00/25] Combined qemu-sockets cleanup v2 + NBD server, Markus Armbruster, 2012/10/17