]> granicus.if.org Git - libnl/commit
netfilter/ct: support optional CTA_TIMESTAMP attribute
authorHolger Eitzenberger <holger@eitzenberger.org>
Fri, 30 Aug 2013 08:50:22 +0000 (10:50 +0200)
committerThomas Graf <tgraf@suug.ch>
Thu, 5 Sep 2013 15:38:59 +0000 (17:38 +0200)
commit56d2bbe173b41913cf4b701d812ce2d39a86612c
treef1a3f32009450adf444534b1f63e9241a2a7ec39
parent8a4f16b5bffd32c53af1eb273b657273a794c18e
netfilter/ct: support optional CTA_TIMESTAMP attribute

Recent kernels support conntrack time stamping, which is a helpful
feature to determine the duration of a flow without building a flow
cache in your user space application, just to keep the 'start' time of
your flow.

Timestamps are recorded with nanosecond resolution once this feature
is enabled.

This patch adds optional support for the CTA_TIMESTAMP, then
modifies the dump routine to write that info in a format similar
to /proc/net/nf_conntrack.  This is an example output when using
NL_DUMP_LINE:

  udp 10.128.128.28:56836 <-> 10.128.129.255:8612 delta-time 30

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
include/netlink-private/netlink.h
include/netlink-private/types.h
include/netlink/netfilter/ct.h
lib/netfilter/ct.c
lib/netfilter/ct_obj.c