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

int nl_object_alloc_name ( const char *  kind,
struct nl_object **  result 

Allocate a new object of kind specified by the name

  • kind name of object type
    The new object or nULL

Definition at line 70 of file object.c.

References nl_cache_ops::co_obj_ops, nl_cache_ops_lookup(), and nl_object_alloc().

      struct nl_cache_ops *ops;

      ops = nl_cache_ops_lookup(kind);
      if (!ops)
            return -NLE_OPNOTSUPP;

      if (!(*result = nl_object_alloc(ops->co_obj_ops)))
            return -NLE_NOMEM;

      return 0;

Generated by  Doxygen 1.6.0   Back to index