NNG_IPC_OPTIONS(5) | NNG Reference Manual | NNG_IPC_OPTIONS(5) |
nng_ipc_options - IPC-specific options
#include <nng/nng.h> #define NNG_OPT_IPC_PEER_GID "ipc:peer-gid" #define NNG_OPT_IPC_PEER_PID "ipc:peer-pid" #define NNG_OPT_IPC_PEER_UID "ipc:peer-uid" #define NNG_OPT_IPC_PEER_ZONEID "ipc:peer-zoneid" #define NNG_OPT_IPC_PERMISSIONS "ipc:permissions" #define NNG_OPT_IPC_SECURITY_DESCRIPTOR "ipc:security-descriptor"
This page documents the various standard options that can be set or retrieved on objects using IPC.
The option names should always be used by their symbolic definitions.
In the following list of options, the name of the option is supplied, along with the data type of the underlying value.
Some options are only meaningful or supported in certain contexts, or may have other access restrictions. An attempt has been made to include details about such restrictions in the description of the option.
The availability of the following options is platform-specific,
as the implementations of IPC are quite different on Windows and POSIX
systems.
NNG_OPT_IPC_PERMISSIONS
Not all systems validate these permissions.
In particular, illumos and Solaris are known to ignore these permission
settings when connecting.
Normally both read and write permission will be necessary for a
peer dialer to connect. See your system documentation for UNIX domain sockets
for more information.
The umask of the process is not applied to these bits.
The best practice for limiting access is to place the socket in a
directory writable only by the server, and only readable and searchable by
clients. All mainstream POSIX systems will fail to permit a client to
connect to a socket located in a directory for which the client lacks search
(execute) permission.
NNG_OPT_IPC_SECURITY_DESCRIPTOR
The following options are supported by this transport when the underlying platform supports them:
Generally, the following option values are also available when appropriate for the context:
nng_dialer_get(3), nng_dialer_set(3), nng_listener_get(3), nng_listener_set(3), nng_pipe_get(3), nng_options(5) nng(7), nng_ipc(7)
2025-01-05 |