[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.01.1202011616280.26332@frira.zrqbmnf.qr>
Date: Wed, 1 Feb 2012 16:19:55 +0100 (CET)
From: Jan Engelhardt <jengelh@...ozas.de>
To: richard -rw- weinberger <richard.weinberger@...il.com>
cc: Netfilter Developer Mailing List
<netfilter-devel@...r.kernel.org>,
Linux Networking Developer Mailing List
<netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
eric.dumazet@...il.com, Pablo Neira Ayuso <pablo@...filter.org>
Subject: Re: [PATCH 1/6] Netfilter: Merge ipt_LOG and ip6_LOG into xt_LOG
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),
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists