suricata
|
#include "suricata-common.h"
#include "decode.h"
#include "detect.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-engine-prefilter-common.h"
#include "detect-engine-build.h"
#include "flow.h"
#include "flow-var.h"
#include "detect-flow.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-debug.h"
#include "detect-engine-alert.h"
Go to the source code of this file.
Macros | |
#define | PARSE_REGEX "^\\s*([A-z_]+)\\s*(?:,\\s*([A-z_]+))?\\s*(?:,\\s*([A-z_]+))?\\s*$" |
Regex for parsing our flow options. More... | |
#define | SIG_FLAG_BOTH (SIG_FLAG_TOSERVER|SIG_FLAG_TOCLIENT) |
Functions | |
int | DetectFlowMatch (DetectEngineThreadCtx *det_ctx, Packet *p, const Signature *s, const SigMatchCtx *ctx) |
This function is used to match flow flags set on a packet with those passed via flow: More... | |
void | DetectFlowFree (DetectEngineCtx *de_ctx, void *ptr) |
this function will free memory associated with DetectFlowData More... | |
void | DetectFlowRegister (void) |
Registration function for flow: keyword. More... | |
int | DetectFlowSetupImplicit (Signature *s, uint32_t flags) |
FLOW part of the detection engine.
Definition in file detect-flow.c.
#define PARSE_REGEX "^\\s*([A-z_]+)\\s*(?:,\\s*([A-z_]+))?\\s*(?:,\\s*([A-z_]+))?\\s*$" |
Regex for parsing our flow options.
Definition at line 48 of file detect-flow.c.
#define SIG_FLAG_BOTH (SIG_FLAG_TOSERVER|SIG_FLAG_TOCLIENT) |
void DetectFlowFree | ( | DetectEngineCtx * | de_ctx, |
void * | ptr | ||
) |
this function will free memory associated with DetectFlowData
fd | pointer to DetectFlowData |
Definition at line 439 of file detect-flow.c.
References SCFree.
int DetectFlowMatch | ( | DetectEngineThreadCtx * | det_ctx, |
Packet * | p, | ||
const Signature * | s, | ||
const SigMatchCtx * | ctx | ||
) |
This function is used to match flow flags set on a packet with those passed via flow:
t | pointer to thread vars |
det_ctx | pointer to the pattern matcher thread |
p | pointer to the current packet |
m | pointer to the sigmatch that we will cast into DetectFlowData |
0 | no match |
1 | match |
Definition at line 129 of file detect-flow.c.
References ctx, FLOW_PKT_ESTABLISHED, FLOW_PKT_TOCLIENT, FLOW_PKT_TOSERVER, Packet_::flowflags, SCEnter, and SCLogDebug.
Referenced by DetectFlowRegister().
void DetectFlowRegister | ( | void | ) |
Registration function for flow: keyword.
Definition at line 65 of file detect-flow.c.
References SigTableElmt_::desc, DETECT_FLOW, DetectFlowMatch(), SigTableElmt_::Match, SigTableElmt_::name, SigTableElmt_::Setup, sigmatch_table, and SigTableElmt_::url.
Referenced by SigTableSetup().
int DetectFlowSetupImplicit | ( | Signature * | s, |
uint32_t | flags | ||
) |
Definition at line 336 of file detect-flow.c.
References BUG_ON, flags, Signature_::flags, SCLogDebug, SIG_FLAG_BOTH, SIG_FLAG_TOCLIENT, and SIG_FLAG_TOSERVER.