linux/net/ipv6/ping.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
 *		operating system.  INET is implemented using the  BSD Socket
 *		interface as the means of communication with the user level.
 *
 *		"Ping" sockets
 *
 * Based on ipv4/ping.c code.
 *
 * Authors:	Lorenzo Colitti (IPv6 support)
 *		Vasiliy Kulikov / Openwall (IPv4 implementation, for Linux 2.6),
 *		Pavel Kankovsky (IPv4 implementation, for Linux 2.4.32)
 */

#include <net/addrconf.h>
#include <net/ipv6.h>
#include <net/ip6_route.h>
#include <net/protocol.h>
#include <net/udp.h>
#include <net/transp_v6.h>
#include <linux/proc_fs.h>
#include <linux/bpf-cgroup.h>
#include <net/ping.h>

/* Compatibility glue so we can support IPv6 when it's compiled as a module */
static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len,
				 int *addr_len)
{}
static void dummy_ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg,
				       struct sk_buff *skb)
{}
static int dummy_icmpv6_err_convert(u8 type, u8 code, int *err)
{}
static void dummy_ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
				  __be16 port, u32 info, u8 *payload) {}
static int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
			       const struct net_device *dev, int strict)
{}

static int ping_v6_pre_connect(struct sock *sk, struct sockaddr *uaddr,
			       int addr_len)
{}

static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{}

struct proto pingv6_prot =;
EXPORT_SYMBOL_GPL();

static struct inet_protosw pingv6_protosw =;

#ifdef CONFIG_PROC_FS
static void *ping_v6_seq_start(struct seq_file *seq, loff_t *pos)
{}

static int ping_v6_seq_show(struct seq_file *seq, void *v)
{}

static const struct seq_operations ping_v6_seq_ops =;

static int __net_init ping_v6_proc_init_net(struct net *net)
{}

static void __net_exit ping_v6_proc_exit_net(struct net *net)
{}

static struct pernet_operations ping_v6_net_ops =;
#endif

int __init pingv6_init(void)
{}

/* This never gets called because it's not possible to unload the ipv6 module,
 * but just in case.
 */
void pingv6_exit(void)
{}