linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: richard -rw- weinberger <richard.weinberger@gmail.com>
Cc: Netfilter Developer Mailing List 
	<netfilter-devel@vger.kernel.org>,
	Linux Networking Developer Mailing List  <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	eric.dumazet@gmail.com, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [PATCH 1/6] Netfilter: Merge ipt_LOG and ip6_LOG into xt_LOG
Date: Wed, 1 Feb 2012 16:19:55 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.01.1202011616280.26332@frira.zrqbmnf.qr> (raw)
In-Reply-To: <CAFLxGvzgvvfkKQ7r2WWD6jOr+nLCTOE0MvXaMxfCR3HPAHivxg@mail.gmail.com>


On Wednesday 2012-02-01 16:08, richard -rw- weinberger wrote:
>> I don't see that extra pointer (outside xt_log_info_v1) that you talk about.
>> +struct xt_log_info_v1 {
>> +       unsigned char level;
>> +       unsigned char logflags;
>> +       char prefix[30];
>> +
>> +       char ring_name[30];
>> +       unsigned long ring_size;
>> +       struct xt_LOG_ring_ctx *rctx;
>> +};
>
>See:
>include/linux/netfilter/xt_LOG.h (user space part).
>
>+struct xt_log_info_v1 {
>+       unsigned char level;
>+       unsigned char logflags;
>+       char prefix[30];
>+
>+       char ring_name[30];
>+       unsigned long ring_siVs.ze;
>+};
>
>Here is no context pointer.

Aw don't do that. That is not maintainer-friendly (since headers
are more or less regularly updated by copying from kernel sources).
Keep the structs the same on each side.

That's why we have .userspacesize in the first place.
See libxt_quota.c on how it's done.

	.size = XT_ALIGN(sizeof(struct xt_log_info_v1)),
	.userspacesize = offsetof(struct xt_log_info_v1, firstkernelmember),

  reply	other threads:[~2012-02-01 15:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-22 21:56 [PATCH v2] Merge ipt_LOG and ip6t_LOG, add ring bufffer support Richard Weinberger
2012-01-22 21:56 ` [PATCH 1/6] Netfilter: Merge ipt_LOG and ip6_LOG into xt_LOG Richard Weinberger
2012-01-30  9:01   ` richard -rw- weinberger
2012-02-01  1:24     ` Jan Engelhardt
2012-02-01  2:53       ` Pablo Neira Ayuso
2012-02-01  9:14       ` richard -rw- weinberger
2012-02-01 14:47         ` Jan Engelhardt
2012-02-01 15:08           ` richard -rw- weinberger
2012-02-01 15:19             ` Jan Engelhardt [this message]
2012-01-22 21:56 ` [PATCH 2/6] ring_buffer: Export for_each_buffer_cpu() Richard Weinberger
2012-01-22 21:56 ` [PATCH 3/6] xt_log: Make printk() in sb_close() optional Richard Weinberger
2012-01-22 21:56 ` [PATCH 4/6] Netfilter: xt_LOG: Implement ring buffer support Richard Weinberger
2012-01-22 21:56 ` [PATCH 5/6] iptables: Merge libip6t_LOG and libipt_LOG into libxt_LOG Richard Weinberger
2012-01-22 21:56 ` [PATCH 6/6] iptables: xt_LOG: Add ring buffer support Richard Weinberger
2012-03-05 23:19 [PATCH v6] Netfilter " Richard Weinberger
2012-03-05 23:19 ` [PATCH 1/6] Netfilter: Merge ipt_LOG and ip6_LOG into xt_LOG Richard Weinberger

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.1202011616280.26332@frira.zrqbmnf.qr \
    --to=jengelh@medozas.de \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=richard.weinberger@gmail.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;
as well as URLs for NNTP newsgroup(s).