suricata
detect-engine-sigorder.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2010 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 Anoop Saldanha <anoopsaldanha@gmail.com>
22  */
23 
24 #ifndef SURICATA_DETECT_ENGINE_SIGORDER_H
25 #define SURICATA_DETECT_ENGINE_SIGORDER_H
26 
27 /**
28  * \brief Different kinds of helper data that can be used by the signature
29  * ordering module. Used by the "user" field in SCSigSignatureWrapper
30  */
31 typedef enum{
40 
41 /**
42  * \brief Signature wrapper used by signature ordering module while ordering
43  * signatures
44  */
45 typedef struct SCSigSignatureWrapper_ {
46  /* the wrapped signature */
48 
49  /* user data that is to be associated with this sigwrapper */
51 
54 
55 /**
56  * \brief Structure holding the signature ordering function used by the
57  * signature ordering module
58  */
59 typedef struct SCSigOrderFunc_ {
60  /* Pointer to the Signature Ordering function */
62 
65 
70 
71 #endif /* SURICATA_DETECT_ENGINE_SIGORDER_H */
SC_RADIX_USER_DATA_PKTVAR
@ SC_RADIX_USER_DATA_PKTVAR
Definition: detect-engine-sigorder.h:34
SCSigOrderFunc_::next
struct SCSigOrderFunc_ * next
Definition: detect-engine-sigorder.h:63
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:841
SCRadixUserDataType
SCRadixUserDataType
Different kinds of helper data that can be used by the signature ordering module. Used by the "user" ...
Definition: detect-engine-sigorder.h:31
SCSigSignatureWrapper_::next
struct SCSigSignatureWrapper_ * next
Definition: detect-engine-sigorder.h:52
SCSigSignatureWrapper_::sig
Signature * sig
Definition: detect-engine-sigorder.h:47
SCSigOrderFunc
struct SCSigOrderFunc_ SCSigOrderFunc
Structure holding the signature ordering function used by the signature ordering module.
SC_RADIX_USER_DATA_MAX
@ SC_RADIX_USER_DATA_MAX
Definition: detect-engine-sigorder.h:38
SCSigRegisterSignatureOrderingTests
void SCSigRegisterSignatureOrderingTests(void)
Definition: detect-engine-sigorder.c:1971
SCSigSignatureWrapper_
Signature wrapper used by signature ordering module while ordering signatures.
Definition: detect-engine-sigorder.h:45
SCSigSignatureWrapper
struct SCSigSignatureWrapper_ SCSigSignatureWrapper
Signature wrapper used by signature ordering module while ordering signatures.
SCSigOrderFunc_
Structure holding the signature ordering function used by the signature ordering module.
Definition: detect-engine-sigorder.h:59
SCSigRegisterSignatureOrderingFuncs
void SCSigRegisterSignatureOrderingFuncs(DetectEngineCtx *)
Lets you register the Signature ordering functions. The order in which the functions are registered s...
Definition: detect-engine-sigorder.c:803
SC_RADIX_USER_DATA_IPPAIRBITS
@ SC_RADIX_USER_DATA_IPPAIRBITS
Definition: detect-engine-sigorder.h:37
SC_RADIX_USER_DATA_FLOWBITS
@ SC_RADIX_USER_DATA_FLOWBITS
Definition: detect-engine-sigorder.h:32
SCSigOrderFunc_::SWCompare
int(* SWCompare)(SCSigSignatureWrapper *sw1, SCSigSignatureWrapper *sw2)
Definition: detect-engine-sigorder.h:61
Signature_
Signature container.
Definition: detect.h:601
SC_RADIX_USER_DATA_FLOWINT
@ SC_RADIX_USER_DATA_FLOWINT
Definition: detect-engine-sigorder.h:35
SCSigSignatureWrapper_::user
int user[SC_RADIX_USER_DATA_MAX]
Definition: detect-engine-sigorder.h:50
SC_RADIX_USER_DATA_HOSTBITS
@ SC_RADIX_USER_DATA_HOSTBITS
Definition: detect-engine-sigorder.h:36
SC_RADIX_USER_DATA_FLOWVAR
@ SC_RADIX_USER_DATA_FLOWVAR
Definition: detect-engine-sigorder.h:33
SCSigSignatureOrderingModuleCleanup
void SCSigSignatureOrderingModuleCleanup(DetectEngineCtx *)
De-registers all the signature ordering functions registered.
Definition: detect-engine-sigorder.c:823
SCSigOrderSignatures
void SCSigOrderSignatures(DetectEngineCtx *)
Orders the signatures.
Definition: detect-engine-sigorder.c:731