summaryrefslogtreecommitdiffstats
path: root/src/handshake.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-20 23:47:41 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-20 23:47:41 +0100
commiteece4529cbc27eb8266cd9f47cf84c0d0a6b742a (patch)
tree8d33bfdf766c8ff2579c3f2c0de621af82aeb956 /src/handshake.h
parent972dd90499fd19fcd2c31cf15bb26231d0a862aa (diff)
downloadfastd-eece4529cbc27eb8266cd9f47cf84c0d0a6b742a.tar
fastd-eece4529cbc27eb8266cd9f47cf84c0d0a6b742a.zip
handshake: delay method parsing until the sender key has been handled
Otherwise fastd won't use the correct peer group's method list for handshakes incoming on generic sockets.
Diffstat (limited to 'src/handshake.h')
-rw-r--r--src/handshake.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/handshake.h b/src/handshake.h
index 5ad65a3..ccd1da5 100644
--- a/src/handshake.h
+++ b/src/handshake.h
@@ -102,6 +102,8 @@ struct fastd_handshake_buffer {
fastd_handshake_buffer_t fastd_handshake_new_init(size_t tail_space);
fastd_handshake_buffer_t fastd_handshake_new_reply(uint8_t type, bool little_endian, const fastd_method_info_t *method, const fastd_string_stack_t *methods, size_t tail_space);
+void fastd_handshake_send_error(fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, fastd_peer_t *peer, const fastd_handshake_t *handshake, uint8_t reply_code, uint16_t error_detail);
+const fastd_method_info_t * fastd_handshake_get_method(const fastd_peer_t *peer, const fastd_handshake_t *handshake);
void fastd_handshake_handle(fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, fastd_peer_t *peer, fastd_buffer_t buffer);