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

int nl_cache_alloc_name ( const char *  kind,
struct nl_cache **  result 

Allocate an empty cache based on type name

  • kind Name of cache type
    A newly allocated and initialized cache.

Definition at line 212 of file cache.c.

References nl_cache_alloc(), and nl_cache_ops_lookup().

      struct nl_cache_ops *ops;
      struct nl_cache *cache;

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

      if (!(cache = nl_cache_alloc(ops)))
            return -NLE_NOMEM;

      *result = cache;
      return 0;

Generated by  Doxygen 1.6.0   Back to index