linux/net/ipv6/addrconf.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	IPv6 Address [auto]configuration
 *	Linux INET6 implementation
 *
 *	Authors:
 *	Pedro Roque		<[email protected]>
 *	Alexey Kuznetsov	<[email protected]>
 */

/*
 *	Changes:
 *
 *	Janos Farkas			:	delete timer on ifdown
 *	<[email protected]>
 *	Andi Kleen			:	kill double kfree on module
 *						unload.
 *	Maciej W. Rozycki		:	FDDI support
 *	sekiya@USAGI			:	Don't send too many RS
 *						packets.
 *	yoshfuji@USAGI			:       Fixed interval between DAD
 *						packets.
 *	YOSHIFUJI Hideaki @USAGI	:	improved accuracy of
 *						address validation timer.
 *	YOSHIFUJI Hideaki @USAGI	:	Privacy Extensions (RFC3041)
 *						support.
 *	Yuji SEKIYA @USAGI		:	Don't assign a same IPv6
 *						address on a same interface.
 *	YOSHIFUJI Hideaki @USAGI	:	ARCnet support
 *	YOSHIFUJI Hideaki @USAGI	:	convert /proc/net/if_inet6 to
 *						seq_file.
 *	YOSHIFUJI Hideaki @USAGI	:	improved source address
 *						selection; consider scope,
 *						status etc.
 */

#define pr_fmt(fmt)

#include <linux/errno.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched/signal.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/net.h>
#include <linux/inet.h>
#include <linux/in6.h>
#include <linux/netdevice.h>
#include <linux/if_addr.h>
#include <linux/if_arp.h>
#include <linux/if_arcnet.h>
#include <linux/if_infiniband.h>
#include <linux/route.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/slab.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
#endif
#include <linux/capability.h>
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/string.h>
#include <linux/hash.h>

#include <net/ip_tunnels.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include <net/snmp.h>

#include <net/6lowpan.h>
#include <net/firewire.h>
#include <net/ipv6.h>
#include <net/protocol.h>
#include <net/ndisc.h>
#include <net/ip6_route.h>
#include <net/addrconf.h>
#include <net/tcp.h>
#include <net/ip.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <net/l3mdev.h>
#include <linux/if_tunnel.h>
#include <linux/rtnetlink.h>
#include <linux/netconf.h>
#include <linux/random.h>
#include <linux/uaccess.h>
#include <asm/unaligned.h>

#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/export.h>
#include <linux/ioam6.h>

#define INFINITY_LIFE_TIME

#define IPV6_MAX_STRLEN

static inline u32 cstamp_delta(unsigned long cstamp)
{}

static inline s32 rfc3315_s14_backoff_init(s32 irt)
{}

static inline s32 rfc3315_s14_backoff_update(s32 rt, s32 mrt)
{}

#ifdef CONFIG_SYSCTL
static int addrconf_sysctl_register(struct inet6_dev *idev);
static void addrconf_sysctl_unregister(struct inet6_dev *idev);
#else
static inline int addrconf_sysctl_register(struct inet6_dev *idev)
{
	return 0;
}

static inline void addrconf_sysctl_unregister(struct inet6_dev *idev)
{
}
#endif

static void ipv6_gen_rnd_iid(struct in6_addr *addr);

static int ipv6_generate_eui64(u8 *eui, struct net_device *dev);
static int ipv6_count_addresses(const struct inet6_dev *idev);
static int ipv6_generate_stable_address(struct in6_addr *addr,
					u8 dad_count,
					const struct inet6_dev *idev);

#define IN6_ADDR_HSIZE_SHIFT
#define IN6_ADDR_HSIZE

static void addrconf_verify(struct net *net);
static void addrconf_verify_rtnl(struct net *net);

static struct workqueue_struct *addrconf_wq;

static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp);

static void addrconf_type_change(struct net_device *dev,
				 unsigned long event);
static int addrconf_ifdown(struct net_device *dev, bool unregister);

