aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/hashtables.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 03:36:20 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 03:38:12 +0200
commit06b12364716b4f7b8f561877b90dc43619f30874 (patch)
tree8f5f5e066d82993134bf47490c6f820a67164410 /src/hashtables.c
parentnetlink: do not stuff index into nla type (diff)
downloadwireguard-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 '')
-rw-r--r--src/hashtables.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hashtables.c b/src/hashtables.c
index 6e5518b..86b15a0 100644
--- a/src/hashtables.c
+++ b/src/hashtables.c
@@ -27,7 +27,7 @@ void wg_pubkey_hashtable_init(struct pubkey_hashtable *table)
}
void wg_pubkey_hashtable_add(struct pubkey_hashtable *table,
- struct wireguard_peer *peer)
+ struct wg_peer *peer)
{
mutex_lock(&table->lock);
hlist_add_head_rcu(&peer->pubkey_hash,
@@ -36,7 +36,7 @@ void wg_pubkey_hashtable_add(struct pubkey_hashtable *table,
}
void wg_pubkey_hashtable_remove(struct pubkey_hashtable *table,
- struct wireguard_peer *peer)
+ struct wg_peer *peer)
{
mutex_lock(&table->lock);
hlist_del_init_rcu(&peer->pubkey_hash);
@@ -44,11 +44,11 @@ void wg_pubkey_hashtable_remove(struct pubkey_hashtable *table,
}
/* Returns a strong reference to a peer */
-struct wireguard_peer *
+struct wg_peer *
wg_pubkey_hashtable_lookup(struct pubkey_hashtable *table,
const u8 pubkey[NOISE_PUBLIC_KEY_LEN])
{
- struct wireguard_peer *iter_peer, *peer = NULL;
+ struct wg_peer *iter_peer, *peer = NULL;
rcu_read_lock_bh();
hlist_for_each_entry_rcu_bh (iter_peer, pubkey_bucket(table, pubkey),
@@ -184,7 +184,7 @@ void wg_index_hashtable_remove(struct index_hashtable *table,
struct index_hashtable_entry *
wg_index_hashtable_lookup(struct index_hashtable *table,
const enum index_hashtable_type type_mask,
- const __le32 index, struct wireguard_peer **peer)
+ const __le32 index, struct wg_peer **peer)
{
struct index_hashtable_entry *iter_entry, *entry = NULL;