From fc6882305f0b5e06e58a0a25740f422d133015b5 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 1 Nov 2020 22:05:35 -0800 Subject: fixes #1041 Abstract socket address for IPC fixes #1326 Linux IPC could use fchmod fixes #1327 getsockname on ipc may not work This introduces an abstract:// style transport, which on Linux results in using the abstract socket with the given name (not including the leading NULL byte). A new NNG_AF_ABSTRACT is provided. Auto bind abstract sockets are also supported. While here we have inlined the aios for the POSIX ipc pipe objects, eliminating at least one set of failure paths, and have also performed various other cleanups. A unix:// alias is available on POSIX systems, which acts just like ipc:// (and is fact just an alias). This is supplied so that in the future we can add support for AF_UNIX on Windows. We've also absorbed the ipcperms test into the new ipc_test suite. Finally we are now enforcing that IPC path names on Windows are not over the maximum size, rather than just silently truncating them. --- docs/man/nng_sockaddr.5.adoc | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'docs/man/nng_sockaddr.5.adoc') diff --git a/docs/man/nng_sockaddr.5.adoc b/docs/man/nng_sockaddr.5.adoc index cf347f66..cd10cab4 100644 --- a/docs/man/nng_sockaddr.5.adoc +++ b/docs/man/nng_sockaddr.5.adoc @@ -20,21 +20,23 @@ nng_sockaddr - socket address #include typedef union nng_sockaddr { - uint16_t s_family; - nng_sockaddr_ipc s_ipc; - nng_sockaddr_inproc s_inproc; - nng_sockaddr_in s_in; - nng_sockaddr_in6 s_in6; - nng_sockaddr_zt s_zt; + uint16_t s_family; + nng_sockaddr_ipc s_ipc; + nng_sockaddr_inproc s_inproc; + nng_sockaddr_in s_in; + nng_sockaddr_in6 s_in6; + nng_sockaddr_zt s_zt; + nng_sockaddr_abstract s_abstract; } nng_sockaddr; enum sockaddr_family { - NNG_AF_UNSPEC = 0, - NNG_AF_INPROC = 1, - NNG_AF_IPC = 2, - NNG_AF_INET = 3, - NNG_AF_INET6 = 4, - NNG_AF_ZT = 5, + NNG_AF_UNSPEC = 0, + NNG_AF_INPROC = 1, + NNG_AF_IPC = 2, + NNG_AF_INET = 3, + NNG_AF_INET6 = 4, + NNG_AF_ZT = 5, + NNG_AF_ABSTRACT = 6 }; ---- @@ -70,12 +72,14 @@ The values of `s_family` are as follows: `NNG_AF_INET`:: Address for TCP/IP (v4) communication. The `s_in` member is valid. `NNG_AF_INET6`:: Address for TCP/IP (v6) communication. The `s_in6` member is valid. `NNG_AF_ZT`:: Address for ZeroTier transport (xref:nng_zerotier.7.adoc[nng_zerotier(7)]). The `s_zt` member is valid. +`NNG_AF_ABSTRACT`:: Address for an abstract UNIX domain socket. The `s_abstract` member is valid. Please see the manual pages for each individual type for more information. == SEE ALSO [.text-left] +xref:nng_sockaddr_abstract.5.adoc[nng_sockaddr_abstract(5)], xref:nng_sockaddr_in.5.adoc[nng_sockaddr_in(5)], xref:nng_sockaddr_in6.5.adoc[nng_sockaddr_in6(5)], xref:nng_sockaddr_inproc.5.adoc[nng_sockaddr_inproc(5)], -- cgit v1.2.3-70-g09d2