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 | 45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0 (patch) | |
tree | 9409e8289e08211e35e8cdeef0e509e1e254acc0 /src/peer.h | |
parent | poly1305-mips64: use compiler-defined macros in assembly (diff) | |
download | wireguard-monolithic-historical-45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0.tar.xz wireguard-monolithic-historical-45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0.zip |
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>
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -66,22 +66,22 @@ struct wireguard_peer { }; struct wireguard_peer * -peer_create(struct wireguard_device *wg, - const u8 public_key[NOISE_PUBLIC_KEY_LEN], - const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]); +wg_peer_create(struct wireguard_device *wg, + const u8 public_key[NOISE_PUBLIC_KEY_LEN], + const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]); struct wireguard_peer *__must_check -peer_get_maybe_zero(struct wireguard_peer *peer); -static inline struct wireguard_peer *peer_get(struct wireguard_peer *peer) +wg_peer_get_maybe_zero(struct wireguard_peer *peer); +static inline struct wireguard_peer *wg_peer_get(struct wireguard_peer *peer) { kref_get(&peer->refcount); return peer; } -void peer_put(struct wireguard_peer *peer); -void peer_remove(struct wireguard_peer *peer); -void peer_remove_all(struct wireguard_device *wg); +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 *peer_lookup_by_index(struct wireguard_device *wg, - u32 index); +struct wireguard_peer *wg_peer_lookup_by_index(struct wireguard_device *wg, + u32 index); #endif /* _WG_PEER_H */ |