summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-03 06:30:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-03 06:41:39 +0200
commit323636085e1a6c063818a697b30e074578db258e (patch)
tree6b77529769ae29e1deb5523edd3bddc7f03583e5
parent452dc76c606d47dc248f846f1202d708a7245f5e (diff)
global: use _WG prefix for include guards
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/compat/compat.h6
-rw-r--r--src/compat/dst_cache/include/net/dst_cache.h6
-rw-r--r--src/compat/siphash/include/linux/siphash.h6
-rw-r--r--src/compat/udp_tunnel/include/net/udp_tunnel.h6
-rw-r--r--src/cookie.h6
-rw-r--r--src/crypto/blake2s.h6
-rw-r--r--src/crypto/chacha20poly1305.h6
-rw-r--r--src/crypto/curve25519.h6
-rw-r--r--src/device.h6
-rw-r--r--src/hashtables.h6
-rw-r--r--src/messages.h6
-rw-r--r--src/netlink.h6
-rw-r--r--src/noise.h6
-rw-r--r--src/peer.h6
-rw-r--r--src/queueing.h6
-rw-r--r--src/ratelimiter.h6
-rw-r--r--src/routingtable.h6
-rw-r--r--src/socket.h6
-rw-r--r--src/timers.h6
-rw-r--r--src/uapi/wireguard.h6
20 files changed, 60 insertions, 60 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index dcbb080..d37533b 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef COMPAT_H
-#define COMPAT_H
+#ifndef _WG_COMPAT_H
+#define _WG_COMPAT_H
#include <linux/kconfig.h>
#include <linux/version.h>
@@ -477,4 +477,4 @@ static inline void new_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32
#define __read_mostly
#endif
-#endif
+#endif /* _WG_COMPAT_H */
diff --git a/src/compat/dst_cache/include/net/dst_cache.h b/src/compat/dst_cache/include/net/dst_cache.h
index 151acca..5a083c7 100644
--- a/src/compat/dst_cache/include/net/dst_cache.h
+++ b/src/compat/dst_cache/include/net/dst_cache.h
@@ -1,5 +1,5 @@
-#ifndef _NET_DST_CACHE_H
-#define _NET_DST_CACHE_H
+#ifndef _WG_NET_DST_CACHE_H
+#define _WG_NET_DST_CACHE_H
#include <linux/jiffies.h>
#include <net/dst.h>
@@ -94,4 +94,4 @@ int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp);
*/
void dst_cache_destroy(struct dst_cache *dst_cache);
-#endif
+#endif /* _WG_NET_DST_CACHE_H */
diff --git a/src/compat/siphash/include/linux/siphash.h b/src/compat/siphash/include/linux/siphash.h
index fa7a6b9..43aeaa0 100644
--- a/src/compat/siphash/include/linux/siphash.h
+++ b/src/compat/siphash/include/linux/siphash.h
@@ -10,8 +10,8 @@
* hashtables.
*/
-#ifndef _LINUX_SIPHASH_H
-#define _LINUX_SIPHASH_H
+#ifndef _WG_LINUX_SIPHASH_H
+#define _WG_LINUX_SIPHASH_H
#include <linux/types.h>
#include <linux/kernel.h>
@@ -137,4 +137,4 @@ static inline u32 hsiphash(const void *data, size_t len,
return ___hsiphash_aligned(data, len, key);
}
-#endif /* _LINUX_SIPHASH_H */
+#endif /* _WG_LINUX_SIPHASH_H */
diff --git a/src/compat/udp_tunnel/include/net/udp_tunnel.h b/src/compat/udp_tunnel/include/net/udp_tunnel.h
index b80f1f5..8999527 100644
--- a/src/compat/udp_tunnel/include/net/udp_tunnel.h
+++ b/src/compat/udp_tunnel/include/net/udp_tunnel.h
@@ -1,5 +1,5 @@
-#ifndef __NET_UDP_TUNNEL_H
-#define __NET_UDP_TUNNEL_H
+#ifndef _WG_NET_UDP_TUNNEL_H
+#define _WG_NET_UDP_TUNNEL_H
#include <net/ip_tunnels.h>
#include <net/udp.h>
@@ -91,4 +91,4 @@ int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
void udp_tunnel_sock_release(struct socket *sock);
-#endif
+#endif /* _WG_NET_UDP_TUNNEL_H */
diff --git a/src/cookie.h b/src/cookie.h
index 54d0d99..f0e5594 100644
--- a/src/cookie.h
+++ b/src/cookie.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef WGCOOKIE_H
-#define WGCOOKIE_H
+#ifndef _WG_COOKIE_H
+#define _WG_COOKIE_H
#include "messages.h"
#include <linux/rwsem.h>
@@ -48,4 +48,4 @@ void cookie_add_mac_to_packet(void *message, size_t len, struct wireguard_peer *
void cookie_message_create(struct message_handshake_cookie *src, struct sk_buff *skb, __le32 index, struct cookie_checker *checker);
void cookie_message_consume(struct message_handshake_cookie *src, struct wireguard_device *wg);
-#endif
+#endif /* _WG_COOKIE_H */
diff --git a/src/crypto/blake2s.h b/src/crypto/blake2s.h
index e8d2908..0b1d680 100644
--- a/src/crypto/blake2s.h
+++ b/src/crypto/blake2s.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef BLAKE2S_H
-#define BLAKE2S_H
+#ifndef _WG_BLAKE2S_H
+#define _WG_BLAKE2S_H
#include <linux/types.h>
@@ -35,4 +35,4 @@ void blake2s_fpu_init(void);
bool blake2s_selftest(void);
#endif
-#endif
+#endif /* _WG_BLAKE2S_H */
diff --git a/src/crypto/chacha20poly1305.h b/src/crypto/chacha20poly1305.h
index 89701e4..c8885e0 100644
--- a/src/crypto/chacha20poly1305.h
+++ b/src/crypto/chacha20poly1305.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef CHACHA20POLY1305_H
-#define CHACHA20POLY1305_H
+#ifndef _WG_CHACHA20POLY1305_H
+#define _WG_CHACHA20POLY1305_H
#include <linux/types.h>
@@ -85,4 +85,4 @@ static inline void chacha20poly1305_deinit_simd(bool was_on)
bool chacha20poly1305_selftest(void);
#endif
-#endif
+#endif /* _WG_CHACHA20POLY1305_H */
diff --git a/src/crypto/curve25519.h b/src/crypto/curve25519.h
index 16be496..800cefa 100644
--- a/src/crypto/curve25519.h
+++ b/src/crypto/curve25519.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef CURVE25519_H
-#define CURVE25519_H
+#ifndef _WG_CURVE25519_H
+#define _WG_CURVE25519_H
#include <linux/types.h>
@@ -19,4 +19,4 @@ void curve25519_fpu_init(void);
bool curve25519_selftest(void);
#endif
-#endif
+#endif /* _WG_CURVE25519_H */
diff --git a/src/device.h b/src/device.h
index 4d77d58..538a14e 100644
--- a/src/device.h
+++ b/src/device.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef WGDEVICE_H
-#define WGDEVICE_H
+#ifndef _WG_DEVICE_H
+#define _WG_DEVICE_H
#include "noise.h"
#include "routingtable.h"
@@ -58,4 +58,4 @@ struct wireguard_device {
int device_init(void);
void device_uninit(void);
-#endif
+#endif /* _WG_DEVICE_H */
diff --git a/src/hashtables.h b/src/hashtables.h
index e12bfd6..55f608a 100644
--- a/src/hashtables.h
+++ b/src/hashtables.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef HASHTABLES_H
-#define HASHTABLES_H
+#ifndef _WG_HASHTABLES_H
+#define _WG_HASHTABLES_H
#include "messages.h"
@@ -46,4 +46,4 @@ bool index_hashtable_replace(struct index_hashtable *table, struct index_hashtab
void 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);
-#endif
+#endif /* _WG_HASHTABLES_H */
diff --git a/src/messages.h b/src/messages.h
index 19488a6..0937942 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -4,8 +4,8 @@
* See doc/protocol.md for more info
*/
-#ifndef MESSAGES_H
-#define MESSAGES_H
+#ifndef _WG_MESSAGES_H
+#define _WG_MESSAGES_H
#include "crypto/curve25519.h"
#include "crypto/chacha20poly1305.h"
@@ -125,4 +125,4 @@ enum {
HANDSHAKE_DSCP = 0b10001000 /* AF41, plus 00 ECN */
};
-#endif
+#endif /* _WG_MESSAGES_H */
diff --git a/src/netlink.h b/src/netlink.h
index debf42c..9fe2c78 100644
--- a/src/netlink.h
+++ b/src/netlink.h
@@ -1,9 +1,9 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef NETLINK_H
-#define NETLINK_H
+#ifndef _WG_NETLINK_H
+#define _WG_NETLINK_H
int netlink_init(void);
void netlink_uninit(void);
-#endif
+#endif /* _WG_NETLINK_H */
diff --git a/src/noise.h b/src/noise.h
index f6c68ea..f696c57 100644
--- a/src/noise.h
+++ b/src/noise.h
@@ -4,8 +4,8 @@
* See doc/protocol.md and https://github.com/trevp/noise/blob/master/noise.md for more info
*/
-#ifndef NOISE_H
-#define NOISE_H
+#ifndef _WG_NOISE_H
+#define _WG_NOISE_H
#include "messages.h"
#include "hashtables.h"
@@ -119,4 +119,4 @@ struct wireguard_peer *noise_handshake_consume_response(struct message_handshake
bool noise_handshake_begin_session(struct noise_handshake *handshake, struct noise_keypairs *keypairs);
-#endif
+#endif /* _WG_NOISE_H */
diff --git a/src/peer.h b/src/peer.h
index 14a8037..466b7f7 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef PEER_H
-#define PEER_H
+#ifndef _WG_PEER_H
+#define _WG_PEER_H
#include "device.h"
#include "noise.h"
@@ -97,4 +97,4 @@ unsigned int peer_total_count(struct wireguard_device *wg);
if (1) { goto pfe_label(6); pfe_label(7):; } else while (1) if (1) goto pfe_label(3); else while (1) if (1) goto pfe_label(7); else pfe_label(6): \
if (1) { goto pfe_label(8); pfe_label(9): peer_put(__peer); break; pfe_label(10): peer_put(__peer); } else while (1) if (1) goto pfe_label(9); else while (1) if (1) goto pfe_label(10); else pfe_label(8):
-#endif
+#endif /* _WG_PEER_H */
diff --git a/src/queueing.h b/src/queueing.h
index b5c732e..be3d15d 100644
--- a/src/queueing.h
+++ b/src/queueing.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef QUEUEING_H
-#define QUEUEING_H
+#ifndef _WG_QUEUEING_H
+#define _WG_QUEUEING_H
#include "peer.h"
#include <linux/types.h>
@@ -182,4 +182,4 @@ static inline bool queue_enqueue_per_device_and_peer(struct crypt_queue *device_
bool packet_counter_selftest(void);
#endif
-#endif
+#endif /* _WG_QUEUEING_H */
diff --git a/src/ratelimiter.h b/src/ratelimiter.h
index cb0cdbf..d2fcb64 100644
--- a/src/ratelimiter.h
+++ b/src/ratelimiter.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef RATELIMITER_H
-#define RATELIMITER_H
+#ifndef _WG_RATELIMITER_H
+#define _WG_RATELIMITER_H
#include <linux/skbuff.h>
@@ -13,4 +13,4 @@ bool ratelimiter_allow(struct sk_buff *skb, struct net *net);
bool ratelimiter_selftest(void);
#endif
-#endif
+#endif /* _WG_RATELIMITER_H */
diff --git a/src/routingtable.h b/src/routingtable.h
index 4fdf410..c251354 100644
--- a/src/routingtable.h
+++ b/src/routingtable.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef ROUTINGTABLE_H
-#define ROUTINGTABLE_H
+#ifndef _WG_ROUTINGTABLE_H
+#define _WG_ROUTINGTABLE_H
#include <linux/mutex.h>
#include <linux/ip.h>
@@ -33,4 +33,4 @@ struct wireguard_peer *routing_table_lookup_src(struct routing_table *table, str
bool routing_table_selftest(void);
#endif
-#endif
+#endif /* _WG_ROUTINGTABLE_H */
diff --git a/src/socket.h b/src/socket.h
index 4d9e5f5..08e98fe 100644
--- a/src/socket.h
+++ b/src/socket.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef WGSOCKET_H
-#define WGSOCKET_H
+#ifndef _WG_SOCKET_H
+#define _WG_SOCKET_H
#include <linux/netdevice.h>
#include <linux/udp.h>
@@ -31,4 +31,4 @@ void socket_clear_peer_endpoint_src(struct wireguard_peer *peer);
#define net_dbg_skb_ratelimited(fmt, skb, ...)
#endif
-#endif
+#endif /* _WG_SOCKET_H */
diff --git a/src/timers.h b/src/timers.h
index f9b2144..105193e 100644
--- a/src/timers.h
+++ b/src/timers.h
@@ -1,7 +1,7 @@
/* Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */
-#ifndef WGTIMERS_H
-#define WGTIMERS_H
+#ifndef _WG_TIMERS_H
+#define _WG_TIMERS_H
struct wireguard_peer;
@@ -15,4 +15,4 @@ void timers_handshake_complete(struct wireguard_peer *peer);
void timers_session_derived(struct wireguard_peer *peer);
void timers_any_authenticated_packet_traversal(struct wireguard_peer *peer);
-#endif
+#endif /* _WG_TIMERS_H */
diff --git a/src/uapi/wireguard.h b/src/uapi/wireguard.h
index 5274c44..e776f7c 100644
--- a/src/uapi/wireguard.h
+++ b/src/uapi/wireguard.h
@@ -136,8 +136,8 @@
* If an error occurs, NLMSG_ERROR will reply containing an errno.
*/
-#ifndef UAPI_WIREGUARD_H
-#define UAPI_WIREGUARD_H
+#ifndef _WG_UAPI_WIREGUARD_H
+#define _WG_UAPI_WIREGUARD_H
#define WG_GENL_NAME "wireguard"
#define WG_GENL_VERSION 1
@@ -196,4 +196,4 @@ enum wgallowedip_attribute {
};
#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
-#endif
+#endif /* _WG_UAPI_WIREGUARD_H */