Defines | |
#define | NFNLMSG_CT_TYPE(type) NFNLMSG_TYPE(NFNL_SUBSYS_CTNETLINK, (type)) |
Functions | |
int | nfnlmsg_ct_group (struct nlmsghdr *nlh) |
struct nfnl_ct * | nfnlmsg_ct_parse (struct nlmsghdr *nlh) |
int | nfnl_ct_dump_request (struct nl_handle *h) |
Cache Management | |
| |
struct nl_cache * | nfnl_ct_alloc_cache (struct nl_handle *handle) |
Build a conntrack cache holding all conntrack currently in the kernel. |
struct nl_cache* nfnl_ct_alloc_cache | ( | struct nl_handle * | handle | ) | [read] |
handle | netlink handle |
Allocates a new cache, initializes it properly and updates it to contain all conntracks currently in the kernel.
Definition at line 407 of file ct.c.
References nl_cache_alloc(), and nl_cache_refill().
00408 { 00409 struct nl_cache *cache; 00410 00411 cache = nl_cache_alloc(&nfnl_ct_ops); 00412 if (!cache) 00413 return NULL; 00414 00415 if (handle && nl_cache_refill(handle, cache) < 0) { 00416 free(cache); 00417 return NULL; 00418 } 00419 00420 return cache; 00421 }