61 uint8_t
flags,
void *alstate,
void *tx, uint64_t tx_id);
62static 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,
105 if (tx_progress > data->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) {
int AppLayerParserGetStateProgressCompletionStatus(AppProto alproto, uint8_t direction)
int AppLayerParserGetStateIdByName(uint8_t ipproto, AppProto alproto, const char *name, const uint8_t direction)
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto, void *alstate, uint8_t flags)
get the progress value for a tx/protocol
void DetectAppLayerStateRegister(void)
struct DetectAppLayerStateData_ DetectAppLayerStateData
Data structures and function prototypes for keeping state for the detection engine.
#define DETECT_ENGINE_INSPECT_SIG_MATCH
#define DETECT_ENGINE_INSPECT_SIG_CANT_MATCH
#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.
int DetectBufferTypeGetByName(const char *name)
SigMatch * SCSigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
SigTableElmt * sigmatch_table
#define SIG_FLAG_TOCLIENT
#define SIG_FLAG_TOSERVER
@ SIGNATURE_HOOK_TYPE_APP
#define SIG_FLAG_APPLAYER
main detection engine ctx
AppProto alproto
application level protocol
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
void(* Free)(DetectEngineCtx *, void *)
union SignatureHook_::@95 t
struct SignatureHook_::@95::@96 app
enum SignatureHookType type
SignatureInitData * init_data
#define KEYWORD_PROFILING_END(ctx, type, m)
#define KEYWORD_PROFILING_START