static struct fib6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
						  int plen,
						  const struct net_device *dev,
						  u32 flags, u32 noflags,
						  bool no_gw);

static void addrconf_dad_start(struct inet6_ifaddr *ifp);
static void addrconf_dad_work(struct work_struct *w);
static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
				   bool send_na);
static void addrconf_dad_run(struct inet6_dev *idev, bool restart);
static void addrconf_rs_timer(struct timer_list *t);
static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);

static void inet6_prefix_notify(int event, struct inet6_dev *idev,
				struct prefix_info *pinfo);

static struct ipv6_devconf ipv6_devconf __read_mostly =;

static struct ipv6_devconf ipv6_devconf_dflt __read_mostly =;

/* Check if link is ready: is it up and is a valid qdisc available */
static inline bool addrconf_link_ready(const struct net_device *dev)
{}

static void addrconf_del_rs_timer(struct inet6_dev *idev)
{}

static void addrconf_del_dad_work(struct inet6_ifaddr *ifp)
{}

static void addrconf_mod_rs_timer(struct inet6_dev *idev,
				  unsigned long when)
{}

static void addrconf_mod_dad_work(struct inet6_ifaddr *ifp,
				   unsigned long delay)
{}

static int snmp6_alloc_dev(struct inet6_dev *idev)
{}

static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
{}

static struct inet6_dev *ipv6_find_idev(struct net_device *dev)
{}

static int inet6_netconf_msgsize_devconf(int type)
{}

static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
				      struct ipv6_devconf *devconf, u32 portid,
				      u32 seq, int event, unsigned int flags,
				      int type)
{}

void inet6_netconf_notify_devconf(struct net *net, int event, int type,
				  int ifindex, struct ipv6_devconf *devconf)
{}

static const struct nla_policy devconf_ipv6_policy[NETCONFA_MAX+1] =;

static int inet6_netconf_valid_get_req(struct sk_buff *skb,
				       const struct nlmsghdr *nlh,
				       struct nlattr **tb,
				       struct netlink_ext_ack *extack)
{}

static int inet6_netconf_get_devconf(struct sk_buff *in_skb,
				     struct nlmsghdr *nlh,
				     struct netlink_ext_ack *extack)
{}

/* Combine dev_addr_genid and dev_base_seq to detect changes.
 */
static u32 inet6_base_seq(const struct net *net)
{}

static int inet6_netconf_dump_devconf(struct sk_buff *skb,
				      struct netlink_callback *cb)
{}

#ifdef CONFIG_SYSCTL
static void dev_forward_change(struct inet6_dev *idev)
{}


static void addrconf_forward_change(struct net *net, __s32 newf)
{}

static int addrconf_fixup_forwarding(const struct ctl_table *table, int *p, int newf)
{}

static void addrconf_linkdown_change(struct net *net, __s32 newf)
{}

static int addrconf_fixup_linkdown(const struct ctl_table *table, int *p, int newf)
{}

#endif

/* Nobody refers to this ifaddr, destroy it */
void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp)
{}

static void
ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp)
{}

static u32 inet6_addr_hash(const struct net *net, const struct in6_addr *addr)
{}

static bool ipv6_chk_same_addr(struct net *net, const struct in6_addr *addr,
			       struct net_device *dev, unsigned int hash)
{}

static int ipv6_add_addr_hash(struct net_device *dev, struct inet6_ifaddr *ifa)
{}

/* On success it returns ifp with increased reference count */

static struct inet6_ifaddr *
ipv6_add_addr(struct inet6_dev *idev, struct ifa6_config *cfg,
	      bool can_block, struct netlink_ext_ack *extack)
{}

enum cleanup_prefix_rt_t {};

/*
 * Check, whether the prefix for ifp would still need a prefix route
 * after deleting ifp. The function returns one of the CLEANUP_PREFIX_RT_*
 * constants.
 *
 * 1) we don't purge prefix if address was not permanent.
 *    prefix is managed by its own lifetime.
 * 2) we also don't purge, if the address was IFA_F_NOPREFIXROUTE.
 * 3) if there are no addresses, delete prefix.
 * 4) if there are still other permanent address(es),
 *    corresponding prefix is still permanent.
 * 5) if there are still other addresses with IFA_F_NOPREFIXROUTE,
 *    don't purge the prefix, assume user space is managing it.
 * 6) otherwise, update prefix lifetime to the
 *    longest valid lifetime among the corresponding
 *    addresses on the device.
 *    Note: subsequent RA will update lifetime.
 **/
static enum cleanup_prefix_rt_t
check_cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long *expires)
{}

static void
cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long expires,
		     bool del_rt, bool del_peer)
{}


/* This function wants to get referenced ifp and releases it before return */

static void ipv6_del_addr(struct inet6_ifaddr *ifp)
{}

static unsigned long ipv6_get_regen_advance(const struct inet6_dev *idev)
{}

static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block)
{}

/*
 *	Choose an appropriate source address (RFC3484)
 */
enum {};

struct ipv6_saddr_score {};

struct ipv6_saddr_dst {};

static inline int ipv6_saddr_preferred(int type)
{}

static bool ipv6_use_optimistic_addr(const struct net *net,
				     const struct inet6_dev *idev)
{}

static bool ipv6_allow_optimistic_dad(const struct net *net,
				      const struct inet6_dev *idev)
{}

static int ipv6_get_saddr_eval(struct net *net,
			       struct ipv6_saddr_score *score,
			       struct ipv6_saddr_dst *dst,
			       int i)
{}

static int __ipv6_dev_get_saddr(struct net *net,
				struct ipv6_saddr_dst *dst,
				struct inet6_dev *idev,
				struct ipv6_saddr_score *scores,
				int hiscore_idx)
{}

static int ipv6_get_saddr_master(struct net *net,
				 const struct net_device *dst_dev,
				 const struct net_device *master,
				 struct ipv6_saddr_dst *dst,
				 struct ipv6_saddr_score *scores,
				 int hiscore_idx)
{}

int ipv6_dev_get_saddr(struct net *net, const struct net_device *dst_dev,
		       const struct in6_addr *daddr, unsigned int prefs,
		       struct in6_addr *saddr)
{}
EXPORT_SYMBOL();

static int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
			      u32 banned_flags)
{}

int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
		    u32 banned_flags)
{}

static int ipv6_count_addresses(const struct inet6_dev *idev)
{}

int ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
		  const struct net_device *dev, int strict)
{}
EXPORT_SYMBOL();

/* device argument is used to find the L3 domain of interest. If
 * skip_dev_check is set, then the ifp device is not checked against
 * the passed in dev argument. So the 2 cases for addresses checks are:
 *   1. does the address exist in the L3 domain that dev is part of
 *      (skip_dev_check = true), or
 *
 *   2. does the address exist on the specific device
 *      (skip_dev_check = false)
 */
static struct net_device *
__ipv6_chk_addr_and_flags(struct net *net, const struct in6_addr *addr,
			  const struct net_device *dev, bool skip_dev_check,
			  int strict, u32 banned_flags)
{}

int ipv6_chk_addr_and_flags(struct net *net, const struct in6_addr *addr,
			    const struct net_device *dev, bool skip_dev_check,
			    int strict, u32 banned_flags)
{}
EXPORT_SYMBOL();


/* Compares an address/prefix_len with addresses on device @dev.
 * If one is found it returns true.
 */
bool ipv6_chk_custom_prefix(const struct in6_addr *addr,
	const unsigned int prefix_len, struct net_device *dev)
{}
EXPORT_SYMBOL();

int ipv6_chk_prefix(const struct in6_addr *addr, struct net_device *dev)
{}
EXPORT_SYMBOL();

/**
 * ipv6_dev_find - find the first device with a given source address.
 * @net: the net namespace
 * @addr: the source address
 * @dev: used to find the L3 domain of interest
 *
 * The caller should be protected by RCU, or RTNL.
 */
