diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-20 05:29:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-20 05:29:11 +0200 |
commit | 7adeb6e88196a594ec3d36ffc1c658340ffcd7bc (patch) | |
tree | 6a6bfb84387141bf39d573ef9fa47f2c993d1923 /src/method.h | |
parent | b9c8603931203f5d94091f7a05a5967304b62fbd (diff) | |
download | fastd-7adeb6e88196a594ec3d36ffc1c658340ffcd7bc.tar fastd-7adeb6e88196a594ec3d36ffc1c658340ffcd7bc.zip |
Make ctx global
Diffstat (limited to 'src/method.h')
-rw-r--r-- | src/method.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/method.h b/src/method.h index b5ff2f5..d7f3304 100644 --- a/src/method.h +++ b/src/method.h @@ -45,18 +45,18 @@ struct fastd_method_provider { bool (*create_by_name)(const char *name, fastd_method_t **method); void (*destroy)(fastd_method_t *method); - size_t (*key_length)(fastd_context_t *ctx, const fastd_method_t *method); - - fastd_method_session_state_t* (*session_init)(fastd_context_t *ctx, const fastd_method_t *method, const uint8_t *secret, bool initiator); - fastd_method_session_state_t* (*session_init_compat)(fastd_context_t *ctx, const fastd_method_t *method, 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); - void (*session_superseded)(fastd_context_t *ctx, fastd_method_session_state_t *session); - void (*session_free)(fastd_context_t *ctx, fastd_method_session_state_t *session); - - bool (*encrypt)(fastd_context_t *ctx, fastd_peer_t *peer, fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in); - bool (*decrypt)(fastd_context_t *ctx, fastd_peer_t *peer, fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in); + size_t (*key_length)(const fastd_method_t *method); + + fastd_method_session_state_t* (*session_init)(const fastd_method_t *method, const uint8_t *secret, bool initiator); + fastd_method_session_state_t* (*session_init_compat)(const fastd_method_t *method, const uint8_t *secret, size_t length, bool initiator); + bool (*session_is_valid)(fastd_method_session_state_t *session); + bool (*session_is_initiator)(fastd_method_session_state_t *session); + bool (*session_want_refresh)(fastd_method_session_state_t *session); + void (*session_superseded)(fastd_method_session_state_t *session); + void (*session_free)(fastd_method_session_state_t *session); + + bool (*encrypt)(fastd_peer_t *peer, fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in); + bool (*decrypt)(fastd_peer_t *peer, fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in); }; |