Home | History | Annotate | Download | only in route

Lines Matching defs:cache

62 static int class_request_update(struct nl_cache *cache, struct nl_sock *sk)
66 .tcm_ifindex = cache->c_iarg1,
217 * @name Cache Management
222 * Build a class cache including all classes attached to the specified interface
227 * Allocates a new cache, initializes it properly and updates it to
230 * @return The cache or NULL if an error has occured.
235 struct nl_cache * cache;
238 cache = nl_cache_alloc(&rtnl_class_ops);
239 if (!cache)
242 cache->c_iarg1 = ifindex;
244 if (sk && (err = nl_cache_refill(sk, cache)) < 0) {
245 nl_cache_free(cache);
249 *result = cache;
254 * Look up class by its handle in the provided cache
255 * @arg cache class cache
258 * @return pointer to class inside the cache or NULL if no match was found.
260 struct rtnl_class *rtnl_class_get(struct nl_cache *cache, int ifindex,
265 if (cache->c_ops != &rtnl_class_ops)
268 nl_list_for_each_entry(class, &cache->c_items, ce_list) {