IPT_ENTRY_ITERATE
I am embarassed to ask this but : where is IPT_ENTRY_ITERATE defined ?
grep shows only one match :
libiptc/libip4tc.c:#define ENTRY_ITERATE IPT_ENTRY_ITERATE
Regards,
Swapnil.
Quoted 1 line · Swapnil Nagle
I am embarassed to ask this but : where is
IPT_ENTRY_ITERATEdefined ?
Don't be.
Quoted 3 lines
grep shows only one match :
libiptc/libip4tc.c:#define
ENTRY_ITERATEIPT_ENTRY_ITERATE
These defines are used backwards... the function in libiptc.c is called ENTRY_ITERATE() which then gets expanded to IPT_ENTRY_ITERATE() when it's compiled for ipv4. This is because most of the libiptc code is shared between ipv4 and ipv6 and we don't want massive code duplication when it's mostly just the names of the structures that change. (look at ENTRY_ITERATE in libip6tc.c and you'll see it's similar)
You want to look at ENTRY_ITERATE() in libiptc.c
/Martin
Quoted 13 lines
Quoted 6 lines
grep shows only one match :
libiptc/libip4tc.c:#define
ENTRY_ITERATEIPT_ENTRY_ITERATEThese defines are used backwards... the function in
libiptc.cis calledENTRY_ITERATE()which then gets expanded toIPT_ENTRY_ITERATE()when it's compiled for ipv4. This is because most of the libiptc code is shared
...
Quoted 4 lines
You want to look at
ENTRY_ITERATE()inlibiptc.c
I couldn't find the definition for either ENTRY_ITERATE() or IPT_ENTRY_ITERATE() in libiptc.c.
Basically I want to see the code that iterates through the entries and calls the function specified through ENTRY_ITERATE().
Regards,
Swapnil.
Hi,
2004-09-23, cs keltezéssel 10:07-kor Swapnil Nagle ezt írta:
Quoted 4 lines
I couldn't find the definition for either
ENTRY_ITERATE()orIPT_ENTRY_ITERATE()inlibiptc.c.
Basically I want to see the code that iterates through the entries and calls the function specified throughENTRY_ITERATE().
Use LXR!
http://lxr.linux.no/ident?v=2.6.8.1&i=IPT_ENTRY_ITERATE
Signature · 2 lines
Regards, Krisztian KOVACS
Quoted 4 lines · KOVACS Krisztian
Hi,
2004-09-23, cs keltezéssel 10:07-kor Swapnil Nagle ezt írta:
Quoted 8 lines
Quoted 4 lines
I couldn't find the definition for either
ENTRY_ITERATE()orIPT_ENTRY_ITERATE()inlibiptc.c.
Basically I want to see the code that iterates through the entries and calls the function specified throughENTRY_ITERATE().Use LXR!
Ah yes. Thats what you get for trying to answer questions before the first cup of coffee.
/Martin
Quoted 4 lines
Quoted 4 lines
I couldn't find the definition for either
ENTRY_ITERATE()orIPT_ENTRY_ITERATE()inlibiptc.c.
...
Quoted 6 lines
Use LXR!
Thanks :) I had no idea that it was in the iptables kernel headers & not in the userspace program !
-- Swapnil
Quoted 2 lines · Swapnil Nagle
Thanks :) I had no idea that it was in the iptables kernel headers & not in the userspace program !
Both have to iterate the ruleset, so it is logical to have them only in one place. An since you can compile the kernel without iptables userspace (but not vice versa) it becomes completely obvious ;)
Quoted 1 line
-- Swapnil
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie