flowvar: shrink flowvar type by using padded space

pull/2559/head
Victor Julien 9 years ago
parent 99517cbd53
commit 4a49260897

@ -29,6 +29,7 @@
typedef struct FlowBit_ { typedef struct FlowBit_ {
uint8_t type; /* type, DETECT_FLOWBITS in this case */ uint8_t type; /* type, DETECT_FLOWBITS in this case */
uint8_t pad[3];
uint32_t idx; /* name idx */ uint32_t idx; /* name idx */
GenericVar *next; /* right now just implement this as a list, GenericVar *next; /* right now just implement this as a list,
* in the long run we have think of something * in the long run we have think of something

@ -47,17 +47,17 @@ typedef struct FlowVarTypeInt_ {
/** Generic Flowvar Structure */ /** Generic Flowvar Structure */
typedef struct FlowVar_ { typedef struct FlowVar_ {
uint8_t type; /* type, DETECT_FLOWVAR in this case */ uint8_t type; /* type, DETECT_FLOWVAR in this case */
uint8_t datatype;
uint16_t keylen;
uint32_t idx; /* name idx */ uint32_t idx; /* name idx */
GenericVar *next; /* right now just implement this as a list, GenericVar *next; /* right now just implement this as a list,
* in the long run we have think of something * in the long run we have think of something
* faster. */ * faster. */
uint8_t datatype;
union { union {
FlowVarTypeStr fv_str; FlowVarTypeStr fv_str;
FlowVarTypeInt fv_int; FlowVarTypeInt fv_int;
} data; } data;
uint8_t *key; uint8_t *key;
uint16_t keylen;
} FlowVar; } FlowVar;
/** Flowvar Interface API */ /** Flowvar Interface API */

@ -47,12 +47,14 @@ enum VarTypes {
typedef struct GenericVar_ { typedef struct GenericVar_ {
uint8_t type; uint8_t type;
uint8_t pad[3];
uint32_t idx; uint32_t idx;
struct GenericVar_ *next; struct GenericVar_ *next;
} GenericVar; } GenericVar;
typedef struct XBit_ { typedef struct XBit_ {
uint8_t type; /* type, DETECT_XBITS in this case */ uint8_t type; /* type, DETECT_XBITS in this case */
uint8_t pad[3];
uint32_t idx; /* name idx */ uint32_t idx; /* name idx */
GenericVar *next; GenericVar *next;
uint32_t expire; uint32_t expire;

Loading…
Cancel
Save