Go to the documentation of this file.
61 uint8_t
flags,
void *alstate,
void *tx, uint64_t tx_id);
62 static int g_applayer_state_list_id = 0;
68 "match on events generated by the App Layer Parsers and the protocol detection engine";
74 DetectEngineAptStateInspect, NULL);
76 DetectEngineAptStateInspect, NULL);
83 uint8_t
flags,
void *alstate,
void *tx, uint64_t tx_id)
87 const uint8_t tx_progress =
96 if (data->
mode == -1) {
97 SCLogDebug(
"sid:%u tx_progress %u < keyword progress %u ?", s->
id, tx_progress,
99 if (tx_progress < data->progress) {
102 }
else if (data->
mode == 1) {
103 SCLogDebug(
"sid:%u tx_progress %u > keyword progress %u ?", s->
id, tx_progress,
128 SCLogDebug(
"DETECT_ENGINE_INSPECT_SIG_MATCH");
133 SCLogDebug(
"DETECT_ENGINE_INSPECT_SIG_CANT_MATCH");
136 SCLogDebug(
"DETECT_ENGINE_INSPECT_SIG_NO_MATCH");
147 .t.app.alproto = alproto,
148 .t.app.app_progress = progress,
161 if (strlen(arg) > 0) {
165 }
else if (arg[0] ==
'>') {
175 IPPROTO_TCP , s->
alproto, h, STREAM_TOSERVER);
176 if (progress_ts >= 0) {
181 IPPROTO_TCP , s->
alproto, h, STREAM_TOCLIENT);
182 if (progress_tc < 0) {
194 const int progress_ts =
196 if (progress_ts >= 0) {
198 progress = progress_ts;
201 IPPROTO_TCP , s->
alproto, h, STREAM_TOCLIENT);
202 if (progress_tc < 0) {
206 progress = progress_tc;
214 data->
mode = (int8_t)mode;
217 g_applayer_state_list_id) == NULL) {
SigTableElmt * sigmatch_table
void(* Free)(DetectEngineCtx *, void *)
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto, void *alstate, uint8_t flags)
get the progress value for a tx/protocol
main detection engine ctx
int AppLayerParserGetStateProgressCompletionStatus(AppProto alproto, uint8_t direction)
int AppLayerParserGetStateIdByName(uint8_t ipproto, AppProto alproto, const char *name, const uint8_t direction)
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define KEYWORD_PROFILING_START
#define SIG_FLAG_APPLAYER
int DetectBufferTypeGetByName(const char *name)
#define KEYWORD_PROFILING_END(ctx, type, m)
@ SIGNATURE_HOOK_TYPE_APP
#define SIG_FLAG_TOSERVER
#define DETECT_ENGINE_INSPECT_SIG_MATCH
struct SignatureHook_::@84::@85 app
SignatureInitData * init_data
Data structures and function prototypes for keeping state for the detection engine.
#define DETECT_ENGINE_INSPECT_SIG_CANT_MATCH
struct DetectAppLayerStateData_ DetectAppLayerStateData
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
void DetectAppLayerStateRegister(void)
enum SignatureHookType type
#define DETECT_ENGINE_INSPECT_SIG_NO_MATCH
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
AppProto alproto
application level protocol
union SignatureHook_::@84 t