Go to the documentation of this file.
24 #ifndef __DETECT_ENGINE_SIGGROUP_H__
25 #define __DETECT_ENGINE_SIGGROUP_H__
46 uint8_t ipproto,
int dir);
Container for matching data for a signature group.
main detection engine ctx
void SigGroupHeadSetFilesizeFlag(DetectEngineCtx *, SigGroupHead *)
Set the need size flag in the sgh.
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.
int SigGroupHeadHashRemove(DetectEngineCtx *, SigGroupHead *)
void SigGroupHeadSetProtoAndDirection(SigGroupHead *sgh, uint8_t ipproto, int dir)
void SigGroupHeadSetFilemagicFlag(DetectEngineCtx *, SigGroupHead *)
Set the need magic flag in the sgh.
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 SigGroupHeadSetFilestoreCount(DetectEngineCtx *, SigGroupHead *)
Set the filestore_cnt in the sgh.
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...
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 SigGroupHeadSetFileHashFlag(DetectEngineCtx *, SigGroupHead *)
Set the need hash flag in the sgh.
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.