Logo Search packages:      
Sourcecode: libnl version File versions  Download package

int genl_ctrl_resolve ( struct nl_handle handle,
const char *  name 

Resolve generic netlink family name to its identifier

  • handle Netlink Handle
  • name Name of generic netlink family

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

A positive identifier or a negative error code.

Definition at line 238 of file ctrl.c.

References genl_ctrl_search_by_name(), nl_cache_free(), and nl_get_errno().

      struct nl_cache *cache;
      struct genl_family *family;
      int err;

      cache = genl_ctrl_alloc_cache(handle);
      if (cache == NULL)
            return nl_get_errno();

      family = genl_ctrl_search_by_name(cache, name);
      if (family == NULL) {
            err = nl_error(ENOENT, "Generic Netlink Family not found");
            goto errout;

      err = genl_family_get_id(family);

      return err;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index