diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-12-22 19:23:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-22 19:23:26 -0800 |
| commit | ee16d11a59120cd4d981e0dcb90741fa4141372a (patch) | |
| tree | 98da4bc9601f30e2c9deb403fe213c9fb4335597 /src/core | |
| parent | d00483eadbee48b820a8a79163c5296953b6f5cb (diff) | |
| download | nng-ee16d11a59120cd4d981e0dcb90741fa4141372a.tar.gz nng-ee16d11a59120cd4d981e0dcb90741fa4141372a.tar.bz2 nng-ee16d11a59120cd4d981e0dcb90741fa4141372a.zip | |
fixes #823 Define public IPC (#824)
This introduces a basic IPC API, modeled on the TCP API, for direct access.
Only connection options are exposed at present -- we need to add options
for dialers and listeners (and particularly listener settings for
permissions and security attributes.) Documentation is still outstanding,
but a very limited test suite exists.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/platform.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/platform.h b/src/core/platform.h index 0a0709d1..2b7eb9f1 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -1,6 +1,7 @@ // // Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> +// Copyright 2018 Devolutions <infos@devolutions.net> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -375,6 +376,20 @@ extern int nni_ipc_conn_get_peer_pid(nni_ipc_conn *, uint64_t *); // NB: Only illumos & SunOS systems have the notion of "zones". extern int nni_ipc_conn_get_peer_zoneid(nni_ipc_conn *, uint64_t *); +// nni_ipc_conn_setopt is like setsockopt, but uses string names. These +// are the same names from the IPC transport, generally. There are no +// options that are generally settable on an IPC connection. +// NNG_OPT_REMADDR, NNG_OPT_LOCADDR, NNG_OPT_IPC_PERMISSIONS, +// NNG_OPT_ +extern int nni_ipc_conn_setopt( + nni_ipc_conn *, const char *, const void *, size_t); + +// nni_ipc_conn_getopt is like getsockopt, but uses string names. +// We support NNG_OPT_REMADDR and NNG_OPT_LOCADDR (with argument type +// nng_sockaddr), and on some platforms NNG_OPT_IPC_PEER_[UID,GID,ZONEID] +// (with type uint64_t.) +extern int nni_ipc_conn_getopt(nni_ipc_conn *, const char *, void *, size_t *); + // nni_ipc_dialer_init creates a new dialer object. extern int nni_ipc_dialer_init(nni_ipc_dialer **); |
