|
|
|
@ -125,6 +125,8 @@ typedef struct AppLayerParserProtoCtx_
|
|
|
|
|
uint64_t (*GetTxDetectFlags)(void *tx, uint8_t dir);
|
|
|
|
|
void (*SetTxDetectFlags)(void *tx, uint8_t dir, uint64_t);
|
|
|
|
|
|
|
|
|
|
void (*SetStreamDepthFlag)(void *tx, uint8_t flags);
|
|
|
|
|
|
|
|
|
|
/* each app-layer has its own value */
|
|
|
|
|
uint32_t stream_depth;
|
|
|
|
|
|
|
|
|
@ -609,6 +611,16 @@ void AppLayerParserRegisterMpmIDsFuncs(uint8_t ipproto, AppProto alproto,
|
|
|
|
|
SCReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AppLayerParserRegisterSetStreamDepthFlag(uint8_t ipproto, AppProto alproto,
|
|
|
|
|
void (*SetStreamDepthFlag)(void *tx, uint8_t flags))
|
|
|
|
|
{
|
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
|
|
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].SetStreamDepthFlag = SetStreamDepthFlag;
|
|
|
|
|
|
|
|
|
|
SCReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***** Get and transaction functions *****/
|
|
|
|
|
|
|
|
|
|
void *AppLayerParserGetProtocolParserLocalStorage(uint8_t ipproto, AppProto alproto)
|
|
|
|
@ -1374,6 +1386,20 @@ uint32_t AppLayerParserGetStreamDepth(const Flow *f)
|
|
|
|
|
SCReturnInt(alp_ctx.ctxs[f->protomap][f->alproto].stream_depth);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AppLayerParserSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, void *state, uint64_t tx_id, uint8_t flags)
|
|
|
|
|
{
|
|
|
|
|
SCEnter();
|
|
|
|
|
void *tx = NULL;
|
|
|
|
|
if (state != NULL) {
|
|
|
|
|
if ((tx = AppLayerParserGetTx(ipproto, alproto, state, tx_id)) != NULL) {
|
|
|
|
|
if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].SetStreamDepthFlag != NULL) {
|
|
|
|
|
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].SetStreamDepthFlag(tx, flags);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SCReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***** Cleanup *****/
|
|
|
|
|
|
|
|
|
|
void AppLayerParserStateCleanup(const Flow *f, void *alstate,
|
|
|
|
|