Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
addrconf.c File Reference
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/net.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>
#include <linux/capability.h>
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/string.h>
#include <linux/hash.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include <net/snmp.h>
#include <net/af_ieee802154.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 <linux/if_tunnel.h>
#include <linux/rtnetlink.h>
#include <linux/uaccess.h>
#include <asm/unaligned.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/export.h>

Go to the source code of this file.

Data Structures

struct  ipv6_saddr_score
 
struct  ipv6_saddr_dst
 

Macros

#define pr_fmt(fmt)   "IPv6: " fmt
 
#define ACONF_DEBUG   2
 
#define ADBG(x)
 
#define INFINITY_LIFE_TIME   0xFFFFFFFF
 
#define ADDRCONF_TIMER_FUZZ_MINUS   (HZ > 50 ? HZ/50 : 1)
 
#define ADDRCONF_TIMER_FUZZ   (HZ / 4)
 
#define ADDRCONF_TIMER_FUZZ_MAX   (HZ)
 

Enumerations

enum  addrconf_timer_t { AC_NONE, AC_DAD, AC_RS }
 
enum  {
  IPV6_SADDR_RULE_INIT = 0, IPV6_SADDR_RULE_LOCAL, IPV6_SADDR_RULE_SCOPE, IPV6_SADDR_RULE_PREFERRED,
  IPV6_SADDR_RULE_OIF, IPV6_SADDR_RULE_LABEL, IPV6_SADDR_RULE_ORCHID, IPV6_SADDR_RULE_PREFIX,
  IPV6_SADDR_RULE_MAX
}
 
enum  addr_type_t { UNICAST_ADDR, MULTICAST_ADDR, ANYCAST_ADDR }
 

Functions

void in6_dev_finish_destroy (struct inet6_dev *idev)
 
 EXPORT_SYMBOL (in6_dev_finish_destroy)
 
void inet6_ifa_finish_destroy (struct inet6_ifaddr *ifp)
 
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 (ipv6_dev_get_saddr)
 
int ipv6_get_lladdr (struct net_device *dev, struct in6_addr *addr, unsigned char banned_flags)
 
int ipv6_chk_addr (struct net *net, const struct in6_addr *addr, struct net_device *dev, int strict)
 
 EXPORT_SYMBOL (ipv6_chk_addr)
 
int ipv6_chk_prefix (const struct in6_addr *addr, struct net_device *dev)
 
 EXPORT_SYMBOL (ipv6_chk_prefix)
 
struct inet6_ifaddripv6_get_ifaddr (struct net *net, const struct in6_addr *addr, struct net_device *dev, int strict)
 
void addrconf_dad_failure (struct inet6_ifaddr *ifp)
 
void addrconf_join_solict (struct net_device *dev, const struct in6_addr *addr)
 
void addrconf_leave_solict (struct inet6_dev *idev, const struct in6_addr *addr)
 
void addrconf_prefix_rcv (struct net_device *dev, u8 *opt, int len, bool sllao)
 
int addrconf_set_dstaddr (struct net *net, void __user *arg)
 
int addrconf_add_ifaddr (struct net *net, void __user *arg)
 
int addrconf_del_ifaddr (struct net *net, void __user *arg)
 
void inet6_ifinfo_notify (int event, struct inet6_dev *idev)
 
int register_inet6addr_notifier (struct notifier_block *nb)
 
 EXPORT_SYMBOL (register_inet6addr_notifier)
 
int unregister_inet6addr_notifier (struct notifier_block *nb)
 
 EXPORT_SYMBOL (unregister_inet6addr_notifier)
 
int __init addrconf_init (void)
 
void addrconf_cleanup (void)
 

Variables

struct in6_addr in6addr_any = IN6ADDR_ANY_INIT
 
struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT
 
struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT
 
struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT
 

Macro Definition Documentation

#define ACONF_DEBUG   2

Definition at line 97 of file addrconf.c.

#define ADBG (   x)

Definition at line 102 of file addrconf.c.

#define ADDRCONF_TIMER_FUZZ   (HZ / 4)

Definition at line 113 of file addrconf.c.

