qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/3] qemu-sockets: add abstract UNIX domain socket support


From: Eric Blake
Subject: Re: [PATCH v3 1/3] qemu-sockets: add abstract UNIX domain socket support
Date: Mon, 11 May 2020 13:01:06 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/10/20 1:14 AM, xiaoqiang zhao wrote:
unix_listen/connect_saddr now support abstract address types

two aditional BOOL switches are introduced:
tight: whether to set @addrlen to the minimal string length,
        or the maximum sun_path length. default is TRUE
abstract: whether we use abstract address. default is FALSE

cli example:
-monitor unix:/tmp/unix.socket,abstract,tight=off
OR
-chardev socket,path=/tmp/unix.socket,id=unix1,abstract,tight=on

Signed-off-by: xiaoqiang zhao <address@hidden>
---

+++ b/qapi/sockets.json
@@ -73,12 +73,19 @@
  # Captures a socket address in the local ("Unix socket") namespace.
  #
  # @path: filesystem path to use
+# @tight: pass a socket address length that does not include the whole
+#         struct sockaddr_un record but (besides other components) only
+#         the relevant part of the filename or abstract string.
+#         default value is 'true'

Perhaps:

pass a socket address length confined to the minimum length of the abstract string, rather than the full sockaddr_un record length (only matters for abstract sockets, default true)

+# @abstract: whether this is a abstract address, default is 'false'

Both new fields should have a '(since 5.1)' tag, to make it obvious that they did not exist in earlier releases with the rest of the struct.

s/a abstract/an abstract/

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]