diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-08 03:36:20 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-08 03:38:12 +0200 |
commit | 06b12364716b4f7b8f561877b90dc43619f30874 (patch) | |
tree | 8f5f5e066d82993134bf47490c6f820a67164410 /src/peer.h | |
parent | netlink: do not stuff index into nla type (diff) | |
download | wireguard-monolithic-historical-06b12364716b4f7b8f561877b90dc43619f30874.tar.xz wireguard-monolithic-historical-06b12364716b4f7b8f561877b90dc43619f30874.zip |
global: rename struct wireguard_ to struct wg_
This required a bit of pruning of our christmas trees.
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 27 |
1 files changed, 11 insertions, 16 deletions
@@ -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 */ |