aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_impl.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-21 14:03:08 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-25 12:17:06 -0700
commit9e5149973d5d16efec14ee12e62de23198b325ce (patch)
treec5392103d62d185016666f5bb7d1f447e2686389 /src/platform/posix/posix_impl.h
parent2579a853e6db72ba75a1e3e6c30997364b9df32d (diff)
downloadnng-9e5149973d5d16efec14ee12e62de23198b325ce.tar.gz
nng-9e5149973d5d16efec14ee12e62de23198b325ce.tar.bz2
nng-9e5149973d5d16efec14ee12e62de23198b325ce.zip
Initial swag at UDP (POSIX only) low level handling.
This includes async send and recv, driven from the poller. This will be requierd to support the underlying UDP and ZeroTier transports in the future. (ZeroTier is getting done first.)
Diffstat (limited to 'src/platform/posix/posix_impl.h')
-rw-r--r--src/platform/posix/posix_impl.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h
index 72842076..46ebbc1d 100644
--- a/src/platform/posix/posix_impl.h
+++ b/src/platform/posix/posix_impl.h
@@ -21,17 +21,25 @@
#define PLATFORM_POSIX_DEBUG
#define PLATFORM_POSIX_CLOCK
#define PLATFORM_POSIX_IPC
-#define PLATFORM_POSIX_NET
+#define PLATFORM_POSIX_TCP
#define PLATFORM_POSIX_PIPE
#define PLATFORM_POSIX_RANDOM
#define PLATFORM_POSIX_SOCKET
#define PLATFORM_POSIX_THREAD
#define PLATFORM_POSIX_PIPEDESC
#define PLATFORM_POSIX_EPDESC
+#define PLATFORM_POSIX_SOCKADDR
+#define PLATFORM_POSIX_UDP
#include "platform/posix/posix_config.h"
#endif
+#ifdef PLATFORM_POSIX_SOCKADDR
+#include <sys/socket.h>
+extern int nni_posix_sockaddr2nn(nni_sockaddr *, const void *);
+extern int nni_posix_nn2sockaddr(void *, const nni_sockaddr *);
+#endif
+
#ifdef PLATFORM_POSIX_DEBUG
extern int nni_plat_errno(int);
@@ -40,8 +48,6 @@ extern int nni_plat_errno(int);
// Define types that this platform uses.
#ifdef PLATFORM_POSIX_THREAD
-extern int nni_plat_devnull; // open descriptor on /dev/null
-
#include <pthread.h>
// These types are provided for here, to permit them to be directly inlined