netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Deepak Jangid <deepak_jangid1987@yahoo.co.in>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: Regarding connection mappings to module data structures
Date: Thu, 14 Jun 2012 20:27:50 +0200	[thread overview]
Message-ID: <20120614182750.GA10798@1984> (raw)
In-Reply-To: <1339654713.58676.YahooMailNeo@web193406.mail.sg3.yahoo.com>

On Thu, Jun 14, 2012 at 02:18:33PM +0800, Deepak Jangid wrote:
> Hello Netfilter team,
>  
> I am seeking an infrastructure for mapping
> conntrack(struct nf_conn) to a module private data structure as a context for
> every connection.
> I could not find any such.
>  
> I can add the private info when I see a new connection.
> conntrack destroy events can be caught to destroy the
> private structure.
> But the thing is there is no mechanism to store the
> private info mapped to a connection. Either I will have to maintain
> hash-tables, which is highly irrelevant, or edit the nf_conn which seems a
> better way.
>  
> What I was thinking is to have a list_head or a pointer
> to a structure in nf_conn which can handle such scenarios.
>  
> Does this seems generic ? Well yes there is
> conntrack_extend, but it is not generic to be usable by other modules.

It's hard to understand what you need since you don't provide any
information on what you want to do.

But my guess is that conntrack extensions is what you want. See
net/netfilter/nf_conntrack_extend.c and
net/netfilter/nf_conntrack_timestamp.c for one example.
--
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-06-14 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14  6:18 Regarding connection mappings to module data structures Deepak Jangid
2012-06-14 18:27 ` Pablo Neira Ayuso [this message]
2012-06-15  5:57   ` Deepak Jangid

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=20120614182750.GA10798@1984 \
    --to=pablo@netfilter.org \
    --cc=deepak_jangid1987@yahoo.co.in \
    --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).