linux/net/ipv6/ipv6_sockglue.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	IPv6 BSD socket options interface
 *	Linux INET6 implementation
 *
 *	Authors:
 *	Pedro Roque		<[email protected]>
 *
 *	Based on linux/net/ipv4/ip_sockglue.c
 *
 *	FIXME: Make the setsockopt code POSIX compliant: That is
 *
 *	o	Truncate getsockopt returns
 *	o	Return an optlen of the truncated length if need be
 *
 *	Changes:
 *	David L Stevens <[email protected]>:
 *		- added multicast source filtering API for MLDv2
 */

#include <linux/module.h>
#include <linux/capability.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/net.h>
#include <linux/in6.h>
#include <linux/mroute6.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/init.h>
#include <linux/sysctl.h>
#include <linux/netfilter.h>
#include <linux/slab.h>

#include <net/sock.h>
#include <net/snmp.h>
#include <net/ipv6.h>
#include <net/ndisc.h>
#include <net/protocol.h>
#include <net/transp_v6.h>
#include <net/ip6_route.h>
#include <net/addrconf.h>
#include <net/inet_common.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/udplite.h>
#include <net/xfrm.h>
#include <net/compat.h>
#include <net/seg6.h>

#include <linux/uaccess.h>

struct ip6_ra_chain *ip6_ra_chain;
DEFINE_RWLOCK();

DEFINE_STATIC_KEY_FALSE(ip6_min_hopcount);

int ip6_ra_control(struct sock *sk, int sel)
{}

struct ipv6_txoptions *ipv6_update_options(struct sock *sk,
					   struct ipv6_txoptions *opt)
{}

static bool setsockopt_needs_rtnl(int optname)
{}

static int copy_group_source_from_sockptr(struct group_source_req *greqs,
		sockptr_t optval, int optlen)
{}

static int do_ipv6_mcast_group_source(struct sock *sk, int optname,
		sockptr_t optval, int optlen)
{}

static int ipv6_set_mcast_msfilter(struct sock *sk, sockptr_t optval,
		int optlen)
{}

static int compat_ipv6_set_mcast_msfilter(struct sock *sk, sockptr_t optval,
		int optlen)
{}

static int ipv6_mcast_join_leave(struct sock *sk, int optname,
		sockptr_t optval, int optlen)
{}

static int compat_ipv6_mcast_join_leave(struct sock *sk, int optname,
		sockptr_t optval, int optlen)
{}

static int ipv6_set_opt_hdr(struct sock *sk, int optname, sockptr_t optval,
		int optlen)
{}

int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
		       sockptr_t optval, unsigned int optlen)
{}

int ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
		    unsigned int optlen)
{}
EXPORT_SYMBOL();

static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
				  int optname, sockptr_t optval, int len)
{}

static int ipv6_get_msfilter(struct sock *sk, sockptr_t optval,
			     sockptr_t optlen, int len)
{}

static int compat_ipv6_get_msfilter(struct sock *sk, sockptr_t optval,
				    sockptr_t optlen, int len)
{}

int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
		       sockptr_t optval, sockptr_t optlen)
{}

int ipv6_getsockopt(struct sock *sk, int level, int optname,
		    char __user *optval, int __user *optlen)
{}
EXPORT_SYMBOL();