diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-12-13 03:32:00 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-12-16 06:35:58 +0100 |
commit | 746e4b86eba7cd89d23a3e89b8979b795b9a4a65 (patch) | |
tree | ed0feb3589f1f301df795f864550f3adfb7ceba8 /src/data.c | |
parent | b40dc5be9739c362329ab5741886447b9a1fdf44 (diff) |
types: enforce consistency
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -26,7 +26,7 @@ struct encryption_skb_cb { struct encryption_ctx { struct padata_priv padata; struct sk_buff_head queue; - void (*callback)(struct sk_buff_head *, struct wireguard_peer *); + packet_create_data_callback_t callback; struct wireguard_peer *peer; struct noise_keypair *keypair; }; @@ -34,12 +34,12 @@ struct encryption_ctx { struct decryption_ctx { struct padata_priv padata; struct sk_buff *skb; - void (*callback)(struct sk_buff *skb, struct wireguard_peer *, struct endpoint *, bool used_new_key, int err); + packet_consume_data_callback_t callback; struct noise_keypair *keypair; struct endpoint endpoint; u64 nonce; - u8 num_frags; int ret; + u8 num_frags; }; #ifdef CONFIG_WIREGUARD_PARALLEL @@ -250,7 +250,7 @@ static inline unsigned int choose_cpu(__le32 key) } #endif -int packet_create_data(struct sk_buff_head *queue, struct wireguard_peer *peer, void(*callback)(struct sk_buff_head *, struct wireguard_peer *)) +int packet_create_data(struct sk_buff_head *queue, struct wireguard_peer *peer, packet_create_data_callback_t callback) { int ret = -ENOKEY; struct noise_keypair *keypair; @@ -409,7 +409,7 @@ static inline int start_decryption(struct padata_instance *padata, struct padata } #endif -void packet_consume_data(struct sk_buff *skb, size_t offset, struct wireguard_device *wg, void(*callback)(struct sk_buff *skb, struct wireguard_peer *, struct endpoint *, bool used_new_key, int err)) +void packet_consume_data(struct sk_buff *skb, size_t offset, struct wireguard_device *wg, packet_consume_data_callback_t callback) { int ret; struct endpoint endpoint; |