- Parameters
-
Allocates a new cache, initializes it properly and updates it to contain all routes currently configured in the kernel.
- Note
- The caller is responsible for destroying and freeing the cache after using it.
- Returns
- The cache or NULL if an error has occured.
Definition at line 241 of file route.c.
References nl_cache_alloc(), nl_cache_mngt_register(), nl_cache_mngt_unregister(), nl_cache_refill(), nl_send_auto_complete(), nl_wait_for_ack(), nla_nest_end(), nla_nest_start(), NLA_PUT_ADDR, NLA_PUT_U32, NLM_F_CREATE, nlmsg_alloc_simple(), nlmsg_append(), nlmsg_free(), and RTNL_LINK_NOT_FOUND.
243 struct nl_cache *cache;
int nl_cache_refill(struct nl_handle *handle, struct nl_cache *cache)
(Re)fill a cache with the contents in the kernel.
struct nl_cache * nl_cache_alloc(struct nl_cache_ops *ops)
Allocate an empty cache.