On Tue, 9 Dec 2003, Emmanuel Guiton wrote:
My problem is that I do not see which data can be accessed by any of the
function involved. To be precise, I need to increment a counter each
time I get one new conntrack. Then I decrement it each time a conntrack
is destroyed or set as assured (tcp connection).
Then the problem is a lot more complex.
Increasing is not a big problem, but the decreasing are as it is hard to
find which counter to decrease from the conntrack and there is no good
place to store such information for later without extending the
ip_conntrack structure unless you implement this as a conntrack
application protocol helper (can be done if no other conntrack helper is
needed in the relevant traffic).
Do you really need to decrease the counters?
I think there will remain two alternative ways to deal with the decrementing
counter problem: