aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index cecb4825..fbf074b4 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -1,5 +1,6 @@
//
-// Copyright 2017 Garrett D'Amore <garrett@damore.org>
+// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2018 Capitar IT Group BV <info@capitoar.com>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -34,6 +35,7 @@ typedef struct nng_sockaddr nni_sockaddr;
typedef struct nng_event nni_event;
typedef struct nng_notify nni_notify;
typedef struct nng_url nni_url;
+typedef struct nng_iov nni_iov;
// These are our own names.
typedef struct nni_socket nni_sock;
@@ -64,12 +66,6 @@ typedef struct nni_aio nni_aio;
typedef void (*nni_cb)(void *);
-// Used by transports for scatter gather I/O.
-typedef struct {
- uint8_t *iov_buf;
- size_t iov_len;
-} nni_iov;
-
// Notify descriptor.
typedef struct {
int sn_wfd; // written to in order to flag an event
@@ -134,6 +130,9 @@ typedef struct {
(((uint64_t)((uint8_t)(ptr)[6])) << 8) + \
(((uint64_t)(uint8_t)(ptr)[7]))
+// This increments a pointer a fixed number of byte cells.
+#define NNI_INCPTR(ptr, n) ((ptr) = (void *) ((char *) (ptr) + (n)))
+
// A few assorted other items.
#define NNI_FLAG_IPV4ONLY 1