Re: Time counter of connections (libnetfilter-conntrack?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux