suricata
detect-engine-threshold.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2021 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Breno Silva <breno.silva@gmail.com>
22  * \author Victor Julien <victor@inliniac.net>
23  */
24 
25 #ifndef __DETECT_ENGINE_THRESHOLD_H__
26 #define __DETECT_ENGINE_THRESHOLD_H__
27 
28 #include "detect.h"
29 #include "host.h"
30 #include "ippair.h"
31 #include "host-storage.h"
32 
33 void ThresholdInit(void);
34 
37 
39 
41  const Signature *, const SigMatchData **, int list);
43  const DetectThresholdData *, Packet *,
44  const Signature *, PacketAlert *);
45 
49 
50 int ThresholdHostTimeoutCheck(Host *, struct timeval *);
51 int ThresholdIPPairTimeoutCheck(IPPair *, struct timeval *);
52 void ThresholdListFree(void *ptr);
53 
54 #endif /* __DETECT_ENGINE_THRESHOLD_H__ */
ThresholdIPPairTimeoutCheck
int ThresholdIPPairTimeoutCheck(IPPair *, struct timeval *)
Definition: detect-engine-threshold.c:203
host.h
ippair.h
host-storage.h
ThresholdHashAllocate
void ThresholdHashAllocate(DetectEngineCtx *)
Allocate threshold context hash tables.
Definition: detect-engine-threshold.c:658
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:757
SigMatchData_
Data needed for Match()
Definition: detect.h:329
ThresholdHostHasThreshold
int ThresholdHostHasThreshold(Host *)
Definition: detect-engine-threshold.c:94
ThresholdHashInit
void ThresholdHashInit(DetectEngineCtx *)
Init threshold context hash tables.
Definition: detect-engine-threshold.c:645
ThresholdIPPairHasThreshold
int ThresholdIPPairHasThreshold(IPPair *pair)
Definition: detect-engine-threshold.c:99
DetectEngineThreadCtx_
Definition: detect.h:1001
detect.h
ThresholdHostStorageId
HostStorageId ThresholdHostStorageId(void)
Definition: detect-engine-threshold.c:75
Packet_
Definition: decode.h:416
ThresholdHostTimeoutCheck
int ThresholdHostTimeoutCheck(Host *, struct timeval *)
Definition: detect-engine-threshold.c:192
ThresholdListFree
void ThresholdListFree(void *ptr)
this function will free all the entries of a list DetectTagDataEntry
Definition: detect-engine-threshold.c:741
PacketAlertThreshold
int PacketAlertThreshold(DetectEngineCtx *, DetectEngineThreadCtx *, const DetectThresholdData *, Packet *, const Signature *, PacketAlert *)
Make the threshold logic for signatures.
Definition: detect-engine-threshold.c:600
DetectThresholdData_
Definition: detect-threshold.h:57
IPPair_
Definition: ippair.h:58
SigGetThresholdTypeIter
const DetectThresholdData * SigGetThresholdTypeIter(const Signature *, const SigMatchData **, int list)
Return next DetectThresholdData for signature.
Definition: detect-engine-threshold.c:113
HostStorageId_
Definition: host-storage.h:32
Signature_
Signature container.
Definition: detect.h:517
PacketAlert_
Definition: decode.h:277
ThresholdContextDestroy
void ThresholdContextDestroy(DetectEngineCtx *)
Destroy threshold context hash tables.
Definition: detect-engine-threshold.c:728
Host_
Definition: host.h:58
ThresholdInit
void ThresholdInit(void)
Definition: detect-engine-threshold.c:80