libnl 3.7.0

Cache Management

int rtnl_netconf_alloc_cache (struct nl_sock *sk, struct nl_cache **result)
 
struct rtnl_netconf * rtnl_netconf_get_by_idx (struct nl_cache *cache, int family, int ifindex)
 Search netconf in cache. More...
 
void rtnl_netconf_put (struct rtnl_netconf *nc)
 
struct rtnl_netconf * rtnl_netconf_get_all (struct nl_cache *cache, int family)
 Search netconf in cache. More...
 
struct rtnl_netconf * rtnl_netconf_get_default (struct nl_cache *cache, int family)
 Search netconf in cache. More...
 

Attributes

int rtnl_netconf_get_family (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_ifindex (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_forwarding (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_mc_forwarding (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_rp_filter (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_proxy_neigh (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_ignore_routes_linkdown (struct rtnl_netconf *nc, int *val)
 
int rtnl_netconf_get_input (struct rtnl_netconf *nc, int *val)
 

Detailed Description

Function Documentation

◆ rtnl_netconf_alloc_cache()

int rtnl_netconf_alloc_cache ( struct nl_sock *  sk,
struct nl_cache **  result 
)

Definition at line 345 of file netconf.c.

◆ rtnl_netconf_get_by_idx()

struct rtnl_netconf * rtnl_netconf_get_by_idx ( struct nl_cache *  cache,
int  family,
int  ifindex 
)

Search netconf in cache.

Parameters
cachenetconf cache
familyAddress family of interest
ifindexInterface index of interest

Searches netconf cache previously allocated with rtnl_netconf_alloc_cache() for given index and family

The reference counter is incremented before returning the netconf entry, therefore the reference must be given back with rtnl_netconf_put() after usage.

Returns
netconf object or NULL if no match was found.

Definition at line 365 of file netconf.c.

References nl_object_get().

Referenced by rtnl_netconf_get_all(), and rtnl_netconf_get_default().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtnl_netconf_put()

void rtnl_netconf_put ( struct rtnl_netconf *  nc)

Definition at line 384 of file netconf.c.

◆ rtnl_netconf_get_all()

struct rtnl_netconf * rtnl_netconf_get_all ( struct nl_cache *  cache,
int  family 
)

Search netconf in cache.

Parameters
cachenetconf cache
familyAddress family of interest

Searches netconf cache previously allocated with rtnl_netconf_alloc_cache() for "all" netconf settings for given family

The reference counter is incremented before returning the netconf entry, therefore the reference must be given back with rtnl_netconf_put() after usage.

Returns
netconf object or NULL if no match was found.

Definition at line 403 of file netconf.c.

References rtnl_netconf_get_by_idx().

+ Here is the call graph for this function:

◆ rtnl_netconf_get_default()

struct rtnl_netconf * rtnl_netconf_get_default ( struct nl_cache *  cache,
int  family 
)

Search netconf in cache.

Parameters
cachenetconf cache
familyAddress family of interest

Searches netconf cache previously allocated with rtnl_netconf_alloc_cache() for "default" netconf settings for given family

The reference counter is incremented before returning the netconf entry, therefore the reference must be given back with rtnl_netconf_put() after usage.

Returns
netconf object or NULL if no match was found.

Definition at line 422 of file netconf.c.

References rtnl_netconf_get_by_idx().

+ Here is the call graph for this function:

◆ rtnl_netconf_get_family()

int rtnl_netconf_get_family ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 434 of file netconf.c.

◆ rtnl_netconf_get_ifindex()

int rtnl_netconf_get_ifindex ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 444 of file netconf.c.

◆ rtnl_netconf_get_forwarding()

int rtnl_netconf_get_forwarding ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 454 of file netconf.c.

◆ rtnl_netconf_get_mc_forwarding()

int rtnl_netconf_get_mc_forwarding ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 464 of file netconf.c.

◆ rtnl_netconf_get_rp_filter()

int rtnl_netconf_get_rp_filter ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 474 of file netconf.c.

◆ rtnl_netconf_get_proxy_neigh()

int rtnl_netconf_get_proxy_neigh ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 484 of file netconf.c.

◆ rtnl_netconf_get_ignore_routes_linkdown()

int rtnl_netconf_get_ignore_routes_linkdown ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 494 of file netconf.c.

◆ rtnl_netconf_get_input()

int rtnl_netconf_get_input ( struct rtnl_netconf *  nc,
int *  val 
)

Definition at line 504 of file netconf.c.