#define ADDRCONF_TIMER_FUZZ_MAX   (HZ)

Definition at line 114 of file addrconf.c.

#define ADDRCONF_TIMER_FUZZ_MINUS   (HZ > 50 ? HZ/50 : 1)

Definition at line 112 of file addrconf.c.

#define INFINITY_LIFE_TIME   0xFFFFFFFF

Definition at line 105 of file addrconf.c.

#define pr_fmt (   fmt)    "IPv6: " fmt

Definition at line 41 of file addrconf.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
IPV6_SADDR_RULE_INIT 
IPV6_SADDR_RULE_LOCAL 
IPV6_SADDR_RULE_SCOPE 
IPV6_SADDR_RULE_PREFERRED 
IPV6_SADDR_RULE_OIF 
IPV6_SADDR_RULE_LABEL 
IPV6_SADDR_RULE_ORCHID 
IPV6_SADDR_RULE_PREFIX 
IPV6_SADDR_RULE_MAX 

Definition at line 931 of file addrconf.c.

Enumerator:
UNICAST_ADDR 
MULTICAST_ADDR 
ANYCAST_ADDR 

Definition at line 3629 of file addrconf.c.

Enumerator:
AC_NONE 
AC_DAD 
AC_RS 

Definition at line 264 of file addrconf.c.

Function Documentation

int addrconf_add_ifaddr ( struct net net,
void __user arg 
)

Definition at line 2266 of file addrconf.c.

void addrconf_cleanup ( void  )

Definition at line 4803 of file addrconf.c.

void addrconf_dad_failure ( struct inet6_ifaddr ifp)

Definition at line 1399 of file addrconf.c.

int addrconf_del_ifaddr ( struct net net,
void __user arg 
)

Definition at line 2285 of file addrconf.c.

int __init addrconf_init ( void  )

Definition at line 4722 of file addrconf.c.

void addrconf_join_solict ( struct net_device dev,
const struct in6_addr addr 
)

Definition at line 1432 of file addrconf.c.

void addrconf_leave_solict ( struct inet6_dev idev,
const struct in6_addr addr 
)

Definition at line 1443 of file addrconf.c.

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

Definition at line 1792 of file addrconf.c.

int addrconf_set_dstaddr ( struct net net,
void __user arg 
)

Definition at line 2089 of file addrconf.c.

EXPORT_SYMBOL ( in6_dev_finish_destroy  )
EXPORT_SYMBOL ( ipv6_dev_get_saddr  )
EXPORT_SYMBOL ( ipv6_chk_addr  )
EXPORT_SYMBOL ( ipv6_chk_prefix  )
EXPORT_SYMBOL ( register_inet6addr_notifier  )
EXPORT_SYMBOL ( unregister_inet6addr_notifier  )
void in6_dev_finish_destroy ( struct inet6_dev idev)

Definition at line 325 of file addrconf.c.

void inet6_ifa_finish_destroy ( struct inet6_ifaddr ifp)

Definition at line 539 of file addrconf.c.

void inet6_ifinfo_notify ( int  event,
struct inet6_dev idev 
)

Definition at line 4099 of file addrconf.c.

int ipv6_chk_addr ( struct net net,
const struct in6_addr addr,
struct net_device dev,
int  strict 
)

Definition at line 1260 of file addrconf.c.

int ipv6_chk_prefix ( const struct in6_addr addr,
struct net_device dev 
)

Definition at line 1303 of file addrconf.c.

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 
)

Definition at line 1095 of file addrconf.c.

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

Definition at line 1327 of file addrconf.c.

int ipv6_get_lladdr ( struct net_device dev,
struct in6_addr addr,
unsigned char  banned_flags 
)

Definition at line 1222 of file addrconf.c.

int register_inet6addr_notifier ( struct notifier_block nb)

Definition at line 4700 of file addrconf.c.

int unregister_inet6addr_notifier ( struct notifier_block nb)

Definition at line 4706 of file addrconf.c.

Variable Documentation

Definition at line 241 of file addrconf.c.

struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT

Definition at line 243 of file addrconf.c.

struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT

Definition at line 244 of file addrconf.c.

Definition at line 242 of file addrconf.c.