summaryrefslogtreecommitdiffhomepage
path: root/src/data.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-12-13 03:32:00 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-12-16 06:35:58 +0100
commit746e4b86eba7cd89d23a3e89b8979b795b9a4a65 (patch)
treeed0feb3589f1f301df795f864550f3adfb7ceba8 /src/data.c
parentb40dc5be9739c362329ab5741886447b9a1fdf44 (diff)
types: enforce consistency
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c
index ae2515b..ff9fd66 100644
--- a/src/data.c
+++ b/src/data.c
@@ -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;