netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@gnumonks.org>
To: Andrew Beverley <andy@andybev.com>
Cc: "Miguel Alejandro González" <maggonzz@gmail.com>,
	netfilter-devel@vger.kernel.org
Subject: Re: help with conntrack
Date: Thu, 13 Sep 2012 00:07:36 +0200	[thread overview]
Message-ID: <20120912220736.GA17526@1984> (raw)
In-Reply-To: <1347478050.2349.202.camel@andrew-desktop>

On Wed, Sep 12, 2012 at 08:27:30PM +0100, Andrew Beverley wrote:
> On Tue, 2012-09-11 at 23:08 -0500, Miguel Alejandro González wrote:
> > Hello
> > 
> > I'm making a netfilter module and I need to have interaction with
> > conntrack, as I understand conntrack is a hash table of all connections
> > IPv4 and IPv6. I basically need to know how to do lookups, insertions an
> > deletions, can you tell me how do this? If you can give me some
> > documentation or code to see how conntrack works and how to achieve what I
> > need to do, that would be great
>
> The "Writing Netfilter Modules" should help you (see part II):
> http://inai.de/documents/Netfilter_Modules.pdf
> 
> Of course, there's also libnetfilter_conntrack which includes some good
> examples, although it's a userspace library.

This should also help to get an overall idea on how is implemented:

http://1984.lsi.us.es/~pablo/docs/login06.pdf

But you'll have to get ready to read Linux kernel code.

Start with net/netfilter/nf_conntrack_core.c

Good luck!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2012-09-12 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12  4:08 help with conntrack Miguel Alejandro González
2012-09-12 19:27 ` Andrew Beverley
2012-09-12 22:07   ` Pablo Neira Ayuso [this message]

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=20120912220736.GA17526@1984 \
    --to=pablo@gnumonks.org \
    --cc=andy@andybev.com \
    --cc=maggonzz@gmail.com \
    --cc=netfilter-devel@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 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).