aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/packets.h
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
commite630cfc7ab5e19006f05e5f7c2a170dbacb0fb40 (patch)
treef19d6b05bc54a892e8c41cc0aa09577a6f5c644c /src/packets.h
parentconfig: cleanups (diff)
downloadwireguard-monolithic-historical-e630cfc7ab5e19006f05e5f7c2a170dbacb0fb40.tar.xz
wireguard-monolithic-historical-e630cfc7ab5e19006f05e5f7c2a170dbacb0fb40.zip
types: enforce consistency
Diffstat (limited to '')
-rw-r--r--src/packets.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/packets.h b/src/packets.h
index e36c12c..4d07adc 100644
--- a/src/packets.h
+++ b/src/packets.h
@@ -27,8 +27,10 @@ void packet_send_handshake_response(struct wireguard_peer *peer);
void packet_send_handshake_cookie(struct wireguard_device *wg, struct sk_buff *initiating_skb, void *data, size_t data_len, __le32 sender_index);
/* data.c */
-int packet_create_data(struct sk_buff_head *queue, struct wireguard_peer *peer, void(*callback)(struct sk_buff_head *, struct wireguard_peer *));
-void packet_consume_data(struct sk_buff *skb, size_t offset, struct wireguard_device *wg, void(*callback)(struct sk_buff *, struct wireguard_peer *, struct endpoint *, bool, int));
+typedef void (*packet_create_data_callback_t)(struct sk_buff_head *, struct wireguard_peer *);
+typedef void (*packet_consume_data_callback_t)(struct sk_buff *skb, struct wireguard_peer *, struct endpoint *, bool used_new_key, int err);
+int packet_create_data(struct sk_buff_head *queue, struct wireguard_peer *peer, packet_create_data_callback_t callback);
+void packet_consume_data(struct sk_buff *skb, size_t offset, struct wireguard_device *wg, packet_consume_data_callback_t callback);
#ifdef CONFIG_WIREGUARD_PARALLEL
int packet_init_data_caches(void);