]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: shrink AppLayerParserState
authorVictor Julien <victor@inliniac.net>
Thu, 23 Jan 2014 08:31:56 +0000 (09:31 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Jan 2014 11:46:26 +0000 (12:46 +0100)
Change layout to be more efficient, shrinks structure with 8 bytes.

src/app-layer-parser.c

index c48227d463f303fabfeca25c1d558a593dbe73b1..a56cdd421f70d7ed04baf5486cf65042920fa368 100644 (file)
@@ -122,6 +122,8 @@ typedef struct AppLayerParserCtx_ {
 struct AppLayerParserState_ {
     uint8_t flags;
 
+    /* State version, incremented for each update.  Can wrap around. */
+    uint16_t version;
     /* Indicates the current transaction that is being inspected.
      * We have a var per direction. */
     uint64_t inspect_id[2];
@@ -129,8 +131,6 @@ struct AppLayerParserState_ {
      * we don't need a var per direction since we don't log a transaction
      * unless we have the entire transaction. */
     uint64_t log_id;
-    /* State version, incremented for each update.  Can wrap around. */
-    uint16_t version;
 
     /* Used to store decoder events. */
     AppLayerDecoderEvents *decoder_events;