#include "device.h"
#include "peer.h"
#include "socket.h"
#include "queueing.h"
#include "messages.h"
#include <linux/ctype.h>
#include <linux/net.h>
#include <linux/if_vlan.h>
#include <linux/if_ether.h>
#include <linux/inetdevice.h>
#include <net/udp_tunnel.h>
#include <net/ipv6.h>
static int send4(struct wg_device *wg, struct sk_buff *skb,
struct endpoint *endpoint, u8 ds, struct dst_cache *cache)
{ … }
static int send6(struct wg_device *wg, struct sk_buff *skb,
struct endpoint *endpoint, u8 ds, struct dst_cache *cache)
{ … }
int wg_socket_send_skb_to_peer(struct wg_peer *peer, struct sk_buff *skb, u8 ds)
{ … }
int wg_socket_send_buffer_to_peer(struct wg_peer *peer, void *buffer,
size_t len, u8 ds)
{ … }
int wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg,
struct sk_buff *in_skb, void *buffer,
size_t len)
{ … }
int wg_socket_endpoint_from_skb(struct endpoint *endpoint,
const struct sk_buff *skb)
{ … }
static bool endpoint_eq(const struct endpoint *a, const struct endpoint *b)
{ … }
void wg_socket_set_peer_endpoint(struct wg_peer *peer,
const struct endpoint *endpoint)
{ … }
void wg_socket_set_peer_endpoint_from_skb(struct wg_peer *peer,
const struct sk_buff *skb)
{ … }
void wg_socket_clear_peer_endpoint_src(struct wg_peer *peer)
{ … }
static int wg_receive(struct sock *sk, struct sk_buff *skb)
{ … }
static void sock_free(struct sock *sock)
{ … }
static void set_sock_opts(struct socket *sock)
{ … }
int wg_socket_init(struct wg_device *wg, u16 port)
{ … }
void wg_socket_reinit(struct wg_device *wg, struct sock *new4,
struct sock *new6)
{ … }