diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-07 19:19:25 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-08 03:14:52 +0200 |
commit | b09de1f158b7b4ed69265edda4c411791602badd (patch) | |
tree | b2ec371d9a44bd468a976eb719e50080199f6c62 /src/send.c | |
parent | ba483b05385c35d3863921eec72292c349292a7e (diff) |
global: prefix functions used in callbacks with wg_
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/send.c')
-rw-r--r-- | src/send.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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: |