aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/peer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/peer.h b/src/peer.h
index 29d2e00..5613ccc 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -27,7 +27,8 @@ struct endpoint {
union {
struct {
struct in_addr src4;
- int src_if4; /* Essentially the same as addr6->scope_id */
+ /* Essentially the same as addr6->scope_id */
+ int src_if4;
};
struct in6_addr src6;
};
@@ -48,10 +49,13 @@ struct wireguard_peer {
struct cookie latest_cookie;
struct hlist_node pubkey_hash;
u64 rx_bytes, tx_bytes;
- struct timer_list timer_retransmit_handshake, timer_send_keepalive, timer_new_handshake, timer_zero_key_material, timer_persistent_keepalive;
+ struct timer_list timer_retransmit_handshake, timer_send_keepalive;
+ struct timer_list timer_new_handshake, timer_zero_key_material;
+ struct timer_list timer_persistent_keepalive;
unsigned int timer_handshake_attempts;
u16 persistent_keepalive_interval;
- bool timers_enabled, timer_need_another_keepalive, sent_lastminute_handshake;
+ bool timers_enabled, timer_need_another_keepalive;
+ bool sent_lastminute_handshake;
struct timespec walltime_last_handshake;
struct kref refcount;
struct rcu_head rcu;
@@ -61,9 +65,13 @@ struct wireguard_peer {
bool is_dead;
};
-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]);
+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]);
-struct wireguard_peer * __must_check peer_get_maybe_zero(struct wireguard_peer *peer);
+struct wireguard_peer *__must_check
+peer_get_maybe_zero(struct wireguard_peer *peer);
static inline struct wireguard_peer *peer_get(struct wireguard_peer *peer)
{
kref_get(&peer->refcount);
@@ -73,6 +81,7 @@ void peer_put(struct wireguard_peer *peer);
void peer_remove(struct wireguard_peer *peer);
void peer_remove_all(struct wireguard_device *wg);
-struct wireguard_peer *peer_lookup_by_index(struct wireguard_device *wg, u32 index);
+struct wireguard_peer *peer_lookup_by_index(struct wireguard_device *wg,
+ u32 index);
#endif /* _WG_PEER_H */