struct net_device *ipv6_dev_find(struct net *net, const struct in6_addr *addr,
				 struct net_device *dev)
{}
EXPORT_SYMBOL();

struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, const struct in6_addr *addr,
				     struct net_device *dev, int strict)
{}

/* Gets referenced address, destroys ifaddr */

static void addrconf_dad_stop(struct inet6_ifaddr *ifp, int dad_failed)
{}

static int addrconf_dad_end(struct inet6_ifaddr *ifp)
{}

void addrconf_dad_failure(struct sk_buff *skb, struct inet6_ifaddr *ifp)
{}

/* Join to solicited addr multicast group.
 * caller must hold RTNL */
void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr)
{}

/* caller must hold RTNL */
void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr)
{}

/* caller must hold RTNL */
static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
{}

/* caller must hold RTNL */
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
{}

static int addrconf_ifid_6lowpan(u8 *eui, struct net_device *dev)
{}

static int addrconf_ifid_ieee1394(u8 *eui, struct net_device *dev)
{}

static int addrconf_ifid_arcnet(u8 *eui, struct net_device *dev)
{}

static int addrconf_ifid_infiniband(u8 *eui, struct net_device *dev)
{}

static int __ipv6_isatap_ifid(u8 *eui, __be32 addr)
{}

static int addrconf_ifid_sit(u8 *eui, struct net_device *dev)
{}

static int addrconf_ifid_gre(u8 *eui, struct net_device *dev)
{}

static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev)
{}

static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
{}

static int ipv6_inherit_eui64(u8 *eui, struct inet6_dev *idev)
{}

/* Generation of a randomized Interface Identifier
 * draft-ietf-6man-rfc4941bis, Section 3.3.1
 */

static void ipv6_gen_rnd_iid(struct in6_addr *addr)
{}

/*
 *	Add prefix route.
 */

static void
addrconf_prefix_route(struct in6_addr *pfx, int plen, u32 metric,
		      struct net_device *dev, unsigned long expires,
		      u32 flags, gfp_t gfp_flags)
{}


static struct fib6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
						  int plen,
						  const struct net_device *dev,
						  u32 flags, u32 noflags,
						  bool no_gw)
{}


/* Create "default" multicast route to the interface */

static void addrconf_add_mroute(struct net_device *dev)
{}

static struct inet6_dev *addrconf_add_dev(struct net_device *dev)
{}

static void manage_tempaddrs(struct inet6_dev *idev,
			     struct inet6_ifaddr *ifp,
			     __u32 valid_lft, __u32 prefered_lft,
			     bool create, unsigned long now)
{}

static bool is_addr_mode_generate_stable(struct inet6_dev *idev)
{}

int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
				 const struct prefix_info *pinfo,
				 struct inet6_dev *in6_dev,
				 const struct in6_addr *addr, int addr_type,
				 u32 addr_flags, bool sllao, bool tokenized,
				 __u32 valid_lft, u32 prefered_lft)
{}
EXPORT_SYMBOL_GPL();

void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
{}

static int addrconf_set_sit_dstaddr(struct net *net, struct net_device *dev,
		struct in6_ifreq *ireq)
{}

/*
 *	Set destination address.
 *	Special case for SIT interfaces where we create a new "virtual"
 *	device.
 */
int addrconf_set_dstaddr(struct net *net, void __user *arg)
{}

static int ipv6_mc_config(struct sock *sk, bool join,
			  const struct in6_addr *addr, int ifindex)
{}

/*
 *	Manual configuration of address on an interface
 */
static int inet6_addr_add(struct net *net, int ifindex,
			  struct ifa6_config *cfg,
			  struct netlink_ext_ack *extack)
{}

static int inet6_addr_del(struct net *net, int ifindex, u32 ifa_flags,
			  const struct in6_addr *pfx, unsigned int plen,
			  struct netlink_ext_ack *extack)
{}


int addrconf_add_ifaddr(struct net *net, void __user *arg)
{}

int addrconf_del_ifaddr(struct net *net, void __user *arg)
{}

