netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@inai.de>
To: "Miguel Alejandro González" <maggonzz@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: searching tuples in conntrack
Date: Sun, 7 Oct 2012 13:44:32 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.01.1210071338390.16946@nerf07.vanv.qr> (raw)
In-Reply-To: <CA+Z0r8P6zFL0jE3soO+OubGg0buzRE7ZiHAMxXZPMNrJH6tiig@mail.gmail.com>


On Sunday 2012-10-07 07:51, Miguel Alejandro González wrote:
>
>I'm having some problems creating a function like count_them and the hash
>table it uses. My module is a target extension and connlimit is a match
>extension.

And why would that be a problem?

>So correct me if I'm wrong... basically connlimit creates the hash table
>with struct xt_connlimit_info *info = par->matchinfo as a parameter, but I
>don't have such info because i'm making a target extension...

par->targinfo is the block of parameters received from userspace
for targets.

>How can I initialize the hash table like in connlimit_mt_check() if I don't
>work with const struct xt_mtchk_param *par?

    →   info->data = kmalloc(sizeof(myprivatestuff), GFP_KERNEL);     

Note how this does not have much to do with matchinfo.
It's simply an assignment.
--
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

      parent reply	other threads:[~2012-10-07 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 17:29 searching tuples in conntrack Miguel Alejandro González
2012-09-26 20:32 ` Jan Engelhardt
2012-10-07  7:31   ` Miguel Alejandro González
     [not found]   ` <CA+Z0r8P6zFL0jE3soO+OubGg0buzRE7ZiHAMxXZPMNrJH6tiig@mail.gmail.com>
2012-10-07 11:44     ` Jan Engelhardt [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=alpine.LNX.2.01.1210071338390.16946@nerf07.vanv.qr \
    --to=jengelh@inai.de \
    --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).