netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
neigh.c File Reference
Include dependency graph for neigh.c:

Macros

#define NEIGH_DIFF(ATTR, EXPR)   ATTR_DIFF(attrs, NEIGH_ATTR_##ATTR, a, b, EXPR)
 

Functions

Neighbour Object Allocation/Freeage
struct rtnl_neighrtnl_neigh_alloc (void)
 
void rtnl_neigh_put (struct rtnl_neigh *neigh)
 
Neighbour Cache Managament
int rtnl_neigh_alloc_cache (struct nl_sock *sock, struct nl_cache **result)
 Build a neighbour cache including all neighbours currently configured in the kernel. More...
 
struct rtnl_neighrtnl_neigh_get (struct nl_cache *cache, int ifindex, struct nl_addr *dst)
 Look up a neighbour by interface index and destination address. More...
 
Neighbour Addition
int rtnl_neigh_build_add_request (struct rtnl_neigh *tmpl, int flags, struct nl_msg **result)
 Build netlink request message to add a new neighbour. More...
 
int rtnl_neigh_add (struct nl_sock *sk, struct rtnl_neigh *tmpl, int flags)
 Add a new neighbour. More...
 
Neighbour Deletion
int rtnl_neigh_build_delete_request (struct rtnl_neigh *neigh, int flags, struct nl_msg **result)
 Build a netlink request message to delete a neighbour. More...
 
int rtnl_neigh_delete (struct nl_sock *sk, struct rtnl_neigh *neigh, int flags)
 Delete a neighbour. More...
 
Attributes
void rtnl_neigh_set_state (struct rtnl_neigh *neigh, int state)
 
int rtnl_neigh_get_state (struct rtnl_neigh *neigh)
 
void rtnl_neigh_unset_state (struct rtnl_neigh *neigh, int state)
 
void rtnl_neigh_set_flags (struct rtnl_neigh *neigh, unsigned int flags)
 
unsigned int rtnl_neigh_get_flags (struct rtnl_neigh *neigh)
 
void rtnl_neigh_unset_flags (struct rtnl_neigh *neigh, unsigned int flags)
 
void rtnl_neigh_set_ifindex (struct rtnl_neigh *neigh, int ifindex)
 
int rtnl_neigh_get_ifindex (struct rtnl_neigh *neigh)
 
void rtnl_neigh_set_lladdr (struct rtnl_neigh *neigh, struct nl_addr *addr)
 
struct nl_addrrtnl_neigh_get_lladdr (struct rtnl_neigh *neigh)
 
int rtnl_neigh_set_dst (struct rtnl_neigh *neigh, struct nl_addr *addr)
 
struct nl_addrrtnl_neigh_get_dst (struct rtnl_neigh *neigh)
 
void rtnl_neigh_set_family (struct rtnl_neigh *neigh, int family)
 
int rtnl_neigh_get_family (struct rtnl_neigh *neigh)
 
void rtnl_neigh_set_type (struct rtnl_neigh *neigh, int type)
 
int rtnl_neigh_get_type (struct rtnl_neigh *neigh)
 

Neighbour States Translations

char * rtnl_neigh_state2str (int state, char *buf, size_t len)
 
int rtnl_neigh_str2state (const char *name)
 

Neighbour Flags Translations

char * rtnl_neigh_flags2str (int flags, char *buf, size_t len)
 
int rtnl_neigh_str2flag (const char *name)
 

Macro Definition Documentation

#define NEIGH_DIFF (   ATTR,
  EXPR 
)    ATTR_DIFF(attrs, NEIGH_ATTR_##ATTR, a, b, EXPR)