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

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

Build a conntrack cache holding all conntrack currently in the kernel

  • handle netlink handle
Allocates a new cache, initializes it properly and updates it to contain all conntracks currently in the kernel.

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

Definition at line 407 of file ct.c.

References nl_cache_alloc(), and nl_cache_refill().

      struct nl_cache *cache;

      cache = nl_cache_alloc(&nfnl_ct_ops);
      if (!cache)
            return NULL;

      if (handle && nl_cache_refill(handle, cache) < 0) {
            return NULL;

      return cache;

Generated by  Doxygen 1.6.0   Back to index