aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-07 19:19:25 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 03:14:52 +0200
commit8d5365719ac128eb64a3252d7ca4b910991a642a (patch)
treeb6a14e9fb82b3409763df1ae73c332628852f072 /src/send.c
parentcompat: don't output for grep errors (diff)
downloadwireguard-monolithic-historical-8d5365719ac128eb64a3252d7ca4b910991a642a.tar.xz
wireguard-monolithic-historical-8d5365719ac128eb64a3252d7ca4b910991a642a.zip
global: prefix functions used in callbacks with wg_
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/send.c b/src/send.c
index 707efbe..e099282 100644
--- a/src/send.c
+++ b/src/send.c
@@ -19,7 +19,7 @@
#include <net/udp.h>
#include <net/sock.h>
-static void packet_send_handshake_initiation(struct wireguard_peer *peer)
+static void wg_packet_send_handshake_initiation(struct wireguard_peer *peer)
{
struct message_handshake_initiation packet;
@@ -49,7 +49,7 @@ void wg_packet_handshake_send_worker(struct work_struct *work)
struct wireguard_peer *peer = container_of(work, struct wireguard_peer,
transmit_handshake_work);
- packet_send_handshake_initiation(peer);
+ wg_packet_send_handshake_initiation(peer);
wg_peer_put(peer);
}
@@ -141,7 +141,7 @@ static void keep_key_fresh(struct wireguard_peer *peer)
wg_packet_send_queued_handshake_initiation(peer, false);
}
-static unsigned int skb_padding(struct sk_buff *skb)
+static unsigned int calculate_skb_padding(struct sk_buff *skb)
{
/* We do this modulo business with the MTU, just in case the networking
* layer gives us a packet that's bigger than the MTU. In that case, we
@@ -157,7 +157,7 @@ static unsigned int skb_padding(struct sk_buff *skb)
}
static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair,
- simd_context_t *simd_context)
+ simd_context_t *simd_context)
{
unsigned int padding_len, plaintext_len, trailer_len;
struct scatterlist sg[MAX_SKB_FRAGS + 8];
@@ -166,7 +166,7 @@ static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair,
int num_frags;
/* Calculate lengths. */
- padding_len = skb_padding(skb);
+ padding_len = calculate_skb_padding(skb);
trailer_len = padding_len + noise_encrypted_len(0);
plaintext_len = skb->len + padding_len;
@@ -244,8 +244,8 @@ static void skb_free_null_queue(struct sk_buff *first)
dev_kfree_skb(skb);
}
-static void packet_create_data_done(struct sk_buff *first,
- struct wireguard_peer *peer)
+static void wg_packet_create_data_done(struct sk_buff *first,
+ struct wireguard_peer *peer)
{
struct sk_buff *skb, *next;
bool is_keepalive, data_sent = false;
@@ -282,7 +282,7 @@ void wg_packet_tx_worker(struct work_struct *work)
keypair = PACKET_CB(first)->keypair;
if (likely(state == PACKET_STATE_CRYPTED))
- packet_create_data_done(first, peer);
+ wg_packet_create_data_done(first, peer);
else
skb_free_null_queue(first);
@@ -319,7 +319,7 @@ void wg_packet_encrypt_worker(struct work_struct *work)
simd_put(&simd_context);
}
-static void packet_create_data(struct sk_buff *first)
+static void wg_packet_create_data(struct sk_buff *first)
{
struct wireguard_peer *peer = PACKET_PEER(first);
struct wireguard_device *wg = peer->device;
@@ -393,7 +393,7 @@ void wg_packet_send_staged_packets(struct wireguard_peer *peer)
packets.prev->next = NULL;
wg_peer_get(keypair->entry.peer);
PACKET_CB(packets.next)->keypair = keypair;
- packet_create_data(packets.next);
+ wg_packet_create_data(packets.next);
return;
out_invalid: