vars: optimize layout to reduce size requirements of flowbits and other vars

pull/669/head
Victor Julien 11 years ago
parent 3e604b8703
commit ffe4a302a1

@ -29,10 +29,10 @@
typedef struct FlowBit_ {
uint8_t type; /* type, DETECT_FLOWBITS in this case */
uint16_t idx; /* name idx */
GenericVar *next; /* right now just implement this as a list,
* in the long run we have think of something
* faster. */
uint16_t idx; /* name idx */
} FlowBit;
void FlowBitFree(FlowBit *);

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

@ -31,8 +31,8 @@
typedef struct VariableName_ {
char *name;
uint8_t type; /* flowbit, pktvar, etc */
uint16_t idx;
uint8_t flags;
uint16_t idx;
} VariableName;
static uint32_t VariableNameHash(HashListTable *ht, void *buf, uint16_t buflen) {

@ -26,8 +26,8 @@
typedef struct GenericVar_ {
uint8_t type;
struct GenericVar_ *next;
uint16_t idx;
struct GenericVar_ *next;
} GenericVar;
void GenericVarFree(GenericVar *);

Loading…
Cancel
Save