All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Italo Valcy <italo@dcc.ufba.br>
Cc: netfilter@vger.kernel.org
Subject: Re: Time counter of connections (libnetfilter-conntrack?)
Date: Sat, 16 Oct 2010 10:22:00 +0200	[thread overview]
Message-ID: <4CB960A8.3070001@netfilter.org> (raw)
In-Reply-To: <4CB924EC.3090906@dcc.ufba.br>

On 16/10/10 06:07, Italo Valcy wrote:
> Hi guys!
> 
> Is there an way to get time counter of the connections using
> libnetfilter-conntrack? I mean, I'd like to know how long a connection
> had taken (since the state NEW to DESTROY).
> 
> Any ideias?

The Linux kernel does not track this connection lifetime, so you would
have to listen to NEW events, put the ct objects into some structure
(hashtable, tree, list, etc) and calculate the difference by yourself
once you receive DESTROY events.

It wouldn't be hard to extend the existing code to do this in kernel space.

  reply	other threads:[~2010-10-16  8:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16  4:07 Time counter of connections (libnetfilter-conntrack?) Italo Valcy
2010-10-16  8:22 ` Pablo Neira Ayuso [this message]
2010-10-16  9:28   ` Jan Engelhardt
2010-10-16 12:57     ` Italo Valcy
2010-10-16 17:59       ` Pablo Neira Ayuso
2010-10-16 18:09         ` Pablo Neira Ayuso
2010-10-16 18:12           ` Italo Valcy
2010-10-16 17:47     ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CB960A8.3070001@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=italo@dcc.ufba.br \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.