From 85844ecdd8923a08143af27df1f0806f9809ace8 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Sun, 21 Nov 2004 19:33:49 +0000 Subject: update to 2.6.10 --- .../include/linux/netfilter_bridge/ebtables.h | 52 +++++++++++----------- 1 file changed, 27 insertions(+), 25 deletions(-) (limited to 'kernel/linux2.5/include/linux/netfilter_bridge/ebtables.h') diff --git a/kernel/linux2.5/include/linux/netfilter_bridge/ebtables.h b/kernel/linux2.5/include/linux/netfilter_bridge/ebtables.h index 1056e45..b1a7cc9 100644 --- a/kernel/linux2.5/include/linux/netfilter_bridge/ebtables.h +++ b/kernel/linux2.5/include/linux/netfilter_bridge/ebtables.h @@ -33,6 +33,23 @@ struct ebt_counter uint64_t bcnt; }; +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 *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 *counters; + char *entries; +}; + struct ebt_entries { /* this field is always set to zero * See EBT_ENTRY_OR_ENTRIES. @@ -47,7 +64,7 @@ struct ebt_entries { /* nr. of entries */ unsigned int nentries; /* entry list */ - char data[0]; + char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); }; /* used for the bitmask of struct ebt_entry */ @@ -87,7 +104,7 @@ struct ebt_entry_match } u; /* size of data */ unsigned int match_size; - unsigned char data[0]; + unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); }; struct ebt_entry_watcher @@ -98,7 +115,7 @@ struct ebt_entry_watcher } u; /* size of data */ unsigned int watcher_size; - unsigned char data[0]; + unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); }; struct ebt_entry_target @@ -109,7 +126,7 @@ struct ebt_entry_target } u; /* size of data */ unsigned int target_size; - unsigned char data[0]; + unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); }; #define EBT_STANDARD_TARGET "standard" @@ -143,24 +160,7 @@ struct ebt_entry { unsigned int target_offset; /* sizeof ebt_entry + matches + watchers + target */ unsigned int next_offset; - unsigned char elems[0]; -}; - -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 *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 *counters; - char *entries; + unsigned char elems[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); }; /* {g,s}etsockopt numbers */ @@ -201,9 +201,9 @@ struct ebt_watcher { struct list_head list; const char name[EBT_FUNCTION_MAXNAMELEN]; - void (*watcher)(const struct sk_buff *skb, const struct net_device *in, - const struct net_device *out, const void *watcherdata, - unsigned int datalen); + void (*watcher)(const struct sk_buff *skb, unsigned int hooknr, + const struct net_device *in, const struct net_device *out, + const void *watcherdata, unsigned int datalen); /* 0 == let it in */ int (*check)(const char *tablename, unsigned int hookmask, const struct ebt_entry *e, void *watcherdata, unsigned int datalen); @@ -263,6 +263,8 @@ struct ebt_table struct module *me; }; +#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \ + ~(__alignof__(struct ebt_replace)-1)) extern int ebt_register_table(struct ebt_table *table); extern void ebt_unregister_table(struct ebt_table *table); extern int ebt_register_match(struct ebt_match *match); -- cgit v1.2.3