linux/net/core/dst.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * net/core/dst.c	Protocol independent destination cache.
 *
 * Authors:		Alexey Kuznetsov, <[email protected]>
 *
 */

#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/workqueue.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <linux/types.h>
#include <net/net_namespace.h>
#include <linux/sched.h>
#include <linux/prefetch.h>
#include <net/lwtunnel.h>
#include <net/xfrm.h>

#include <net/dst.h>
#include <net/dst_metadata.h>

int dst_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb)
{}
EXPORT_SYMBOL();

const struct dst_metrics dst_default_metrics =;
EXPORT_SYMBOL();

void dst_init(struct dst_entry *dst, struct dst_ops *ops,
	      struct net_device *dev, int initial_obsolete,
	      unsigned short flags)
{}
EXPORT_SYMBOL();

void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
		int initial_obsolete, unsigned short flags)
{}
EXPORT_SYMBOL();

static void dst_destroy(struct dst_entry *dst)
{}

static void dst_destroy_rcu(struct rcu_head *head)
{}

/* Operations to mark dst as DEAD and clean up the net device referenced
 * by dst:
 * 1. put the dst under blackhole interface and discard all tx/rx packets
 *    on this route.
 * 2. release the net_device
 * This function should be called when removing routes from the fib tree
 * in preparation for a NETDEV_DOWN/NETDEV_UNREGISTER event and also to
 * make the next dst_ops->check() fail.
 */
void dst_dev_put(struct dst_entry *dst)
{}
EXPORT_SYMBOL();

void dst_release(struct dst_entry *dst)
{}
EXPORT_SYMBOL();

void dst_release_immediate(struct dst_entry *dst)
{}
EXPORT_SYMBOL();

u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old)
{}
EXPORT_SYMBOL();

/* Caller asserts that dst_metrics_read_only(dst) is false.  */
void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old)
{}
EXPORT_SYMBOL();

struct dst_entry *dst_blackhole_check(struct dst_entry *dst, u32 cookie)
{}

u32 *dst_blackhole_cow_metrics(struct dst_entry *dst, unsigned long old)
{}

struct neighbour *dst_blackhole_neigh_lookup(const struct dst_entry *dst,
					     struct sk_buff *skb,
					     const void *daddr)
{}

void dst_blackhole_update_pmtu(struct dst_entry *dst, struct sock *sk,
			       struct sk_buff *skb, u32 mtu,
			       bool confirm_neigh)
{}
EXPORT_SYMBOL_GPL();

void dst_blackhole_redirect(struct dst_entry *dst, struct sock *sk,
			    struct sk_buff *skb)
{}
EXPORT_SYMBOL_GPL();

unsigned int dst_blackhole_mtu(const struct dst_entry *dst)
{}
EXPORT_SYMBOL_GPL();

static struct dst_ops dst_blackhole_ops =;

static void __metadata_dst_init(struct metadata_dst *md_dst,
				enum metadata_type type, u8 optslen)
{}

struct metadata_dst *metadata_dst_alloc(u8 optslen, enum metadata_type type,
					gfp_t flags)
{}
EXPORT_SYMBOL_GPL();

void metadata_dst_free(struct metadata_dst *md_dst)
{}
EXPORT_SYMBOL_GPL();

struct metadata_dst __percpu *
metadata_dst_alloc_percpu(u8 optslen, enum metadata_type type, gfp_t flags)
{}
EXPORT_SYMBOL_GPL();

void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst)
{}
EXPORT_SYMBOL_GPL();