From: Ozgur AKAN <akan@aiqa.com>
To: netfilter-devel@lists.netfilter.org
Subject: size of a rule
Date: Mon, 26 Apr 2004 16:54:10 +0300 [thread overview]
Message-ID: <408D1482.5030009@aiqa.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]
Hi,
I am trying to find the size of a rule in memory.
const struct ipt_entry *e;
sizeof (*e) is equal to 112 always. But the size of rule should be
different because we can give different parameters to each rule. (I
guess that this is the size of the header-like place)
So I looked at the source of libiptc and found this in linux_list.h
while searching for the size value.
#define list_entry(ptr, type, member) \
((type *) ( (char *)(ptr)-(unsigned long)(&((type *)0)->member) ) )
What is the meaning of ((type *)0)->member ? I can not understand the
part with 0.
thanks,
--
Ozgur Akan
[-- Attachment #2: Type: text/html, Size: 1043 bytes --]
next reply other threads:[~2004-04-26 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-26 13:54 Ozgur AKAN [this message]
2004-04-26 14:08 ` size of a rule Ozgur AKAN
2004-04-26 14:12 ` zhi wang
2004-04-26 14:24 ` Henrik Nordstrom
2004-04-27 8:41 ` Ozgur AKAN
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=408D1482.5030009@aiqa.com \
--to=akan@aiqa.com \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.