From patchwork Wed Oct 10 14:03:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [20/25] qapi: add socket address types Date: Wed, 10 Oct 2012 04:03:01 -0000 From: Paolo Bonzini X-Patchwork-Id: 190694 Message-Id: <1349877786-23514-21-git-send-email-pbonzini@redhat.com> To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com 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 +# +# @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', + '*ipv4': 'bool', + '*ipv6': 'bool' } } + +## +# @UnixSocketAddress +# +# Captures the 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', + 'unix': 'UnixSocketAddress', + 'fd': 'String' } } + +## # @getfd: # # Receive a file descriptor via SCM rights and assign it a name