aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-09-29 04:36:14 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-09-29 19:25:30 +0200
commita18ceb81ca78a7f37adc436f35e6eeb8683bb984 (patch)
treee47051e5acf65c5d2cf8c3fa494abb6742d0bb24 /src/device.h
parentpoly1305: optimize unaligned access (diff)
downloadwireguard-monolithic-historical-a18ceb81ca78a7f37adc436f35e6eeb8683bb984.tar.xz
wireguard-monolithic-historical-a18ceb81ca78a7f37adc436f35e6eeb8683bb984.zip
Rework headers and includes
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/device.h b/src/device.h
index a3f00da..bcaa90f 100644
--- a/src/device.h
+++ b/src/device.h
@@ -3,6 +3,37 @@
#ifndef WGDEVICE_H
#define WGDEVICE_H
+#include "noise.h"
+#include "routingtable.h"
+#include "hashtables.h"
+#include "cookie.h"
+
+#include <linux/types.h>
+#include <linux/netdevice.h>
+#include <linux/workqueue.h>
+#include <linux/mutex.h>
+#include <linux/net.h>
+#include <linux/padata.h>
+
+struct wireguard_device {
+ struct sock __rcu *sock4, *sock6;
+ u16 incoming_port;
+ struct net *creating_net;
+ struct workqueue_struct *workqueue;
+ struct workqueue_struct *parallelqueue;
+ struct padata_instance *parallel_send, *parallel_receive;
+ struct noise_static_identity static_identity;
+ struct sk_buff_head incoming_handshakes;
+ struct work_struct incoming_handshakes_work;
+ struct cookie_checker cookie_checker;
+ struct pubkey_hashtable peer_hashtable;
+ struct index_hashtable index_hashtable;
+ struct routing_table peer_routing_table;
+ struct list_head peer_list;
+ struct mutex device_update_lock;
+ struct mutex socket_update_lock;
+};
+
int device_init(void);
void device_uninit(void);