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

int nl_cache_mngt_unregister ( struct nl_cache_ops ops  ) 

Unregister a set of cache operations

  • ops cache operations
Called by users of caches to announce a set of cache operations is no longer available. The specified cache operations must have been registered previously using nl_cache_mngt_register()

Returns:
0 on success or a negative error code

Definition at line 158 of file cache_mngt.c.

References nl_cache_ops::co_name, and nl_cache_ops::co_next.

Referenced by genl_unregister().

{
      struct nl_cache_ops *t, **tp;

      for (tp = &cache_ops; (t=*tp) != NULL; tp = &t->co_next)
            if (t == ops)
                  break;

      if (!t)
            return -NLE_NOCACHE;

      NL_DBG(1, "Unregistered cache operations %s\n", ops->co_name);

      *tp = t->co_next;
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index