Functions | |
int | genl_ctrl_resolve (struct nl_sock *sk, const char *name) |
Resolve generic netlink family name to its identifier. More... | |
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. More... | |
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. More... | |
References nl_cache_alloc_and_fill().
Referenced by genl_ctrl_resolve(), genl_mngt_resolve(), and genl_ops_resolve().
Resolve generic netlink family name to its identifier.
Resolves the generic netlink family name to its identifer and returns it.
References genl_ctrl_alloc_cache(), genl_ctrl_search_by_name(), genl_family_get_id(), genl_family_put(), nl_cache_free(), NLE_OBJ_NOTFOUND, and NULL.
struct genl_family* genl_ctrl_search | ( | struct nl_cache * | cache, |
int | id | ||
) |
Look up generic netlink family by id in the provided cache.
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().
References BUG, nl_cache::c_items, nl_cache::c_ops, genl_family::gf_id, nl_list_for_each_entry, nl_object_get(), and NULL.
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.
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().
References BUG, nl_cache::c_items, nl_cache::c_ops, genl_family::gf_name, nl_list_for_each_entry, nl_object_get(), and NULL.
Referenced by genl_ctrl_resolve().