Home | History | Annotate | Download | only in route

Lines Matching defs:cache

80  * // the kernel and put them into a cache.
81 * struct nl_cache *cache = rtnl_link_alloc_cache(sk);
85 * struct rtnl_link *link = rtnl_link_get_by_name(cache, "lo");
89 * int ifindex = rtnl_link_name2i(cache, "lo");
90 * struct rtnl_link *link = rtnl_link_get(cache, ifindex);
92 * // After successful usage, the object must be given back to the cache
110 * struct rtnl_link *old = rtnl_link_get(cache, "eth0");
425 static int link_request_update(struct nl_cache *cache, struct nl_sock *sk)
433 struct nl_cache *cache = dp_cache(obj);
443 struct rtnl_link *master = rtnl_link_get(cache, link->l_master);
454 struct rtnl_link *ll = rtnl_link_get(cache, link->l_link);
572 struct nl_cache *cache = dp_cache(obj);
597 struct rtnl_link *ll = rtnl_link_get(cache, link->l_link);
607 struct rtnl_link *master = rtnl_link_get(cache, link->l_master);
761 * @name Cache Management
767 * Allocate link cache and fill in all configured links.
769 * @arg result Pointer to store resulting cache.
771 * Allocates a new link cache, initializes it properly and updates it
782 * Look up link by interface index in the provided cache
783 * @arg cache link cache
789 * @return pointer to link inside the cache or NULL if no match was found.
791 struct rtnl_link *rtnl_link_get(struct nl_cache *cache, int ifindex)
795 if (cache->c_ops != &rtnl_link_ops)
798 nl_list_for_each_entry(link, &cache->c_items, ce_list) {
809 * Look up link by link name in the provided cache
810 * @arg cache link cache
816 * @return pointer to link inside the cache or NULL if no match was found.
818 struct rtnl_link *rtnl_link_get_by_name(struct nl_cache *cache,
823 if (cache->c_ops != &rtnl_link_ops)
826 nl_list_for_each_entry(link, &cache->c_items, ce_list) {
971 * @arg cache link cache
981 char * rtnl_link_i2name(struct nl_cache *cache, int ifindex, char *dst,
984 struct rtnl_link *link = rtnl_link_get(cache, ifindex);
997 * @arg cache link cache
1002 int rtnl_link_name2i(struct nl_cache *cache, const char *name)
1007 link = rtnl_link_get_by_name(cache, name);