aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/peer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/peer.h b/src/peer.h
index 2811b61..10de4b6 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -16,7 +16,7 @@
#include <linux/kref.h>
#include <net/dst_cache.h>
-struct wireguard_device;
+struct wg_device;
struct endpoint {
union {
@@ -34,8 +34,8 @@ struct endpoint {
};
};
-struct wireguard_peer {
- struct wireguard_device *device;
+struct wg_peer {
+ struct wg_device *device;
struct crypt_queue tx_queue, rx_queue;
struct sk_buff_head staged_packet_queue;
int serial_work_cpu;
@@ -65,23 +65,18 @@ struct wireguard_peer {
bool is_dead;
};
-struct wireguard_peer *
-wg_peer_create(struct wireguard_device *wg,
- const u8 public_key[NOISE_PUBLIC_KEY_LEN],
- const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]);
+struct wg_peer *wg_peer_create(struct wg_device *wg,
+ const u8 public_key[NOISE_PUBLIC_KEY_LEN],
+ const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]);
-struct wireguard_peer *__must_check
-wg_peer_get_maybe_zero(struct wireguard_peer *peer);
-static inline struct wireguard_peer *wg_peer_get(struct wireguard_peer *peer)
+struct wg_peer *__must_check wg_peer_get_maybe_zero(struct wg_peer *peer);
+static inline struct wg_peer *wg_peer_get(struct wg_peer *peer)
{
kref_get(&peer->refcount);
return peer;
}
-void wg_peer_put(struct wireguard_peer *peer);
-void wg_peer_remove(struct wireguard_peer *peer);
-void wg_peer_remove_all(struct wireguard_device *wg);
-
-struct wireguard_peer *wg_peer_lookup_by_index(struct wireguard_device *wg,
- u32 index);
+void wg_peer_put(struct wg_peer *peer);
+void wg_peer_remove(struct wg_peer *peer);
+void wg_peer_remove_all(struct wg_device *wg);
#endif /* _WG_PEER_H */