Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Nicola Padovano <nicola.padovano@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	netfilter-devel <netfilter-devel@vger.kernel.org>,
	netdev@vger.kernel.org
Subject: Re: checkentry function
Date: Tue, 05 Oct 2010 08:23:58 +0200	[thread overview]
Message-ID: <1286259838.2457.11.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTinTd5FjJ-6WeAGwintAS9aHdFYnS7--TLMSDEkn@mail.gmail.com>

Le mardi 05 octobre 2010 à 08:11 +0200, Nicola Padovano a écrit :
> >
> > Negative (ie < 0) is used for error numbers. This is confusing
> > because in older kernels the checkentry returned a bool which
> > is defined as 1 okay and 0 for error.
> >
> ok i see.
> 
> and why i have this output?
> DEBUG: the tablename (not FILTER) is: �%H �
> 
> I want block my target if the table name is NOT filter...so i write:
> 
> [CODE]
> ...
>  if (strcmp(tablename, "filter"))   {
>    printk(KERN_INFO "DEBUG: the tablename (not FILTER) is %s\n",tablename);
>    return ERROR_VALUE; // < 0
>  }
> [/CODE]
> 
> but in the tablename variable i haven't the table's right value (but i
> have: �%H � a wrong value)...what's the problem?
> 
> 

Because xxx_check() signature is not the one you use.

Could you read source code of _current_ existing modules , and use
copy/paste ?

static int hashlimit_mt_check(const struct xt_mtchk_param *par)
{
...
}




  reply	other threads:[~2010-10-05  6:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-02 11:59 checkentry function Nicola Padovano
2010-10-05  5:46 ` Stephen Hemminger
2010-10-05  5:52   ` Nicola Padovano
2010-10-05  6:01     ` Stephen Hemminger
2010-10-05  6:11       ` Nicola Padovano
2010-10-05  6:23         ` Eric Dumazet [this message]
2010-10-05 11:16           ` Nicola Padovano
2010-10-05 11:32             ` Jan Engelhardt
2010-10-05 11:46               ` Nicola Padovano
2010-10-05 12:03                 ` Jan Engelhardt
2010-10-05 12:07                 ` Eric Dumazet

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=1286259838.2457.11.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nicola.padovano@gmail.com \
    --cc=shemminger@vyatta.com \
    /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