Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
neighbour.h File Reference
#include <linux/neighbour.h>
#include <linux/atomic.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/rcupdate.h>
#include <linux/seq_file.h>
#include <linux/err.h>
#include <linux/sysctl.h>
#include <linux/workqueue.h>
#include <net/rtnetlink.h>

Go to the source code of this file.

Data Structures

struct  neigh_parms
 
struct  neigh_statistics
 
struct  neighbour
 
struct  neigh_ops
 
struct  pneigh_entry
 
struct  neigh_hash_table
 
struct  neigh_table
 
struct  neigh_seq_state
 
struct  neighbour_cb
 

Macros

#define NUD_IN_TIMER   (NUD_INCOMPLETE|NUD_REACHABLE|NUD_DELAY|NUD_PROBE)
 
#define NUD_VALID   (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY)
 
#define NUD_CONNECTED   (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE)
 
#define NEIGH_CACHE_STAT_INC(tbl, field)   this_cpu_inc((tbl)->stats->field)
 
#define NEIGH_NUM_HASH_RND   4
 
#define NEIGH_PRIV_ALIGN   sizeof(long long)
 
#define NEIGH_UPDATE_F_OVERRIDE   0x00000001
 
#define NEIGH_UPDATE_F_WEAK_OVERRIDE   0x00000002
 
#define NEIGH_UPDATE_F_OVERRIDE_ISROUTER   0x00000004
 
#define NEIGH_UPDATE_F_ISROUTER   0x40000000
 
#define NEIGH_UPDATE_F_ADMIN   0x80000000
 
#define NEIGH_SEQ_NEIGH_ONLY   0x00000001
 
#define NEIGH_SEQ_IS_PNEIGH   0x00000002
 
#define NEIGH_SEQ_SKIP_NOARP   0x00000004
 
#define neigh_hold(n)   atomic_inc(&(n)->refcnt)
 
#define LOCALLY_ENQUEUED   0x1
 
#define NEIGH_CB(skb)   ((struct neighbour_cb *)(skb)->cb)
 

Functions

void neigh_table_init (struct neigh_table *tbl)
 
int neigh_table_clear (struct neigh_table *tbl)
 
struct neighbourneigh_lookup (struct neigh_table *tbl, const void *pkey, struct net_device *dev)
 
struct neighbourneigh_lookup_nodev (struct neigh_table *tbl, struct net *net, const void *pkey)
 
struct neighbour__neigh_create (struct neigh_table *tbl, const void *pkey, struct net_device *dev, bool want_ref)
 
void neigh_destroy (struct neighbour *neigh)
 
int __neigh_event_send (struct neighbour *neigh, struct sk_buff *skb)
 
int neigh_update (struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags)
 
void neigh_changeaddr (struct neigh_table *tbl, struct net_device *dev)
 
int neigh_ifdown (struct neigh_table *tbl, struct net_device *dev)
 
int neigh_resolve_output (struct neighbour *neigh, struct sk_buff *skb)
 
int neigh_connected_output (struct neighbour *neigh, struct sk_buff *skb)
 
int neigh_compat_output (struct neighbour *neigh, struct sk_buff *skb)
 
int neigh_direct_output (struct neighbour *neigh, struct sk_buff *skb)
 
struct neighbourneigh_event_ns (struct neigh_table *tbl, u8 *lladdr, void *saddr, struct net_device *dev)
 
struct neigh_parmsneigh_parms_alloc (struct net_device *dev, struct neigh_table *tbl)
 
void neigh_parms_release (struct neigh_table *tbl, struct neigh_parms *parms)
 
unsigned long neigh_rand_reach_time (unsigned long base)
 
void pneigh_enqueue (struct neigh_table *tbl, struct neigh_parms *p, struct sk_buff *skb)
 
struct pneigh_entrypneigh_lookup (struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat)
 
struct pneigh_entry__pneigh_lookup (struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev)
 
int pneigh_delete (struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev)
 
void neigh_app_ns (struct neighbour *n)
 
void neigh_for_each (struct neigh_table *tbl, void(*cb)(struct neighbour *, void *), void *cookie)
 
void __neigh_for_each_release (struct neigh_table *tbl, int(*cb)(struct neighbour *))
 
void pneigh_for_each (struct neigh_table *tbl, void(*cb)(struct pneigh_entry *))
 
voidneigh_seq_start (struct seq_file *, loff_t *, struct neigh_table *, unsigned int)
 
voidneigh_seq_next (struct seq_file *, void *, loff_t *)
 
void neigh_seq_stop (struct seq_file *, void *)
 
int neigh_sysctl_register (struct net_device *dev, struct neigh_parms *p, char *p_name, proc_handler *proc_handler)
 
void neigh_sysctl_unregister (struct neigh_parms *p)
 

Macro Definition Documentation

#define LOCALLY_ENQUEUED   0x1

Definition at line 388 of file neighbour.h.

#define NEIGH_CACHE_STAT_INC (   tbl,
  field 
)    this_cpu_inc((tbl)->stats->field)

Definition at line 91 of file neighbour.h.

#define NEIGH_CB (   skb)    ((struct neighbour_cb *)(skb)->cb)

Definition at line 390 of file neighbour.h.

#define neigh_hold (   n)    atomic_inc(&(n)->refcnt)

Definition at line 310 of file neighbour.h.

#define NEIGH_NUM_HASH_RND   4

Definition at line 142 of file neighbour.h.

#define NEIGH_PRIV_ALIGN   sizeof(long long)

Definition at line 183 of file neighbour.h.

