Logo Search packages:      
Sourcecode: libnl version File versions  Download package

struct nl_cache* rtnl_neightbl_alloc_cache ( struct nl_handle handle ) [read]

Build a neighbour table cache including all neighbour tables currently configured in the kernel.

  • handle netlink handle

Allocates a new neighbour table cache, initializes it properly and updates it to include all neighbour tables currently configured in the kernel.

Note:
The caller is responsible for destroying and freeing the cache after using it.
Returns:
The new cache or NULL if an error occured.

Definition at line 407 of file neightbl.c.

References nl_cache_alloc(), nl_cache_free(), and nl_cache_refill().

{
      struct nl_cache * cache;
      
      cache = nl_cache_alloc(&rtnl_neightbl_ops);
      if (cache == NULL)
            return NULL;
      
      if (handle && nl_cache_refill(handle, cache) < 0) {
            nl_cache_free(cache);
            return NULL;
      }

      return cache;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index