aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/packets.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-04-03 21:40:45 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-04-04 03:44:35 +0200
commitfd6d19bb46a666868abd6aeff4fc43dd067489b5 (patch)
treef4dc3a91443258e81a0cc4d402bce8451481f26a /src/packets.h
parentchacha20poly1305: check return values of sgops (diff)
downloadwireguard-monolithic-historical-fd6d19bb46a666868abd6aeff4fc43dd067489b5.tar.xz
wireguard-monolithic-historical-fd6d19bb46a666868abd6aeff4fc43dd067489b5.zip
data: simplify flow
Diffstat (limited to 'src/packets.h')
-rw-r--r--src/packets.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/packets.h b/src/packets.h
index a640847..be9cfd7 100644
--- a/src/packets.h
+++ b/src/packets.h
@@ -23,6 +23,7 @@ struct packet_cb {
/* receive.c */
void packet_receive(struct wireguard_device *wg, struct sk_buff *skb);
void packet_process_queued_handshake_packets(struct work_struct *work);
+void packet_consume_data_done(struct sk_buff *skb, struct wireguard_peer *peer, struct endpoint *endpoint, bool used_new_key);
/* send.c */
void packet_send_queue(struct wireguard_peer *peer);
@@ -31,12 +32,12 @@ void packet_queue_handshake_initiation(struct wireguard_peer *peer);
void packet_send_queued_handshakes(struct work_struct *work);
void packet_send_handshake_response(struct wireguard_peer *peer);
void packet_send_handshake_cookie(struct wireguard_device *wg, struct sk_buff *initiating_skb, __le32 sender_index);
+void packet_create_data_done(struct sk_buff_head *queue, struct wireguard_peer *peer);
+
/* data.c */
-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, struct wireguard_device *wg, packet_consume_data_callback_t callback);
+int packet_create_data(struct sk_buff_head *queue, struct wireguard_peer *peer);
+void packet_consume_data(struct sk_buff *skb, struct wireguard_device *wg);
#ifdef CONFIG_WIREGUARD_PARALLEL
int packet_init_data_caches(void);