static void add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
		     int plen, int scope, u8 proto)
{}

#if IS_ENABLED(CONFIG_IPV6_SIT) || IS_ENABLED(CONFIG_NET_IPGRE) || IS_ENABLED(CONFIG_IPV6_GRE)
static void add_v4_addrs(struct inet6_dev *idev)
{}
#endif

static void init_loopback(struct net_device *dev)
{}

void addrconf_add_linklocal(struct inet6_dev *idev,
			    const struct in6_addr *addr, u32 flags)
{}
EXPORT_SYMBOL_GPL();

static bool ipv6_reserved_interfaceid(struct in6_addr address)
{}

static int ipv6_generate_stable_address(struct in6_addr *address,
					u8 dad_count,
					const struct inet6_dev *idev)
{}

static void ipv6_gen_mode_random_init(struct inet6_dev *idev)
{}

static void addrconf_addr_gen(struct inet6_dev *idev, bool prefix_route)
{}

static void addrconf_dev_config(struct net_device *dev)
{}

#if IS_ENABLED(CONFIG_IPV6_SIT)
static void addrconf_sit_config(struct net_device *dev)
{}
#endif

#if IS_ENABLED(CONFIG_NET_IPGRE) || IS_ENABLED(CONFIG_IPV6_GRE)
static void addrconf_gre_config(struct net_device *dev)
{}
#endif

static void addrconf_init_auto_addrs(struct net_device *dev)
{}

static int fixup_permanent_addr(struct net *net,
				struct inet6_dev *idev,
				struct inet6_ifaddr *ifp)
{}

static void addrconf_permanent_addr(struct net *net, struct net_device *dev)
{}

static int addrconf_notify(struct notifier_block *this, unsigned long event,
			   void *ptr)
{}

/*
 *	addrconf module should be notified of a device going up
 */
static struct notifier_block ipv6_dev_notf =;

static void addrconf_type_change(struct net_device *dev, unsigned long event)
{}

static bool addr_is_local(const struct in6_addr *addr)
{}

static int addrconf_ifdown(struct net_device *dev, bool unregister)
{}

static void addrconf_rs_timer(struct timer_list *t)
{}

/*
 *	Duplicate Address Detection
 */
static void addrconf_dad_kick(struct inet6_ifaddr *ifp)
{}

static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
{}

static void addrconf_dad_start(struct inet6_ifaddr *ifp)
{}

static void addrconf_dad_work(struct work_struct *w)
{}

/* ifp->idev must be at least read locked */
static bool ipv6_lonely_lladdr(struct inet6_ifaddr *ifp)
{}

static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
				   bool send_na)
{}

static void addrconf_dad_run(struct inet6_dev *idev, bool restart)
{}

#ifdef CONFIG_PROC_FS
struct if6_iter_state {};

static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos)
{}

static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
					 struct inet6_ifaddr *ifa)
{}

static void *if6_seq_start(struct seq_file *seq, loff_t *pos)
	__acquires(rcu)
{}

static void *if6_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{}

static void if6_seq_stop(struct seq_file *seq, void *v)
	__releases(rcu)
{}

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

static const struct seq_operations if6_seq_ops =;

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

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

static struct pernet_operations if6_proc_net_ops =;

int __init if6_proc_init(void)
{}

void if6_proc_exit(void)
{}
#endif	/* CONFIG_PROC_FS */

#if IS_ENABLED(CONFIG_IPV6_MIP6)
/* Check if address is a home address configured on any interface. */
int ipv6_chk_home_addr(struct net *net, const struct in6_addr *addr)
{}
#endif

/* RFC6554 has some algorithm to avoid loops in segment routing by
 * checking if the segments contains any of a local interface address.
 *
 * Quote:
 *
 * To detect loops in the SRH, a router MUST determine if the SRH
 * includes multiple addresses assigned to any interface on that router.
 * If such addresses appear more than once and are separated by at least
 * one address not assigned to that router.
 */
