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 <zxq_yx_...@163.com>
---

+++ 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