diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-28 03:05:22 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-02 03:41:49 +0200 |
commit | a8af31524ad8fb036b03a67823d8372e509b41d9 (patch) | |
tree | c89c0b1bf07deda487ac37717969743777236771 /src/hashtables.h | |
parent | 09e85633a7c689f8e605f5ae544b83b7940a1437 (diff) |
global: prefix all functions with wg_
I understand why this must be done, though I'm not so happy about having
to do it. In some places, it puts us over 80 chars and we have to break
lines up in further ugly ways. And in general, I think this makes things
harder to read. Yet another thing we must do to please upstream.
Maybe this can be replaced in the future by some kind of automatic
module namespacing logic in the linker, or even combined with LTO and
aggressive symbol stripping.
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/hashtables.h')
-rw-r--r-- | src/hashtables.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/hashtables.h b/src/hashtables.h index 263a2a5..8b855d7 100644 --- a/src/hashtables.h +++ b/src/hashtables.h @@ -21,14 +21,14 @@ struct pubkey_hashtable { struct mutex lock; }; -void pubkey_hashtable_init(struct pubkey_hashtable *table); -void pubkey_hashtable_add(struct pubkey_hashtable *table, - struct wireguard_peer *peer); -void pubkey_hashtable_remove(struct pubkey_hashtable *table, +void wg_pubkey_hashtable_init(struct pubkey_hashtable *table); +void wg_pubkey_hashtable_add(struct pubkey_hashtable *table, struct wireguard_peer *peer); +void wg_pubkey_hashtable_remove(struct pubkey_hashtable *table, + struct wireguard_peer *peer); struct wireguard_peer * -pubkey_hashtable_lookup(struct pubkey_hashtable *table, - const u8 pubkey[NOISE_PUBLIC_KEY_LEN]); +wg_pubkey_hashtable_lookup(struct pubkey_hashtable *table, + const u8 pubkey[NOISE_PUBLIC_KEY_LEN]); struct index_hashtable { /* TODO: move to rhashtable */ @@ -47,17 +47,18 @@ struct index_hashtable_entry { enum index_hashtable_type type; __le32 index; }; -void index_hashtable_init(struct index_hashtable *table); -__le32 index_hashtable_insert(struct index_hashtable *table, - struct index_hashtable_entry *entry); -bool index_hashtable_replace(struct index_hashtable *table, - struct index_hashtable_entry *old, - struct index_hashtable_entry *new); -void index_hashtable_remove(struct index_hashtable *table, - struct index_hashtable_entry *entry); + +void wg_index_hashtable_init(struct index_hashtable *table); +__le32 wg_index_hashtable_insert(struct index_hashtable *table, + struct index_hashtable_entry *entry); +bool wg_index_hashtable_replace(struct index_hashtable *table, + struct index_hashtable_entry *old, + struct index_hashtable_entry *new); +void wg_index_hashtable_remove(struct index_hashtable *table, + struct index_hashtable_entry *entry); struct index_hashtable_entry * -index_hashtable_lookup(struct index_hashtable *table, - const enum index_hashtable_type type_mask, - const __le32 index, struct wireguard_peer **peer); +wg_index_hashtable_lookup(struct index_hashtable *table, + const enum index_hashtable_type type_mask, + const __le32 index, struct wireguard_peer **peer); #endif /* _WG_HASHTABLES_H */ |