diff options
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fastd.h b/src/fastd.h index 2607322..5ace535 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -79,7 +79,7 @@ struct fastd_protocol { }; struct fastd_method { - const char *name; + bool (*provides)(fastd_context_t *ctx, const char *name); size_t (*max_packet_size)(fastd_context_t *ctx); size_t (*min_encrypt_head_space)(fastd_context_t *ctx); @@ -88,8 +88,8 @@ struct fastd_method { size_t (*min_decrypt_tail_space)(fastd_context_t *ctx); size_t (*key_length)(fastd_context_t *ctx); - fastd_method_session_state_t* (*session_init)(fastd_context_t *ctx, const uint8_t *secret, bool initiator); - fastd_method_session_state_t* (*session_init_compat)(fastd_context_t *ctx, const uint8_t *secret, size_t length, bool initiator); + fastd_method_session_state_t* (*session_init)(fastd_context_t *ctx, const char *name, const uint8_t *secret, bool initiator); + fastd_method_session_state_t* (*session_init_compat)(fastd_context_t *ctx, const char *name, const uint8_t *secret, size_t length, bool initiator); bool (*session_is_valid)(fastd_context_t *ctx, fastd_method_session_state_t *session); bool (*session_is_initiator)(fastd_context_t *ctx, fastd_method_session_state_t *session); bool (*session_want_refresh)(fastd_context_t *ctx, fastd_method_session_state_t *session); @@ -359,7 +359,7 @@ void fastd_logf(const fastd_context_t *ctx, fastd_loglevel_t level, const char * void fastd_add_peer_dir(fastd_context_t *ctx, fastd_config_t *conf, const char *dir); bool fastd_read_config(fastd_context_t *ctx, fastd_config_t *conf, const char *filename, bool peer_config, int depth); -const fastd_method_t* fastd_method_get_by_name(const char *name); +const fastd_method_t* fastd_method_get_by_name(fastd_context_t *ctx, const char *name); const fastd_cipher_t** fastd_cipher_config_alloc(void); void fastd_cipher_config_free(const fastd_cipher_t **cipher_conf); |