summaryrefslogtreecommitdiffhomepage
path: root/src/socket.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-11-10 23:28:35 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-11-15 02:42:36 +0100
commit032d0526c9b52d1391fc14fa532ef5162e4c1822 (patch)
tree0b93b6b25bdfc10632e4c6c4d065c659eb623106 /src/socket.h
parent450e45d9570450e6a10323902e4198c30cd312a0 (diff)
socket: keep track of src address in sending packets
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/socket.h')
-rw-r--r--src/socket.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/socket.h b/src/socket.h
index 36cb4ed..ce668ad 100644
--- a/src/socket.h
+++ b/src/socket.h
@@ -9,6 +9,7 @@
#include <linux/if_ether.h>
struct wireguard_device;
+struct endpoint;
#define SKB_HEADER_LEN (max(sizeof(struct iphdr), sizeof(struct ipv6hdr)) + sizeof(struct udphdr) + NET_SKB_PAD)
@@ -18,7 +19,7 @@ int socket_send_buffer_to_peer(struct wireguard_peer *peer, void *data, size_t l
int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb, uint8_t 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 socket_addr_from_skb(struct sockaddr_storage *sockaddr, struct sk_buff *skb);
-void socket_set_peer_addr(struct wireguard_peer *peer, struct sockaddr_storage *sockaddr);
+int socket_endpoint_from_skb(struct endpoint *endpoint, struct sk_buff *skb);
+void socket_set_peer_endpoint(struct wireguard_peer *peer, struct endpoint *endpoint);
#endif