[EBTABLES]: Split ebt_replace into user and kernel variants, annotate.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Al Viro 2006-11-30 19:28:48 -08:00 committed by David S. Miller
commit 1e419cd995
5 changed files with 31 additions and 13 deletions

View file

@ -38,6 +38,23 @@ struct ebt_counter
};
struct ebt_replace
{
char name[EBT_TABLE_MAXNAMELEN];
unsigned int valid_hooks;
/* nr of rules in the table */
unsigned int nentries;
/* total size of the entries */
unsigned int entries_size;
/* start of the chains */
struct ebt_entries __user *hook_entry[NF_BR_NUMHOOKS];
/* nr of counters userspace expects back */
unsigned int num_counters;
/* where the kernel will put the old counters */
struct ebt_counter __user *counters;
char __user *entries;
};
struct ebt_replace_kernel
{
char name[EBT_TABLE_MAXNAMELEN];
unsigned int valid_hooks;
@ -255,7 +272,7 @@ struct ebt_table
{
struct list_head list;
char name[EBT_TABLE_MAXNAMELEN];
struct ebt_replace *table;
struct ebt_replace_kernel *table;
unsigned int valid_hooks;
rwlock_t lock;
/* e.g. could be the table explicitly only allows certain