Call a callback on each element of the cache (filtered).
Definition at line 808 of file cache.c. References nl_object_match_filter(). Referenced by nl_cache_foreach(), rtnl_class_foreach_child(), rtnl_class_foreach_cls(), rtnl_qdisc_foreach_child(), and rtnl_qdisc_foreach_cls(). { 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); } }
|