FIB Lookup
[Netlink Families]


Modules

 Request

Function Documentation

struct nl_cache* flnl_result_alloc_cache ( void   )  [read]

Allocates a new lookup result cache and initializes it properly.

Note:
Free the memory after usage using nl_cache_destroy_and_free().
Returns:
Newly allocated cache or NULL if an error occured.

Definition at line 183 of file lookup.c.

References nl_cache_alloc().

struct nl_msg* flnl_lookup_build_request ( struct flnl_request *  req,
int  flags 
) [read]

Parameters:
req Requested match.
flags additional netlink message flags
Builds a new netlink message requesting a change of link attributes. The netlink message header isn't fully equipped with all relevant fields and must be sent out via nl_send_auto_complete() or supplemented as needed. old must point to a link currently configured in the kernel and tmpl must contain the attributes to be changed set via rtnl_link_set_* functions.

Returns:
New netlink message
Note:
Not all attributes can be changed, see Changeable Attributes for more details.

Definition at line 212 of file lookup.c.

References nl_addr_get_binary_addr(), nlmsg_alloc_simple(), nlmsg_append(), and nlmsg_free().

Referenced by flnl_lookup().

int flnl_lookup ( struct nl_handle *  handle,
struct flnl_request *  req,
struct nl_cache *  cache 
)

Parameters:
handle Netlink handle.
req Lookup request object.
cache Cache for result.
Builds a netlink message to request a FIB lookup, waits for the reply and adds the result to the specified cache.

Returns:
0 on success or a negative error code.

Definition at line 263 of file lookup.c.

References flnl_lookup_build_request(), nl_cache_pickup(), nl_send_auto_complete(), and nlmsg_free().


Generated on Thu May 28 01:01:27 2009 for libnl by  doxygen 1.5.7.1