int ipv6_chk_rpl_srh_loop(struct net *net, const struct in6_addr *segs,
			  unsigned char nsegs)
{}

/*
 *	Periodic address status verification
 */

static void addrconf_verify_rtnl(struct net *net)
{}

static void addrconf_verify_work(struct work_struct *w)
{}

static void addrconf_verify(struct net *net)
{}

static struct in6_addr *extract_addr(struct nlattr *addr, struct nlattr *local,
				     struct in6_addr **peer_pfx)
{}

static const struct nla_policy ifa_ipv6_policy[IFA_MAX+1] =;

static int
inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh,
		  struct netlink_ext_ack *extack)
{}

static int modify_prefix_route(struct inet6_ifaddr *ifp,
			       unsigned long expires, u32 flags,
			       bool modify_peer)
{}

static int inet6_addr_modify(struct net *net, struct inet6_ifaddr *ifp,
			     struct ifa6_config *cfg)
{}

static int
inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh,
		  struct netlink_ext_ack *extack)
{}

static void put_ifaddrmsg(struct nlmsghdr *nlh, u8 prefixlen, u32 flags,
			  u8 scope, int ifindex)
{}

static int put_cacheinfo(struct sk_buff *skb, unsigned long cstamp,
			 unsigned long tstamp, u32 preferred, u32 valid)
{}

static inline int rt_scope(int ifa_scope)
{}

static inline int inet6_ifaddr_msgsize(void)
{}

enum addr_type_t {};

struct inet6_fill_args {};

static int inet6_fill_ifaddr(struct sk_buff *skb,
			     const struct inet6_ifaddr *ifa,
			     struct inet6_fill_args *args)
{}

static int inet6_fill_ifmcaddr(struct sk_buff *skb,
			       const struct ifmcaddr6 *ifmca,
			       struct inet6_fill_args *args)
{}

static int inet6_fill_ifacaddr(struct sk_buff *skb,
			       const struct ifacaddr6 *ifaca,
			       struct inet6_fill_args *args)
{}

/* called with rcu_read_lock() */
static int in6_dump_addrs(const struct inet6_dev *idev, struct sk_buff *skb,
			  struct netlink_callback *cb, int *s_ip_idx,
			  struct inet6_fill_args *fillargs)
{}

static int inet6_valid_dump_ifaddr_req(const struct nlmsghdr *nlh,
				       struct inet6_fill_args *fillargs,
				       struct net **tgt_net, struct sock *sk,
				       struct netlink_callback *cb)
{}

static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
			   enum addr_type_t type)
{}

static int inet6_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
{}

static int inet6_dump_ifmcaddr(struct sk_buff *skb, struct netlink_callback *cb)
{}


static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb)
{}

static int inet6_rtm_valid_getaddr_req(struct sk_buff *skb,
				       const struct nlmsghdr *nlh,
				       struct nlattr **tb,
				       struct netlink_ext_ack *extack)
{}

static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh,
			     struct netlink_ext_ack *extack)
{}

static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
{}

static void ipv6_store_devconf(const struct ipv6_devconf *cnf,
			       __s32 *array, int bytes)
{}

static inline size_t inet6_ifla6_size(void)
{}

static inline size_t inet6_if_nlmsg_size(void)
{}

static inline void __snmp6_fill_statsdev(u64 *stats, atomic_long_t *mib,
					int bytes)
{}

static inline void __snmp6_fill_stats64(u64 *stats, void __percpu *mib,
					int bytes, size_t syncpoff)
{}

static void snmp6_fill_stats(u64 *stats, struct inet6_dev *idev, int attrtype,
			     int bytes)
{}

static int inet6_fill_ifla6_attrs(struct sk_buff *skb, struct inet6_dev *idev,
				  u32 ext_filter_mask)
{}

static size_t inet6_get_link_af_size(const struct net_device *dev,
				     u32 ext_filter_mask)
{}

static int inet6_fill_link_af(struct sk_buff *skb, const struct net_device *dev,
			      u32 ext_filter_mask)
{}

