summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 13:42:55 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 13:42:55 +0100
commit7a3c8bee42879add84a143ff98f28cbd0251dc7b (patch)
tree3138520bf3e16cd33fa03dfe68c1fedf67c3d901 /src/fastd.h
parentf2c2f2926bce65c5c09d274c514d382ffd98f78c (diff)
downloadfastd-7a3c8bee42879add84a143ff98f28cbd0251dc7b.tar
fastd-7a3c8bee42879add84a143ff98f28cbd0251dc7b.zip
Allow flexible specification of methods provided by an implementation
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h8
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);