aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/socket.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-28 03:05:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commit45a53bbaafbca0af90f0fb097b1ff6c151b5d8f0 (patch)
tree9409e8289e08211e35e8cdeef0e509e1e254acc0 /src/socket.h
parentpoly1305-mips64: use compiler-defined macros in assembly (diff)
downloadwireguard-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/socket.h')
-rw-r--r--src/socket.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/socket.h b/src/socket.h
index 4978499..ee5eb15 100644
--- a/src/socket.h
+++ b/src/socket.h
@@ -11,29 +11,29 @@
#include <linux/if_vlan.h>
#include <linux/if_ether.h>
-int socket_init(struct wireguard_device *wg, u16 port);
-void socket_reinit(struct wireguard_device *wg, struct sock *new4,
- struct sock *new6);
-int socket_send_buffer_to_peer(struct wireguard_peer *peer, void *data,
- size_t len, u8 ds);
-int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb,
- u8 ds);
-int socket_send_buffer_as_reply_to_skb(struct wireguard_device *wg,
- struct sk_buff *in_skb, void *out_buffer,
- size_t len);
+int wg_socket_init(struct wireguard_device *wg, u16 port);
+void wg_socket_reinit(struct wireguard_device *wg, struct sock *new4,
+ struct sock *new6);
+int wg_socket_send_buffer_to_peer(struct wireguard_peer *peer, void *data,
+ size_t len, u8 ds);
+int wg_socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb,
+ u8 ds);
+int wg_socket_send_buffer_as_reply_to_skb(struct wireguard_device *wg,
+ struct sk_buff *in_skb,
+ void *out_buffer, size_t len);
-int socket_endpoint_from_skb(struct endpoint *endpoint,
- const struct sk_buff *skb);
-void socket_set_peer_endpoint(struct wireguard_peer *peer,
- const struct endpoint *endpoint);
-void socket_set_peer_endpoint_from_skb(struct wireguard_peer *peer,
- const struct sk_buff *skb);
-void socket_clear_peer_endpoint_src(struct wireguard_peer *peer);
+int wg_socket_endpoint_from_skb(struct endpoint *endpoint,
+ const struct sk_buff *skb);
+void wg_socket_set_peer_endpoint(struct wireguard_peer *peer,
+ const struct endpoint *endpoint);
+void wg_socket_set_peer_endpoint_from_skb(struct wireguard_peer *peer,
+ const struct sk_buff *skb);
+void wg_socket_clear_peer_endpoint_src(struct wireguard_peer *peer);
#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
#define net_dbg_skb_ratelimited(fmt, dev, skb, ...) do { \
struct endpoint __endpoint; \
- socket_endpoint_from_skb(&__endpoint, skb); \
+ wg_socket_endpoint_from_skb(&__endpoint, skb); \
net_dbg_ratelimited(fmt, dev, &__endpoint.addr, \
##__VA_ARGS__); \
} while (0)