#define NEIGH_SEQ_IS_PNEIGH   0x00000002

Definition at line 269 of file neighbour.h.

#define NEIGH_SEQ_NEIGH_ONLY   0x00000001

Definition at line 268 of file neighbour.h.

#define NEIGH_SEQ_SKIP_NOARP   0x00000004

Definition at line 270 of file neighbour.h.

#define NEIGH_UPDATE_F_ADMIN   0x80000000

Definition at line 195 of file neighbour.h.

#define NEIGH_UPDATE_F_ISROUTER   0x40000000

Definition at line 194 of file neighbour.h.

#define NEIGH_UPDATE_F_OVERRIDE   0x00000001

Definition at line 191 of file neighbour.h.

#define NEIGH_UPDATE_F_OVERRIDE_ISROUTER   0x00000004

Definition at line 193 of file neighbour.h.

#define NEIGH_UPDATE_F_WEAK_OVERRIDE   0x00000002

Definition at line 192 of file neighbour.h.

#define NUD_CONNECTED   (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE)

Definition at line 36 of file neighbour.h.

#define NUD_IN_TIMER   (NUD_INCOMPLETE|NUD_REACHABLE|NUD_DELAY|NUD_PROBE)

Definition at line 34 of file neighbour.h.

Definition at line 35 of file neighbour.h.

Function Documentation

struct neighbour* __neigh_create ( struct neigh_table tbl,
const void pkey,
struct net_device dev,
bool  want_ref 
)
read

Definition at line 477 of file neighbour.c.

int __neigh_event_send ( struct neighbour neigh,
struct sk_buff skb 
)

Definition at line 974 of file neighbour.c.

void __neigh_for_each_release ( struct neigh_table tbl,
int(*)(struct neighbour *)  cb 
)

Definition at line 2366 of file neighbour.c.

struct pneigh_entry* __pneigh_lookup ( struct neigh_table tbl,
struct net net,
const void key,
struct net_device dev 
)
read

Definition at line 591 of file neighbour.c.

void neigh_app_ns ( struct neighbour n)
void neigh_changeaddr ( struct neigh_table tbl,
struct net_device dev 
)

Definition at line 257 of file neighbour.c.

int neigh_compat_output ( struct neighbour neigh,
struct sk_buff skb 
)

Definition at line 1279 of file neighbour.c.

int neigh_connected_output ( struct neighbour neigh,
struct sk_buff skb 
)

Definition at line 1338 of file neighbour.c.

void neigh_destroy ( struct neighbour neigh)

Definition at line 712 of file neighbour.c.

int neigh_direct_output ( struct neighbour neigh,
struct sk_buff skb 
)

Definition at line 1361 of file neighbour.c.

struct neighbour* neigh_event_ns ( struct neigh_table tbl,
u8 lladdr,
void saddr,
struct net_device dev 
)
read

Definition at line 1243 of file neighbour.c.

void neigh_for_each ( struct neigh_table tbl,
void(*)(struct neighbour *, void *)  cb,
void cookie 
)

Definition at line 2343 of file neighbour.c.

int neigh_ifdown ( struct neigh_table tbl,
struct net_device dev 
)

Definition at line 265 of file neighbour.c.

struct neighbour* neigh_lookup ( struct neigh_table tbl,
const void pkey,
struct net_device dev 
)
read

Definition at line 416 of file neighbour.c.

struct neighbour* neigh_lookup_nodev ( struct neigh_table tbl,
struct net net,
const void pkey 
)
read

Definition at line 446 of file neighbour.c.

struct neigh_parms* neigh_parms_alloc ( struct net_device dev,
struct neigh_table tbl 
)
read

Definition at line 1442 of file neighbour.c.

void neigh_parms_release ( struct neigh_table tbl,
struct neigh_parms parms 
)

Definition at line 1486 of file neighbour.c.

unsigned long neigh_rand_reach_time ( unsigned long  base)

Definition at line 124 of file neighbour.c.

int neigh_resolve_output ( struct neighbour neigh,
struct sk_buff skb 
)

Definition at line 1296 of file neighbour.c.

void* neigh_seq_next ( struct seq_file ,
void ,
loff_t *   
)
void* neigh_seq_start ( struct seq_file ,
loff_t *  ,
struct neigh_table ,
unsigned  int 
)
void neigh_seq_stop ( struct seq_file ,
void  
)
int neigh_sysctl_register ( struct net_device dev,
struct neigh_parms p,
char p_name,
proc_handler proc_handler 
)
void neigh_sysctl_unregister ( struct neigh_parms p)
int neigh_table_clear ( struct neigh_table tbl)

Definition at line 1578 of file neighbour.c.

void neigh_table_init ( struct neigh_table tbl)

Definition at line 1556 of file neighbour.c.

int neigh_update ( struct neighbour neigh,
const u8 lladdr,
u8  new,
u32  flags 
)

Definition at line 1082 of file neighbour.c.

int pneigh_delete ( struct neigh_table tbl,
struct net net,
const void key,
struct net_device dev 
)

Definition at line 649 of file neighbour.c.

void pneigh_enqueue ( struct neigh_table tbl,
struct neigh_parms p,
struct sk_buff skb 
)

Definition at line 1401 of file neighbour.c.

void pneigh_for_each ( struct neigh_table tbl,
void(*)(struct pneigh_entry *)  cb 
)
struct pneigh_entry* pneigh_lookup ( struct neigh_table tbl,
struct net net,
const void key,
struct net_device dev,
int  creat 
)
read

Definition at line 602 of file neighbour.c.