linux/drivers/net/wireguard/peer.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
 */

#include "peer.h"
#include "device.h"
#include "queueing.h"
#include "timers.h"
#include "peerlookup.h"
#include "noise.h"

#include <linux/kref.h>
#include <linux/lockdep.h>
#include <linux/rcupdate.h>
#include <linux/list.h>

static struct kmem_cache *peer_cache;
static atomic64_t peer_counter =;

struct wg_peer *wg_peer_create(struct wg_device *wg,
			       const u8 public_key[NOISE_PUBLIC_KEY_LEN],
			       const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN])
{}

struct wg_peer *wg_peer_get_maybe_zero(struct wg_peer *peer)
{}

static void peer_make_dead(struct wg_peer *peer)
{}

static void peer_remove_after_dead(struct wg_peer *peer)
{}

/* We have a separate "remove" function make sure that all active places where
 * a peer is currently operating will eventually come to an end and not pass
 * their reference onto another context.
 */
void wg_peer_remove(struct wg_peer *peer)
{}

void wg_peer_remove_all(struct wg_device *wg)
{}

static void rcu_release(struct rcu_head *rcu)
{}

static void kref_release(struct kref *refcount)
{}

void wg_peer_put(struct wg_peer *peer)
{}

int __init wg_peer_init(void)
{}

void wg_peer_uninit(void)
{}