summaryrefslogtreecommitdiff
path: root/code/core/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/core/core.h')
-rw-r--r--code/core/core.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/code/core/core.h b/code/core/core.h
index 6c680f9..cb9bab6 100644
--- a/code/core/core.h
+++ b/code/core/core.h
@@ -70,7 +70,10 @@
#include "config.h"
#include <stddef.h>
+#include <stdint.h>
+
typedef long ssize_t;
+typedef uint32_t ecp_seq_t;
#ifdef ECP_WITH_PTHREAD
#include <pthread.h>
@@ -80,8 +83,8 @@ typedef long ssize_t;
#include "crypto/crypto.h"
#include "timer.h"
-#ifdef ECP_WITH_PTHREAD
-#include "msgq.h"
+#ifdef ECP_WITH_RBUF
+#include "rbuf.h"
#endif
#ifdef ECP_DEBUG
@@ -95,8 +98,6 @@ struct ECPContext;
struct ECPSocket;
struct ECPConnection;
-typedef uint32_t ecp_seq_t;
-
typedef int ecp_rng_t (void *, size_t);
typedef int ecp_conn_handler_new_t (struct ECPSocket *s, struct ECPConnection **c, struct ECPConnection *p, unsigned char s_idx, unsigned char c_idx, unsigned char *pub, ecp_aead_key_t *sh, unsigned char *msg, size_t sz);
@@ -250,8 +251,10 @@ typedef struct ECPConnection {
unsigned char key_idx_map[ECP_MAX_SOCK_KEY];
ECPDHShared shared[ECP_MAX_NODE_KEY][ECP_MAX_NODE_KEY];
unsigned char nonce[ECP_AEAD_SIZE_NONCE];
+#ifdef ECP_WITH_RBUF
+ ECPConnRBuffer rbuf;
+#endif
#ifdef ECP_WITH_PTHREAD
- ECPConnMsgQ msgq;
pthread_mutex_t mutex;
#endif
struct ECPConnection *proxy;