Go to the documentation of this file.
24 #ifndef SURICATA_DETECT_ENGINE_SIGGROUP_H
25 #define SURICATA_DETECT_ENGINE_SIGGROUP_H
45 uint8_t ipproto,
int dir);
Container for matching data for a signature group.
bool SigGroupHeadEqual(const SigGroupHead *, const SigGroupHead *)
Finds if two Signature Group Heads are the same.
main detection engine ctx
int SigGroupHeadCopySigs(DetectEngineCtx *, SigGroupHead *, SigGroupHead **)
Copies the bitarray holding the sids from the source SigGroupHead to the destination SigGroupHead.
void SigGroupHeadRegisterTests(void)
void SigGroupHeadFree(const DetectEngineCtx *de_ctx, SigGroupHead *)
Free a SigGroupHead and its members.
void SigGroupHeadSetProtoAndDirection(SigGroupHead *sgh, uint8_t ipproto, int dir)
int SigGroupHeadHashInit(DetectEngineCtx *)
Initializes the hash table in the detection engine context to hold the SigGroupHeads.
int SigGroupHeadAppendSig(const DetectEngineCtx *, SigGroupHead **, const Signature *)
Add a Signature to a SigGroupHead.
int SigGroupHeadContainsSigId(DetectEngineCtx *de_ctx, SigGroupHead *sgh, uint32_t sid)
Check if a SigGroupHead contains a Signature, whose sid is sent as an argument.
SigGroupHead * SigGroupHeadHashLookup(DetectEngineCtx *, SigGroupHead *)
Used to lookup a SigGroupHead hash from the detection engine context SigGroupHead hash table.
void SigGroupHeadStore(DetectEngineCtx *, SigGroupHead *)
void SigGroupHeadPrintSigs(DetectEngineCtx *de_ctx, SigGroupHead *sgh)
Helper function used to print the list of sids for the Signatures present in this SigGroupHead.
void SigGroupHeadSetSigCnt(SigGroupHead *sgh, uint32_t max_idx)
Updates the SigGroupHead->sig_cnt with the total count of all the Signatures present in this SigGroup...
void SigGroupHeadSetupFiles(const DetectEngineCtx *de_ctx, SigGroupHead *sgh)
Set the need hash flag in the sgh.
int SigGroupHeadHashAdd(DetectEngineCtx *, SigGroupHead *)
Adds a SigGroupHead to the detection engine context SigGroupHead hash table.
void SigGroupHeadHashFree(DetectEngineCtx *)
Frees the hash table - DetectEngineCtx->sgh_hash_table, allocated by SigGroupHeadHashInit() function.
void SigGroupHeadInitDataFree(SigGroupHeadInitData *sghid)
int SigGroupHeadBuildNonPrefilterArray(DetectEngineCtx *de_ctx, SigGroupHead *sgh)
build an array of rule id's for sigs with no prefilter Also updated de_ctx::non_pf_store_cnt_max to t...
int SigGroupHeadClearSigs(SigGroupHead *)
Clears the bitarray holding the sids for this SigGroupHead.
int SigGroupHeadBuildMatchArray(DetectEngineCtx *de_ctx, SigGroupHead *sgh, uint32_t max_idx)
Create an array with all the internal ids of the sigs that this sig group head will check for.