netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Cedrix" <netfilter@cedrix.com>
To: <netfilter-devel@lists.netfilter.org>
Subject: conntrack: Connection close event?
Date: Wed, 22 Aug 2007 20:01:24 +0200	[thread overview]
Message-ID: <004501c7e4e6$74509e80$1700a8c0@xcony13> (raw)

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--] 

             reply	other threads:[~2007-08-22 18:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-22 18:01 Cedrix [this message]
2007-08-22 19:10 ` conntrack: Connection close event? Krzysztof Oledzki
2007-08-22 23:17   ` Cedrix
2007-08-22 21:48 ` Eric Leblond

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='004501c7e4e6$74509e80$1700a8c0@xcony13' \
    --to=netfilter@cedrix.com \
    --cc=netfilter-devel@lists.netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).