Skip to contentSkip to conversation

IPT_ENTRY_ITERATE

DISCUSSION Swapnil Nagle 4 participants 7 messages Sep 23, 2004 – Sep 26, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 1 line · Swapnil Nagle

I am embarassed to ask this but : where is IPT_ENTRY_ITERATE defined ?

Don't be.

Quoted 3 lines

grep shows only one match :

libiptc/libip4tc.c:#define ENTRY_ITERATE IPT_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

#2 lore raw
Quoted 13 lines
Quoted 6 lines

grep shows only one match :

libiptc/libip4tc.c:#define ENTRY_ITERATE IPT_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

...

Quoted 4 lines

You want to look at ENTRY_ITERATE() in libiptc.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.

#3 lore raw

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() 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().

Use LXR!

http://lxr.linux.no/ident?v=2.6.8.1&i=IPT_ENTRY_ITERATE

Signature · 2 lines
 Regards,
   Krisztian KOVACS
#4 lore raw
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() 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().

Use LXR!

http://lxr.linux.no/ident?v=2.6.8.1&i=IPT_ENTRY_ITERATE

Ah yes. Thats what you get for trying to answer questions before the first cup of coffee.

/Martin

#6 lore raw
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