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

struct nl_cache* nl_cache_mngt_require ( const char *  name  )  [read]

Demand the use of a global cache

  • name name of the required object type
Trys to find a cache of the specified type for global use.

A cache provided by another subsystem of the specified type marked to be available.

Definition at line 229 of file cache_mngt.c.

References nl_cache_ops::co_major_cache, and nl_cache_ops_lookup().

Referenced by route_dump_brief().

      struct nl_cache_ops *ops;

      ops = nl_cache_ops_lookup(name);
      if (!ops || !ops->co_major_cache) {
            fprintf(stderr, "Application BUG: Your application must "
                  "call nl_cache_mngt_provide() and\nprovide a valid "
                  "%s cache to be used for internal lookups.\nSee the "
                  " API documentation for more details.\n", name);

            return NULL;
      return ops->co_major_cache;

Generated by  Doxygen 1.6.0   Back to index