chain_cache
is "chain_cache->end_off" the adress of last rule of the chain or end of the last rule(the place where a new rule will appended (like ipt_entry->next_offset))?
struct chain_cache
{
char name[TABLE_MAXNAMELEN];
/* This is the first rule in chain. */
unsigned int start_off;
/* Last rule in chain */
unsigned int end_off;
};thanks,
Signature · 1 line
Ozgur Akan
no one knows?
Quoted 13 lines · Ozgur Akan
is "
chain_cache->end_off" the adress of last rule of the chain or end of the lastrule(the place where a new rule will appended (like ipt_entry->next_offset))?struct
chain_cache{ char name[TABLE_MAXNAMELEN]; /* This is the first rule in chain. */ unsigned int start_off; /* Last rule in chain */ unsigned int end_off; };thanks,
Signature · 1 line
Ozgur Akan
Quoted 1 line · Ozgur Akan
no one knows?
Very few people if any is looking at or caring about how libiptc operates. What we care about is how the iptables kernel operate and that libiptc succeds in building correct tables to the kernel.
The official interface to the iptables kernel is the iptables and iptables-save/restore commands, with their official module interfaces for writing your own matches/target extensions, the rest is "woodo magics" and is best left alone.
libiptc is primarily maintained for the purpose of implementing the above commands and module interfaces, and other uses of the libiptc library is mostly on your own responsibility. It is expected there will be multiple memory leaks, odd bugs and other ill effects lurking around there.
iptables does not have a chain_cache. This is purely an artefact of the libiptc userspace implementation for compiling/modifying the iptables table before it is sent to the kernel.
Regards
Henrik