summaryrefslogtreecommitdiffstats
path: root/src/async.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/async.h')
-rw-r--r--src/async.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/async.h b/src/async.h
index f2a8f20..fd6ebd5 100644
--- a/src/async.h
+++ b/src/async.h
@@ -30,13 +30,33 @@
#include "peer.h"
-struct fastd_async_resolve_return {
+typedef enum fastd_async_type {
+ ASYNC_TYPE_RESOLVE_RETURN,
+ ASYNC_TYPE_VERIFY_RETURN,
+} fastd_async_type_t;
+
+
+typedef struct fastd_async_resolve_return {
uint64_t peer_id;
size_t remote;
size_t n_addr;
fastd_peer_address_t addr[];
-};
+} fastd_async_resolve_return_t;
+
+typedef struct fastd_async_verify_return {
+ bool ok;
+
+ uint64_t peer_id;
+
+ const fastd_method_info_t *method;
+ fastd_socket_t *sock;
+
+ fastd_peer_address_t local_addr;
+ fastd_peer_address_t remote_addr;
+
+ uint8_t protocol_data[] __attribute__((aligned(8)));
+} fastd_async_verify_return_t;
void fastd_async_init(void);