Hi,
this is my first request. I checked google, nf-faqs and conntrack-homepage
without sufficient results for this problem:
In Short: I need to know when a connection (TCP or UDP) gets closed. I want
to use conntrack, because I can track UDP more easily.
My thoughts so far: The /proc/net/ip_conntrack reacts very quick when a
close happens, but it's not conveniant to check in my C/C++ application. So,
in further reading I 've seen in the source some kind of "event-handling".
(Listening Event for new connection, etc.)
My question: What's the best method to see if a connection gets closed.
(Also, connection opened).
Btw: I use iptables -I FORWARD -m -state --NEW -m --LOG -log-prefix "New
Connection established: " to log established connections, so it would be
nice (but not necessary) if I can use the LOG for closing-connections, too -
OR alternatively - use a conntrack-event for detecting NEW connections, too.
Any help or comment is appreciated! Thanks.
Cedrix.
[--XCN-SF--]
this is my first request. I checked google, nf-faqs and conntrack-homepage
without sufficient results for this problem:
In Short: I need to know when a connection (TCP or UDP) gets closed. I want
to use conntrack, because I can track UDP more easily.
My thoughts so far: The /proc/net/ip_conntrack reacts very quick when a
close happens, but it's not conveniant to check in my C/C++ application. So,
in further reading I 've seen in the source some kind of "event-handling".
(Listening Event for new connection, etc.)
My question: What's the best method to see if a connection gets closed.
(Also, connection opened).
Btw: I use iptables -I FORWARD -m -state --NEW -m --LOG -log-prefix "New
Connection established: " to log established connections, so it would be
nice (but not necessary) if I can use the LOG for closing-connections, too -
OR alternatively - use a conntrack-event for detecting NEW connections, too.
Any help or comment is appreciated! Thanks.
Cedrix.
[--XCN-SF--]