diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-26 00:46:33 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-26 22:46:05 +0200 |
commit | 36690c7203f0e46665f328fbe82ae3bd573cc6ff (patch) | |
tree | 761707cbd83e499913277fc931e32d05bf3c32cc /src/async.h | |
parent | 64ce1c0f51b4d0c07c124071ea2cd8002eccd45d (diff) | |
download | fastd-36690c7203f0e46665f328fbe82ae3bd573cc6ff.tar fastd-36690c7203f0e46665f328fbe82ae3bd573cc6ff.zip |
Implement async verify
Diffstat (limited to 'src/async.h')
-rw-r--r-- | src/async.h | 24 |
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); |