libnl  3.2.3
Controller

Functions

int genl_ctrl_resolve (struct nl_sock *sk, const char *name)
 Resolve generic netlink family name to its identifier.
int genl_ctrl_resolve_grp (struct nl_sock *sk, const char *family_name, const char *grp_name)

Cache Management

int genl_ctrl_alloc_cache (struct nl_sock *sock, struct nl_cache **result)
struct genl_family * genl_ctrl_search (struct nl_cache *cache, int id)
 Look up generic netlink family by id in the provided cache.

Resolver

struct genl_family * genl_ctrl_search_by_name (struct nl_cache *cache, const char *name)
 Look up generic netlink family by family name in the provided cache.

Function Documentation

struct genl_family* genl_ctrl_search ( struct nl_cache *  cache,
int  id 
) [read]

Look up generic netlink family by id in the provided cache.

Parameters:
cacheGeneric netlink family cache.
idFamily identifier.

Searches through the cache looking for a registered family matching the specified identifier. The caller will own a reference on the returned object which needs to be given back after usage using genl_family_put().

Returns:
Generic netlink family object or NULL if no match was found.

Definition at line 198 of file ctrl.c.

References nl_object_get().

+ Here is the call graph for this function:

struct genl_family* genl_ctrl_search_by_name ( struct nl_cache *  cache,
const char *  name 
) [read]

Look up generic netlink family by family name in the provided cache.

Parameters:
cacheGeneric netlink family cache.
nameFamily name.

Searches through the cache looking for a registered family matching the specified name. The caller will own a reference on the returned object which needs to be given back after usage using genl_family_put().

Returns:
Generic netlink family object or NULL if no match was found.

Definition at line 232 of file ctrl.c.

References nl_object_get().

Referenced by genl_ctrl_resolve().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int genl_ctrl_resolve ( struct nl_sock *  sk,
const char *  name 
)

Resolve generic netlink family name to its identifier.

Parameters:
skNetlink socket.
nameName of generic netlink family

Resolves the generic netlink family name to its identifer and returns it.

Returns:
A positive identifier or a negative error code.

Definition at line 262 of file ctrl.c.

References genl_ctrl_search_by_name(), and nl_cache_free().

+ Here is the call graph for this function: