[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: |
Fri, 19 Oct 2012 04:39:29 -0400 (EDT) |
> >> 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.
>
> Two ways to reduce the ugliness:
>
> 1. Make @to a string, too. Yes, users don't normally want to specify
> the upper bound as service name, but if a user wanted to, it would
> work just fine.
>
> 2. Use a number of ports instead of an upper port bound: replace @to
> by @address@hidden
Both considered, but they make it an absolute pain to deal with the
current QemuOpts code that expects a @to and expects it to be an
integer.
> >>> + '*ipv4': 'bool',
> >>> + '*ipv6': 'bool' } }
> >>> +
> >>> +##
> >>> +# @UnixSocketAddress
> >>> +#
> >>> +# Captures the destination address of a Unix socket
> >>
> >> What's a "destination address of a Unix socket"?
>
> "Socket address in the local namespace"
Ok.
> >>> + 'unix': 'UnixSocketAddress',
> >>> + 'fd': 'String' } }
>
> 'String'? Do you mean 'str'?
'String' is a boxed 'str'. It gives more freedom to extend the API
later in a backwards-compatible way.
Paolo
- Re: [Qemu-devel] [PATCH 15/25] qemu-sockets: add error propagation to inet_connect_addr, (continued)
[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