From 79f0f2fde41cc5a350fe8b6c9620aaba02eac583 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 3 May 2022 19:56:19 +0200 Subject: [PATCH] app-layer: make registration structure more compact --- src/app-layer-parser.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 65b574716f..cc6e65cc13 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -95,7 +95,14 @@ typedef struct AppLayerParserProtoCtx_ { /* 0 - to_server, 1 - to_client. */ AppLayerParserFPtr Parser[2]; + bool logger; + + /* Indicates the direction the parser is ready to see the data + * the first time for a flow. Values accepted - + * STREAM_TOSERVER, STREAM_TOCLIENT */ + uint8_t first_data_dir; + uint32_t logger_bits; /**< registered loggers for this proto */ void *(*StateAlloc)(void *, AppProto); @@ -129,11 +136,6 @@ typedef struct AppLayerParserProtoCtx_ /* each app-layer has its own value */ uint32_t stream_depth; - /* Indicates the direction the parser is ready to see the data - * the first time for a flow. Values accepted - - * STREAM_TOSERVER, STREAM_TOCLIENT */ - uint8_t first_data_dir; - /* Option flags such as supporting gaps or not. */ uint32_t option_flags; /* coccinelle: AppLayerParserProtoCtx:option_flags:APP_LAYER_PARSER_OPT_ */