diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index e413115504..4e526d493f 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -1149,6 +1149,17 @@ int AppLayerParserSetTxDetectState(const Flow *f, SCReturnInt(r); } +bool AppLayerParserSupportsTxDetectFlags(AppProto alproto) +{ + SCEnter(); + for (uint8_t p = 0; p < FLOW_PROTO_APPLAYER_MAX; p++) { + if (alp_ctx.ctxs[p][alproto].GetTxDetectFlags != NULL) { + SCReturnBool(true); + } + } + SCReturnBool(false); +} + uint64_t AppLayerParserGetTxDetectFlags(uint8_t ipproto, AppProto alproto, void *tx, uint8_t dir) { SCEnter(); diff --git a/src/app-layer-parser.h b/src/app-layer-parser.h index 492e3e5ea5..0ce16c0898 100644 --- a/src/app-layer-parser.h +++ b/src/app-layer-parser.h @@ -227,6 +227,7 @@ int AppLayerParserSetTxDetectState(const Flow *f, void *tx, DetectEngineState *s uint64_t AppLayerParserGetTxDetectFlags(uint8_t ipproto, AppProto alproto, void *tx, uint8_t dir); void AppLayerParserSetTxDetectFlags(uint8_t ipproto, AppProto alproto, void *tx, uint8_t dir, uint64_t); +bool AppLayerParserSupportsTxDetectFlags(AppProto alproto); /***** General *****/