summaryrefslogtreecommitdiffstatshomepage
path: root/src/packets.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-03-15 19:20:58 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-03-20 01:02:06 +0100
commite16ba338168e00b0c2702ec5529280301c514d67 (patch)
tree8e92e5f428f263cee69f42a922047c234984f03a /src/packets.h
parentcurve25519: add AVX implementation (diff)
downloadwireguard-monolithic-historical-e16ba338168e00b0c2702ec5529280301c514d67.tar.xz
wireguard-monolithic-historical-e16ba338168e00b0c2702ec5529280301c514d67.zip
data: big refactoring
Diffstat (limited to 'src/packets.h')
-rw-r--r--src/packets.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/packets.h b/src/packets.h
index 6530048..a640847 100644
--- a/src/packets.h
+++ b/src/packets.h
@@ -14,6 +14,12 @@ struct wireguard_device;
struct wireguard_peer;
struct sk_buff;
+struct packet_cb {
+ u64 nonce;
+ u8 ds;
+};
+#define PACKET_CB(skb) ((struct packet_cb *)skb->cb)
+
/* receive.c */
void packet_receive(struct wireguard_device *wg, struct sk_buff *skb);
void packet_process_queued_handshake_packets(struct work_struct *work);
@@ -24,13 +30,13 @@ void packet_send_keepalive(struct wireguard_peer *peer);
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, void *data, size_t data_len, __le32 sender_index);
+void packet_send_handshake_cookie(struct wireguard_device *wg, struct sk_buff *initiating_skb, __le32 sender_index);
/* 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, size_t offset, struct wireguard_device *wg, packet_consume_data_callback_t callback);
+void packet_consume_data(struct sk_buff *skb, struct wireguard_device *wg, packet_consume_data_callback_t callback);
#ifdef CONFIG_WIREGUARD_PARALLEL
int packet_init_data_caches(void);