int (*StateGetEventInfo)(const char *event_name,
int *event_id, AppLayerEventType *event_type);
+ int (*StateGetTxLogged)(void *alstate, void *tx, uint32_t logger);
+ void (*StateSetTxLogged)(void *alstate, void *tx, uint32_t logger);
+
int (*StateHasTxDetectState)(void *alstate);
DetectEngineState *(*GetTxDetectState)(void *tx);
int (*SetTxDetectState)(void *alstate, void *tx, DetectEngineState *);
SCReturn;
}
+void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto,
+ int (*StateGetTxLogged)(void *, void *, uint32_t),
+ void (*StateSetTxLogged)(void *, void *, uint32_t))
+{
+ SCEnter();
+
+ alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateGetTxLogged =
+ StateGetTxLogged;
+
+ alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateSetTxLogged =
+ StateSetTxLogged;
+
+ SCReturn;
+}
+
void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto)
{
SCEnter();
SCReturn;
}
+void AppLayerParserSetTxLogged(uint8_t ipproto, AppProto alproto,
+ void *alstate, void *tx, uint32_t logger)
+{
+ SCEnter();
+
+ if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
+ StateSetTxLogged != NULL) {
+ alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
+ StateSetTxLogged(alstate, tx, logger);
+ }
+
+ SCReturn;
+}
+
+int AppLayerParserGetTxLogged(uint8_t ipproto, AppProto alproto,
+ void *alstate, void *tx, uint32_t logger)
+{
+ SCEnter();
+
+ uint8_t r = 0;
+ if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
+ StateGetTxLogged != NULL) {
+ r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
+ StateGetTxLogged(alstate, tx, logger);
+ }
+
+ SCReturnInt(r);
+}
+
uint64_t AppLayerParserGetTransactionLogId(AppLayerParserState *pstate)
{
SCEnter();
AppLayerDecoderEvents *(*StateGetEvents)(void *, uint64_t));
void AppLayerParserRegisterHasEventsFunc(uint8_t ipproto, AppProto alproto,
int (*StateHasEvents)(void *));
+void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto,
+ int (*StateGetTxLogged)(void *, void *, uint32_t),
+ void (*StateSetTxLogged)(void *, void *, uint32_t));
void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto);
void AppLayerParserRegisterTruncateFunc(uint8_t ipproto, AppProto alproto,
void (*Truncate)(void *, uint8_t));
uint64_t AppLayerParserGetTransactionLogId(AppLayerParserState *pstate);
void AppLayerParserSetTransactionLogId(AppLayerParserState *pstate);
+void AppLayerParserSetTxLogged(uint8_t ipproto, AppProto alproto, void *alstate,
+ void *tx, uint32_t logger);
+int AppLayerParserGetTxLogged(uint8_t ipproto, AppProto alproto, void *alstate,
+ void *tx, uint32_t logger);
uint64_t AppLayerParserGetTransactionInspectId(AppLayerParserState *pstate, uint8_t direction);
void AppLayerParserSetTransactionInspectId(AppLayerParserState *pstate,
const uint8_t ipproto, const AppProto alproto, void *alstate,