summaryrefslogtreecommitdiffstats
path: root/src/ct.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-03-31 04:57:48 +0200
committerPatrick McHardy <kaber@trash.net>2009-03-31 04:57:48 +0200
commit4ffa6882a5eafa50625d0e4d49cdaafe69d7877c (patch)
tree6f6e5c33a3d7774120b315b6da0a07bffe19126f /src/ct.c
parent4fee12b4b0a837b4d34d21be99cda8185563f784 (diff)
datatype: add/move size and byte order information into data types
Add size and type information to non-basetype types and remove the now redundant information from the symbol tables. This will be used to determine size and byteorder of set members without analyzing the ruleset for incremental update operations. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/ct.c')
-rw-r--r--src/ct.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ct.c b/src/ct.c
index b077a5f9..1baefed8 100644
--- a/src/ct.c
+++ b/src/ct.c
@@ -26,8 +26,6 @@
#include <utils.h>
static const struct symbol_table ct_state_tbl = {
- .byteorder = BYTEORDER_HOST_ENDIAN,
- .size = 4 * BITS_PER_BYTE,
.symbols = {
SYMBOL("invalid", NF_CT_STATE_INVALID_BIT),
SYMBOL("new", NF_CT_STATE_BIT(IP_CT_NEW)),
@@ -42,13 +40,13 @@ static const struct datatype ct_state_type = {
.type = TYPE_CT_STATE,
.name = "ct_state",
.desc = "conntrack state",
+ .byteorder = BYTEORDER_HOST_ENDIAN,
+ .size = 4 * BITS_PER_BYTE,
.basetype = &bitmask_type,
.sym_tbl = &ct_state_tbl,
};
static const struct symbol_table ct_dir_tbl = {
- .byteorder = BYTEORDER_INVALID,
- .size = BITS_PER_BYTE,
.symbols = {
SYMBOL("original", IP_CT_DIR_ORIGINAL),
SYMBOL("reply", IP_CT_DIR_REPLY),
@@ -60,13 +58,13 @@ static const struct datatype ct_dir_type = {
.type = TYPE_CT_DIR,
.name = "ct_dir",
.desc = "conntrack direction",
+ .byteorder = BYTEORDER_INVALID,
+ .size = BITS_PER_BYTE,
.basetype = &bitmask_type,
.sym_tbl = &ct_dir_tbl,
};
static const struct symbol_table ct_status_tbl = {
- .byteorder = BYTEORDER_HOST_ENDIAN,
- .size = 4 * BITS_PER_BYTE,
/*
* There are more, but most of them don't make sense for filtering.
*/
@@ -86,6 +84,8 @@ static const struct datatype ct_status_type = {
.type = TYPE_CT_STATUS,
.name = "ct_status",
.desc = "conntrack status",
+ .byteorder = BYTEORDER_HOST_ENDIAN,
+ .size = 4 * BITS_PER_BYTE,
.basetype = &bitmask_type,
.sym_tbl = &ct_status_tbl,
};