summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2003-07-25 17:10:17 +0000
committerBart De Schuymer <bdschuym@pandora.be>2003-07-25 17:10:17 +0000
commit47a6afe2a7782580c49288686c93151ffb8f4bcf (patch)
tree037389bd97e0b4ba4444eb0c4e36aaec02430f11
parent9660903a1725ed3f0bb294c42706a0b3fd88a2c2 (diff)
*** empty log message ***
-rw-r--r--userspace/ebtables2/include/ebtables.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/userspace/ebtables2/include/ebtables.h b/userspace/ebtables2/include/ebtables.h
index 30e8441..1eac563 100644
--- a/userspace/ebtables2/include/ebtables.h
+++ b/userspace/ebtables2/include/ebtables.h
@@ -34,6 +34,32 @@ 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 */
+#ifdef KERNEL_64_USERSPACE_32
+ uint64_t hook_entry[NF_BR_NUMHOOKS];
+#else
+ struct ebt_entries *hook_entry[NF_BR_NUMHOOKS];
+#endif
+ /* nr of counters userspace expects back */
+ unsigned int num_counters;
+ /* where the kernel will put the old counters */
+#ifdef KERNEL_64_USERSPACE_32
+ uint64_t counters;
+ uint64_t entries;
+#else
+ struct ebt_counter *counters;
+ char *entries;
+#endif
+};
+
struct ebt_entries {
/* this field is always set to zero
* See EBT_ENTRY_OR_ENTRIES.
@@ -48,7 +74,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 */
@@ -91,7 +117,7 @@ struct ebt_entry_match
#ifdef KERNEL_64_USERSPACE_32
unsigned int pad;
#endif
- unsigned char data[0];
+ unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
};
struct ebt_entry_watcher
@@ -105,7 +131,7 @@ struct ebt_entry_watcher
#ifdef KERNEL_64_USERSPACE_32
unsigned int pad;
#endif
- unsigned char data[0];
+ unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
};
struct ebt_entry_target
@@ -119,7 +145,7 @@ struct ebt_entry_target
#ifdef KERNEL_64_USERSPACE_32
unsigned int pad;
#endif
- unsigned char data[0];
+ unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
};
#define EBT_STANDARD_TARGET "standard"
@@ -156,33 +182,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 */
-#ifdef KERNEL_64_USERSPACE_32
- uint64_t hook_entry[NF_BR_NUMHOOKS];
-#else
- struct ebt_entries *hook_entry[NF_BR_NUMHOOKS];
-#endif
- /* nr of counters userspace expects back */
- unsigned int num_counters;
- /* where the kernel will put the old counters */
-#ifdef KERNEL_64_USERSPACE_32
- uint64_t counters;
- uint64_t entries;
-#else
- struct ebt_counter *counters;
- char *entries;
-#endif
+ unsigned char elems[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
};
/* {g,s}etsockopt numbers */