-#ifdef disabled
-
-/**
- * @name Utillities
- * @{
- */
-
-/**
- * Mark all objects in a cache
- * @arg cache Cache to mark all objects in
- */
-void nl_cache_mark_all(struct nl_cache *cache)
-{
- struct nl_object *obj;
-
- NL_DBG(2, "Marking all objects in cache %p <%s>...\n",
- cache, nl_cache_name(cache));
-
- nl_list_for_each_entry(obj, &cache->c_items, ce_list)
- nl_object_mark(obj);
-}
-
-/** @} */
-
-/**
- * @name Dumping
- * @{
- */
-/**
- * Dump all elements of a cache.
- * @arg cache cache to dump
- * @arg params dumping parameters
- *
- * Dumps all elements of the \a cache to the file descriptor \a fd.
- */
-void nl_cache_dump(struct nl_cache *cache, struct nl_dump_params *params)
-{
- nl_cache_dump_filter(cache, params, NULL);
-}
-
-/**
- * Dump all elements of a cache (filtered).
- * @arg cache cache to dump
- * @arg params dumping parameters (optional)
- * @arg filter filter object
- *
- * Dumps all elements of the \a cache to the file descriptor \a fd
- * given they match the given filter \a filter.
- */
-void nl_cache_dump_filter(struct nl_cache *cache,
- struct nl_dump_params *params,
- struct nl_object *filter)
-{
- int type = params ? params->dp_type : NL_DUMP_DETAILS;
- struct nl_object_ops *ops;
- struct nl_object *obj;
-
- NL_DBG(2, "Dumping cache %p <%s> filter %p\n",
- cache, nl_cache_name(cache), filter);
-
- if (type > NL_DUMP_MAX || type < 0)
- BUG();
-
- if (cache->c_ops == NULL)
- BUG();
-
- ops = cache->c_ops->co_obj_ops;
- if (!ops->oo_dump[type])
- return;
-
- nl_list_for_each_entry(obj, &cache->c_items, ce_list) {
- if (filter && !nl_object_match_filter(obj, filter))
- continue;
-
- NL_DBG(4, "Dumping object %p...\n", obj);
- dump_from_ops(obj, params);
- }
-}
-
-/** @} */
-
-/**
- * @name Iterators
- * @{
- */
-
-/**
- * Call a callback on each element of the cache.
- * @arg cache cache to iterate on
- * @arg cb callback function
- * @arg arg argument passed to callback function
- *
- * Calls a callback function \a cb on each element of the \a cache.
- * The argument \a arg is passed on the callback function.
- */
-void nl_cache_foreach(struct nl_cache *cache,
- void (*cb)(struct nl_object *, void *), void *arg)
-{
- nl_cache_foreach_filter(cache, NULL, cb, arg);
-}
-
-/**
- * Call a callback on each element of the cache (filtered).
- * @arg cache cache to iterate on
- * @arg filter filter object
- * @arg cb callback function
- * @arg arg argument passed to callback function
- *
- * Calls a callback function \a cb on each element of the \a cache
- * that matches the \a filter. The argument \a arg is passed on
- * to the callback function.
- */
-void nl_cache_foreach_filter(struct nl_cache *cache, struct nl_object *filter,
- void (*cb)(struct nl_object *, void *), void *arg)
-{
- struct nl_object *obj, *tmp;
- struct nl_object_ops *ops;
-
- if (cache->c_ops == NULL)
- BUG();
-
- ops = cache->c_ops->co_obj_ops;
-
- nl_list_for_each_entry_safe(obj, tmp, &cache->c_items, ce_list) {
- if (filter && !nl_object_match_filter(obj, filter))
- continue;
-
- cb(obj, arg);
- }
-}
-
-/** @} */
-#endif
-
-/** @} */