diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-27 22:43:19 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-27 22:43:19 +0200 |
commit | 3065f96f7b833701a03f5759bfc593a7f6943c4e (patch) | |
tree | 7413b460332130fc760f1c3a579a502e5e7454ea /src/task.h | |
parent | 2190d635c1bb7d917c16b543b78d74a4ca9a735d (diff) | |
download | fastd-3065f96f7b833701a03f5759bfc593a7f6943c4e.tar fastd-3065f96f7b833701a03f5759bfc593a7f6943c4e.zip |
New handshake format; don't respond to data packets from unknown peers with handshakes, but request a re-handshake
Diffstat (limited to 'src/task.h')
-rw-r--r-- | src/task.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -52,6 +52,10 @@ typedef struct _fastd_task_handle_recv { fastd_buffer buffer; } fastd_task_handle_recv; +typedef struct _fastd_task_handshake { + bool force; +} fastd_task_handshake; + typedef struct _fastd_task { fastd_queue_entry entry; @@ -61,6 +65,7 @@ typedef struct _fastd_task { union { fastd_task_send send; fastd_task_handle_recv handle_recv; + fastd_task_handshake handshake; }; } fastd_task; @@ -77,7 +82,7 @@ void fastd_task_put_send_handshake(fastd_context *ctx, fastd_peer *peer, fastd_b void fastd_task_put_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); void fastd_task_put_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); -void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout); +void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout, bool force); void fastd_task_delete_peer(fastd_context *ctx, fastd_peer *peer); |