Thursday, May 13, 2004

The big picture

STRUCT_TC_HANDLE (struct iptc_handle_t) holds all the information about a table, it`s chains and so. More technically it is a pointer to the structure of the rules. It maps a place in memory so we can get the meaningful parts of the memory we want. Actually we use other structures to get these data in order to understand them.

iptc_handle_t has an important structure called ipt_enrty which is hold as an array in ipt_get_entries structure`s entrytable array.

struct ipt_get_entries
{
/* Which table: user fills this in. */
char name[IPT_TABLE_MAXNAMELEN];

/* User fills this in: total entry size. */
unsigned int size;

/* The entries. */
struct ipt_entry entrytable[0];
};

ipt_entry entrytable`s initial size is zero because (as you guess) place for new rules are allocated when needed.





<< Home

This page is powered by Blogger. Isn't yours?