static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token,
			     struct netlink_ext_ack *extack)
{}

static const struct nla_policy inet6_af_policy[IFLA_INET6_MAX + 1] =;

static int check_addr_gen_mode(int mode)
{}

static int check_stable_privacy(struct inet6_dev *idev, struct net *net,
				int mode)
{}

static int inet6_validate_link_af(const struct net_device *dev,
				  const struct nlattr *nla,
				  struct netlink_ext_ack *extack)
{}

static int inet6_set_link_af(struct net_device *dev, const struct nlattr *nla,
			     struct netlink_ext_ack *extack)
{}

static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev,
			     u32 portid, u32 seq, int event, unsigned int flags)
{}

static int inet6_valid_dump_ifinfo(const struct nlmsghdr *nlh,
				   struct netlink_ext_ack *extack)
{}

static int inet6_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
{}

void inet6_ifinfo_notify(int event, struct inet6_dev *idev)
{}

static inline size_t inet6_prefix_nlmsg_size(void)
{}

static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,
			     struct prefix_info *pinfo, u32 portid, u32 seq,
			     int event, unsigned int flags)
{}

static void inet6_prefix_notify(int event, struct inet6_dev *idev,
			 struct prefix_info *pinfo)
{}

static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
{}

static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
{}

#ifdef CONFIG_SYSCTL

static int addrconf_sysctl_forward(const struct ctl_table *ctl, int write,
		void *buffer, size_t *lenp, loff_t *ppos)
{}

static int addrconf_sysctl_mtu(const struct ctl_table *ctl, int write,
		void *buffer, size_t *lenp, loff_t *ppos)
{}

static void dev_disable_change(struct inet6_dev *idev)
{}

static void addrconf_disable_change(struct net *net, __s32 newf)
{}

static int addrconf_disable_ipv6(const struct ctl_table *table, int *p, int newf)
{}

static int addrconf_sysctl_disable(const struct ctl_table *ctl, int write,
		void *buffer, size_t *lenp, loff_t *ppos)
{}

static int addrconf_sysctl_proxy_ndp(const struct ctl_table *ctl, int write,
		void *buffer, size_t *lenp, loff_t *ppos)
{}

static int addrconf_sysctl_addr_gen_mode(const struct ctl_table *ctl, int write,
					 void *buffer, size_t *lenp,
					 loff_t *ppos)
{}

static int addrconf_sysctl_stable_secret(const struct ctl_table *ctl, int write,
					 void *buffer, size_t *lenp,
					 loff_t *ppos)
{}

static
int addrconf_sysctl_ignore_routes_with_linkdown(const struct ctl_table *ctl,
						int write, void *buffer,
						size_t *lenp,
						loff_t *ppos)
{}

static
void addrconf_set_nopolicy(struct rt6_info *rt, int action)
{}

static
void addrconf_disable_policy_idev(struct inet6_dev *idev, int val)
{}

static
int addrconf_disable_policy(const struct ctl_table *ctl, int *valp, int val)
{}

static int addrconf_sysctl_disable_policy(const struct ctl_table *ctl, int write,
				   void *buffer, size_t *lenp, loff_t *ppos)
{}

static int minus_one =;
static const int two_five_five =;
static u32 ioam6_if_id_max =;

static const struct ctl_table addrconf_sysctl[] =;

static int __addrconf_sysctl_register(struct net *net, char *dev_name,
		struct inet6_dev *idev, struct ipv6_devconf *p)
{}

static void __addrconf_sysctl_unregister(struct net *net,
					 struct ipv6_devconf *p, int ifindex)
{}

static int addrconf_sysctl_register(struct inet6_dev *idev)
{}

static void addrconf_sysctl_unregister(struct inet6_dev *idev)
{}


#endif

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

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

static struct pernet_operations addrconf_ops =;

static struct rtnl_af_ops inet6_ops __read_mostly =;

/*
 *	Init / cleanup code
 */

int __init addrconf_init(void)
{}

void addrconf_cleanup(void)
{}