suricata
detect-engine.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 Victor Julien <victor@inliniac.net>
22  */
23 
24 #ifndef __DETECT_ENGINE_H__
25 #define __DETECT_ENGINE_H__
26 
27 #include "detect.h"
28 #include "suricata.h"
29 
30 void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size);
31 void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
32  InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len);
34 void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size);
35 void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len);
37  const DetectEngineTransforms *transforms);
39 InspectionBuffer *InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id);
42  const uint8_t *data, const uint32_t data_len);
44  DetectEngineThreadCtx *det_ctx, const int list_id, uint32_t local_id);
45 
46 /* start up registery funcs */
47 
48 int DetectBufferTypeRegister(const char *name);
49 int DetectBufferTypeGetByName(const char *name);
50 void DetectBufferTypeSupportsMpm(const char *name);
51 void DetectBufferTypeSupportsPacket(const char *name);
52 void DetectBufferTypeSupportsFrames(const char *name);
53 void DetectBufferTypeSupportsTransformations(const char *name);
54 int DetectBufferTypeMaxId(void);
56 void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc);
57 const char *DetectBufferTypeGetDescriptionByName(const char *name);
58 void DetectBufferTypeRegisterSetupCallback(const char *name,
59  void (*Callback)(const DetectEngineCtx *, Signature *));
60 void DetectBufferTypeRegisterValidateCallback(const char *name,
61  bool (*ValidateCallback)(const Signature *, const char **sigerror));
62 
63 /* detect engine related buffer funcs */
64 
66  const int direction, const AppProto alproto, const uint8_t frame_type);
68 const char *DetectEngineBufferTypeGetNameById(const DetectEngineCtx *de_ctx, const int id);
72 const char *DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_ctx, const int id);
75  DetectEngineCtx *de_ctx, const int id, TransformData *transforms, int transform_cnt);
78  const DetectEngineCtx *de_ctx, const int id, const Signature *s, const char **sigerror);
80  const uint8_t *content, uint16_t content_len, const char **namestr);
85 
86 /* prototypes */
92 
93 int DetectRegisterThreadCtxGlobalFuncs(const char *name,
94  void *(*InitFunc)(void *), void *data, void (*FreeFunc)(void *));
96 
97 TmEcode DetectEngineThreadCtxInit(ThreadVars *, void *, void **);
99 //inline uint32_t DetectEngineGetMaxSigId(DetectEngineCtx *);
100 /* faster as a macro than a inline function on my box -- VJ */
101 #define DetectEngineGetMaxSigId(de_ctx) ((de_ctx)->signum)
103 void DetectEngineRegisterTests(void);
105 
106 uint32_t DetectEngineGetVersion(void);
107 void DetectEngineBumpVersion(void);
111 void DetectEnginePruneFreeList(void);
115 int DetectEngineReload(const SCInstance *suri);
116 int DetectEngineEnabled(void);
117 int DetectEngineMTApply(void);
119 int DetectEngineMultiTenantSetup(const bool unix_socket);
120 
121 int DetectEngineReloadStart(void);
122 int DetectEngineReloadIsStart(void);
123 void DetectEngineReloadSetIdle(void);
124 int DetectEngineReloadIsIdle(void);
125 
126 int DetectEngineLoadTenantBlocking(uint32_t tenant_id, const char *yaml);
127 int DetectEngineReloadTenantBlocking(uint32_t tenant_id, const char *yaml, int reload_cnt);
128 
129 int DetectEngineTentantRegisterLivedev(uint32_t tenant_id, int device_id);
130 int DetectEngineTentantRegisterVlanId(uint32_t tenant_id, uint16_t vlan_id);
131 int DetectEngineTentantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id);
132 int DetectEngineTentantRegisterPcapFile(uint32_t tenant_id);
133 int DetectEngineTentantUnregisterPcapFile(uint32_t tenant_id);
134 
136  const struct DetectEngineAppInspectionEngine_ *, const Signature *, Flow *, uint8_t, void *,
137  void *, uint64_t);
138 
140  const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
141  void *alstate, void *txv, uint64_t tx_id);
142 
144  DetectEngineThreadCtx *det_ctx,
145  const DetectEnginePktInspectionEngine *engine,
146  const Signature *s, Packet *p, uint8_t *alert_flags);
147 
148 /**
149  * \brief Registers an app inspection engine.
150  *
151  * \param name Name of the detection list
152  * \param alproto App layer protocol for which we will register the engine.
153  * \param direction The direction for the engine: SIG_FLAG_TOSERVER or
154  * SIG_FLAG_TOCLIENT
155  * \param progress Minimal progress value for inspect engine to run
156  * \param Callback The engine callback.
157  */
158 void DetectAppLayerInspectEngineRegister2(const char *name,
159  AppProto alproto, uint32_t dir, int progress,
160  InspectEngineFuncPtr2 Callback2,
162 
163 void DetectPktInspectEngineRegister(const char *name,
166 
167 void DetectFrameInspectEngineRegister(const char *name, int dir,
168  InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type);
169 void DetectEngineFrameInspectEngineRegister(DetectEngineCtx *de_ctx, const char *name, int dir,
170  InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type);
171 
174 
176  const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags);
178  DetectEngineThreadCtx *det_ctx, const Signature *s,
179  Flow *f, Packet *p,
180  uint8_t *alert_flags);
182 
186 
187 int WARN_UNUSED DetectBufferSetActiveList(Signature *s, const int list);
189 
191  ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt);
192 
193 void DetectRunStoreStateTx(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t tx_id,
194  const Signature *s, uint32_t inspect_flags, uint8_t flow_flags,
195  const uint16_t file_no_match);
196 
197 void DetectRunStoreStateTxFileOnly(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t tx_id,
198  const uint8_t flow_flags, const uint16_t file_no_match);
199 
201 
202 void DeStateRegisterTests(void);
203 
204 #endif /* __DETECT_ENGINE_H__ */
DetectEngineMultiTenantSetup
int DetectEngineMultiTenantSetup(const bool unix_socket)
setup multi-detect / multi-tenancy
Definition: detect-engine.c:3997
DetectEngineAppInspectionEngine_
Definition: detect.h:392
DetectBufferSetActiveList
int WARN_UNUSED DetectBufferSetActiveList(Signature *s, const int list)
Definition: detect-engine.c:1293
DetectEngineReloadIsIdle
int DetectEngineReloadIsIdle(void)
Definition: detect-engine.c:1937
DetectBufferTypeRegister
int DetectBufferTypeRegister(const char *name)
Definition: detect-engine.c:1025
DetectEnginePktInspectionEngine
Definition: detect.h:445
DetectEngineBufferTypeRegister
int DetectEngineBufferTypeRegister(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1166
InspectionBufferGet
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
Definition: detect-engine.c:1364
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1397
DetectBufferTypeGetByName
int DetectBufferTypeGetByName(const char *name)
Definition: detect-engine.c:1079
DetectEngineTransforms
Definition: detect.h:374
DetectEnginePktInspectionRun
bool DetectEnginePktInspectionRun(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags)
Definition: detect-engine.c:1819
InspectionBufferMultipleForListGet
InspectionBuffer * InspectionBufferMultipleForListGet(DetectEngineThreadCtx *det_ctx, const int list_id, uint32_t local_id)
for a InspectionBufferMultipleForList get a InspectionBuffer
Definition: detect-engine.c:1384
DetectBufferTypeSetDescriptionByName
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Definition: detect-engine.c:1176
DetectFrameInspectEngineRegister
void DetectFrameInspectEngineRegister(const char *name, int dir, InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type)
register inspect engine at start up time
Definition: detect-engine.c:177
DetectEngineBufferTypeSupportsFrames
void DetectEngineBufferTypeSupportsFrames(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1205
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:80
InspectionBuffer
Definition: detect.h:339
Flow_
Flow data structure.
Definition: flow.h:357
DetectEngineInspectGenericList
uint8_t DetectEngineInspectGenericList(DetectEngineCtx *, DetectEngineThreadCtx *, const struct DetectEngineAppInspectionEngine_ *, const Signature *, Flow *, uint8_t, void *, void *, uint64_t)
Do the content inspection & validation for a signature.
Definition: detect-engine.c:1961
InspectionBufferFree
void InspectionBufferFree(InspectionBuffer *buffer)
Definition: detect-engine.c:1478
DetectEngineReference
DetectEngineCtx * DetectEngineReference(DetectEngineCtx *)
Definition: detect-engine.c:3646
InspectionBufferGetDataPtr
InspectionBuffer *(* InspectionBufferGetDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv, const int list_id)
Definition: detect.h:380
DetectEngineAppInspectionEngine2Signature
int DetectEngineAppInspectionEngine2Signature(DetectEngineCtx *de_ctx, Signature *s)
Definition: detect-engine.c:581
DetectThreadCtxGetGlobalKeywordThreadCtx
void * DetectThreadCtxGetGlobalKeywordThreadCtx(DetectEngineThreadCtx *det_ctx, int id)
Retrieve thread local keyword ctx by id.
Definition: detect-engine.c:3578
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:787
DetectEngineBufferTypeGetDescriptionById
const char * DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1187
DetectEngineReloadIsStart
int DetectEngineReloadIsStart(void)
Definition: detect-engine.c:1917
DetectEngineResetMaxSigId
void DetectEngineResetMaxSigId(DetectEngineCtx *)
Definition: detect-engine.c:2837
InspectionBufferClean
void InspectionBufferClean(DetectEngineThreadCtx *det_ctx)
Definition: detect-engine.c:1336
InspectionBufferGetPktDataPtr
InspectionBuffer *(* InspectionBufferGetPktDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Packet *p, const int list_id)
Definition: detect.h:440
DetectEnginePktInspectionSetup
int DetectEnginePktInspectionSetup(Signature *s)
Definition: detect-engine.c:1867
DetectBufferType_
Definition: detect.h:414
DetectEngineReload
int DetectEngineReload(const SCInstance *suri)
Reload the detection engine.
Definition: detect-engine.c:4450
DetectEngineLoadTenantBlocking
int DetectEngineLoadTenantBlocking(uint32_t tenant_id, const char *yaml)
Load a tenant and wait for loading to complete.
Definition: detect-engine.c:3848
DetectEngineCtxInit
DetectEngineCtx * DetectEngineCtxInit(void)
Definition: detect-engine.c:2416
TransformData_
Definition: detect.h:369
DetectAppLayerInspectEngineRegister2
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
Definition: detect-engine.c:224
DetectEnginePruneFreeList
void DetectEnginePruneFreeList(void)
Definition: detect-engine.c:4411
DetectEngineBufferTypeSupportsMpm
void DetectEngineBufferTypeSupportsMpm(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1221
DetectBufferTypeGetDescriptionByName
const char * DetectBufferTypeGetDescriptionByName(const char *name)
Definition: detect-engine.c:1196
DetectBufferTypeRegisterSetupCallback
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*Callback)(const DetectEngineCtx *, Signature *))
Definition: detect-engine.c:1255
DetectEngineCtxFree
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Definition: detect-engine.c:2455
DetectRunStoreStateTx
void DetectRunStoreStateTx(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t tx_id, const Signature *s, uint32_t inspect_flags, uint8_t flow_flags, const uint16_t file_no_match)
Definition: detect-engine-state.c:223
DetectEngineGetByTenantId
DetectEngineCtx * DetectEngineGetByTenantId(int tenant_id)
Definition: detect-engine.c:4294
DetectEngineThreadCtxInit
TmEcode DetectEngineThreadCtxInit(ThreadVars *, void *, void **)
initialize thread specific detection engine context
Definition: detect-engine.c:3166
DetectBufferTypeSupportsFrames
void DetectBufferTypeSupportsFrames(const char *name)
Definition: detect-engine.c:1039
DetectEngineUnsetParseMetadata
void DetectEngineUnsetParseMetadata(void)
Definition: detect-engine.c:4623
InspectionBufferSetup
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
Definition: detect-engine.c:1459
InspectionBufferPktInspectFunc
int(* InspectionBufferPktInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEnginePktInspectionEngine *engine, const struct Signature_ *s, Packet *p, uint8_t *alert_flags)
Definition: detect.h:433
DetectEngineBufferTypeSupportsTransformations
void DetectEngineBufferTypeSupportsTransformations(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1229
DetectEngineBufferTypeSupportsMpmGetById
bool DetectEngineBufferTypeSupportsMpmGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1246
DetectSigmatchListEnumToString
const char * DetectSigmatchListEnumToString(enum DetectSigmatchListEnum type)
Definition: detect-engine.c:4633
type
uint8_t type
Definition: decode-icmpv4.h:0
DetectEngineBufferTypeGetByIdTransforms
int DetectEngineBufferTypeGetByIdTransforms(DetectEngineCtx *de_ctx, const int id, TransformData *transforms, int transform_cnt)
Definition: detect-engine.c:1676
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectEngineReloadTenantBlocking
int DetectEngineReloadTenantBlocking(uint32_t tenant_id, const char *yaml, int reload_cnt)
Reload a tenant and wait for loading to complete.
Definition: detect-engine.c:3862
InspectionBufferCopy
void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len)
Definition: detect-engine.c:1507
DetectEngineThreadCtx_
Definition: detect.h:1027
DetectEngineReloadSetIdle
void DetectEngineReloadSetIdle(void)
Definition: detect-engine.c:1929
DetectEngineTentantUnregisterPcapFile
int DetectEngineTentantUnregisterPcapFile(uint32_t tenant_id)
Definition: detect-engine.c:4283
DetectEngineGetCurrent
DetectEngineCtx * DetectEngineGetCurrent(void)
Definition: detect-engine.c:3623
DetectEngineCtxInitStubForMT
DetectEngineCtx * DetectEngineCtxInitStubForMT(void)
Definition: detect-engine.c:2406
DetectEngineBufferTypeGetNameById
const char * DetectEngineBufferTypeGetNameById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1109
detect.h
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:57
InspectionBufferApplyTransforms
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
Definition: detect-engine.c:1563
DetectEngineThreadCtxDeinit
TmEcode DetectEngineThreadCtxDeinit(ThreadVars *, void *)
Definition: detect-engine.c:3380
DetectEngineBufferRunValidateCallback
bool DetectEngineBufferRunValidateCallback(const DetectEngineCtx *de_ctx, const int id, const Signature *s, const char **sigerror)
Definition: detect-engine.c:1283
DetectEngineDeReference
void DetectEngineDeReference(DetectEngineCtx **de_ctx)
Definition: detect-engine.c:4320
DetectEngineInspectBufferGeneric
uint8_t DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
Definition: detect-engine.c:2004
DetectEngineMustParseMetadata
int DetectEngineMustParseMetadata(void)
Definition: detect-engine.c:4628
InspectionBufferSetupMulti
void InspectionBufferSetupMulti(InspectionBuffer *buffer, const DetectEngineTransforms *transforms, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
Definition: detect-engine.c:1444
DetectEngineFrameInspectEngineRegister
void DetectEngineFrameInspectEngineRegister(DetectEngineCtx *de_ctx, const char *name, int dir, InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type)
register inspect engine at start up time
Definition: detect-engine.c:416
DetectEngineGetVersion
uint32_t DetectEngineGetVersion(void)
Definition: detect-engine.c:3604
DetectBufferGetActiveList
int DetectBufferGetActiveList(DetectEngineCtx *de_ctx, Signature *s)
Definition: detect-engine.c:1306
DetectBufferTypeSupportsTransformations
void DetectBufferTypeSupportsTransformations(const char *name)
Definition: detect-engine.c:1069
DetectEngineTentantUnregisterVlanId
int DetectEngineTentantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id)
Definition: detect-engine.c:4272
Packet_
Definition: decode.h:428
InspectionBufferFrameInspectFunc
int(* InspectionBufferFrameInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEngineFrameInspectionEngine *engine, const struct Signature_ *s, Packet *p, const struct Frames *frames, const struct Frame *frame)
Definition: detect.h:466
DetectEngineReloadStart
int DetectEngineReloadStart(void)
Definition: detect-engine.c:1903
DetectBufferTypeSupportsPacket
void DetectBufferTypeSupportsPacket(const char *name)
Definition: detect-engine.c:1049
TmEcode
TmEcode
Definition: tm-threads-common.h:83
InspectionBufferInit
void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size)
Definition: detect-engine.c:1421
InspectionBufferSetupMultiEmpty
void InspectionBufferSetupMultiEmpty(InspectionBuffer *buffer)
setup the buffer empty
Definition: detect-engine.c:1431
InspectEngineFuncPtr2
uint8_t(* InspectEngineFuncPtr2)(struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine, const struct Signature_ *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Definition: detect.h:387
DetectEngineAddToMaster
int DetectEngineAddToMaster(DetectEngineCtx *de_ctx)
Definition: detect-engine.c:4344
DetectEngineBufferTypeSupportsPacketGetById
bool DetectEngineBufferTypeSupportsPacketGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1237
DetectEngineThreadCtxInitForReload
DetectEngineThreadCtx * DetectEngineThreadCtxInitForReload(ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt)
Definition: detect-engine.c:3231
DetectEngineTentantRegisterPcapFile
int DetectEngineTentantRegisterPcapFile(uint32_t tenant_id)
Definition: detect-engine.c:4277
DetectEngineStateResetTxs
void DetectEngineStateResetTxs(Flow *f)
Reset de state for active tx' To be used on detect engine reload.
Definition: detect-engine-state.c:269
flags
uint8_t flags
Definition: decode-gre.h:0
DetectPktInspectEngineRegister
void DetectPktInspectEngineRegister(const char *name, InspectionBufferGetPktDataPtr GetPktData, InspectionBufferPktInspectFunc Callback)
register inspect engine at start up time
Definition: detect-engine.c:136
InspectionBufferCheckAndExpand
void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size)
make sure that the buffer has at least 'min_size' bytes Expand the buffer if necessary
Definition: detect-engine.c:1490
DetectEngineTentantRegisterLivedev
int DetectEngineTentantRegisterLivedev(uint32_t tenant_id, int device_id)
Definition: detect-engine.c:4262
DetectBufferTypeMaxId
int DetectBufferTypeMaxId(void)
Definition: detect-engine.c:916
DetectEngineSetParseMetadata
void DetectEngineSetParseMetadata(void)
Definition: detect-engine.c:4618
DetectEngineBufferTypeSupportsPacket
void DetectEngineBufferTypeSupportsPacket(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1213
DetectEngineBufferRunSetupCallback
void DetectEngineBufferRunSetupCallback(const DetectEngineCtx *de_ctx, const int id, Signature *s)
Definition: detect-engine.c:1265
DetectEngineEnabled
int DetectEngineEnabled(void)
Check if detection is enabled.
Definition: detect-engine.c:3590
DetectEngineCtxInitStubForDD
DetectEngineCtx * DetectEngineCtxInitStubForDD(void)
Definition: detect-engine.c:2411
DetectBufferTypeCloseRegistration
void DetectBufferTypeCloseRegistration(void)
Definition: detect-engine.c:1669
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:32
DetectRegisterThreadCtxGlobalFuncs
int DetectRegisterThreadCtxGlobalFuncs(const char *name, void *(*InitFunc)(void *), void *data, void(*FreeFunc)(void *))
Register Thread keyword context Funcs (Global)
Definition: detect-engine.c:3534
DetectEngineMultiTenantEnabled
int DetectEngineMultiTenantEnabled(void)
Definition: detect-engine.c:3655
DetectEngineFrameInspectionRun
bool DetectEngineFrameInspectionRun(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags)
DetectEngineMoveToFreeList
int DetectEngineMoveToFreeList(DetectEngineCtx *de_ctx)
Definition: detect-engine.c:4360
Signature_
Signature container.
Definition: detect.h:542
DetectEngineMTApply
int DetectEngineMTApply(void)
Definition: detect-engine.c:4561
DetectRunStoreStateTxFileOnly
void DetectRunStoreStateTxFileOnly(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t tx_id, const uint8_t flow_flags, const uint16_t file_no_match)
DetectEngineRegisterTests
void DetectEngineRegisterTests(void)
Definition: detect-engine.c:4893
suricata.h
DetectEngineBufferTypeRegisterWithFrameEngines
int DetectEngineBufferTypeRegisterWithFrameEngines(DetectEngineCtx *de_ctx, const char *name, const int direction, const AppProto alproto, const uint8_t frame_type)
Definition: detect-engine.c:1132
DetectEngineCtxInitWithPrefix
DetectEngineCtx * DetectEngineCtxInitWithPrefix(const char *prefix)
Definition: detect-engine.c:2421
DetectEngineBufferTypeValidateTransform
bool DetectEngineBufferTypeValidateTransform(DetectEngineCtx *de_ctx, int sm_list, const uint8_t *content, uint16_t content_len, const char **namestr)
Check content byte array compatibility with transforms.
Definition: detect-engine.c:1538
DetectEngineInspectPktBufferGeneric
int DetectEngineInspectPktBufferGeneric(DetectEngineThreadCtx *det_ctx, const DetectEnginePktInspectionEngine *engine, const Signature *s, Packet *p, uint8_t *alert_flags)
Do the content inspection & validation for a signature.
Definition: detect-engine.c:2067
SCInstance_
Definition: suricata.h:122
DetectBufferTypeSupportsMpm
void DetectBufferTypeSupportsMpm(const char *name)
Definition: detect-engine.c:1059
DetectEngineBumpVersion
void DetectEngineBumpVersion(void)
Definition: detect-engine.c:3614
DetectSigmatchListEnum
DetectSigmatchListEnum
Definition: detect.h:77
DeStateRegisterTests
void DeStateRegisterTests(void)
Definition: detect-engine-state.c:1449
DetectEngineAppInspectionEngineSignatureFree
void DetectEngineAppInspectionEngineSignatureFree(DetectEngineCtx *, Signature *s)
free app inspect engines for a signature
Definition: detect-engine.c:837
WARN_UNUSED
#define WARN_UNUSED
Definition: suricata-common.h:392
DetectEngineBufferTypeGetById
const DetectBufferType * DetectEngineBufferTypeGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1099
DetectBufferTypeRegisterValidateCallback
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
Definition: detect-engine.c:1273
DetectEngineTentantRegisterVlanId
int DetectEngineTentantRegisterVlanId(uint32_t tenant_id, uint16_t vlan_id)
Definition: detect-engine.c:4267