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 SURICATA_DETECT_ENGINE_H
25 #define SURICATA_DETECT_ENGINE_H
26 
27 #include "detect.h"
28 #include "suricata.h"
29 
30 /* start up registry funcs */
31 
32 int DetectBufferTypeRegister(const char *name);
33 int DetectBufferTypeGetByName(const char *name);
34 void DetectBufferTypeSupportsMpm(const char *name);
35 void DetectBufferTypeSupportsPacket(const char *name);
36 void DetectBufferTypeSupportsFrames(const char *name);
39 int DetectBufferTypeMaxId(void);
41 void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc);
42 const char *DetectBufferTypeGetDescriptionByName(const char *name);
44  void (*Callback)(const DetectEngineCtx *, Signature *));
46  const char *name, bool (*ValidateCallback)(const Signature *, const char **sigerror,
47  const DetectBufferType *));
48 
49 /* detect engine related buffer funcs */
50 
52  const int direction, const AppProto alproto, const uint8_t frame_type);
54 const char *DetectEngineBufferTypeGetNameById(const DetectEngineCtx *de_ctx, const int id);
59  const DetectEngineCtx *de_ctx, const int id);
61 const char *DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_ctx, const int id);
63  DetectEngineCtx *de_ctx, const int id, TransformData *transforms, int transform_cnt);
66  const DetectEngineCtx *de_ctx, const int id, const Signature *s, const char **sigerror);
68  const uint8_t *content, uint16_t content_len, const char **namestr);
73 
74 /* prototypes */
75 DetectEngineCtx *DetectEngineCtxInitWithPrefix(const char *prefix, uint32_t tenant_id);
80 
82  void *(*InitFunc)(void *), void *data, void (*FreeFunc)(void *));
84 
85 TmEcode DetectEngineThreadCtxInit(ThreadVars *, void *, void **);
88 const char *DetectEngineMpmCachingGetPath(void);
89 /* faster as a macro than a inline function on my box -- VJ */
90 #define DetectEngineGetMaxSigId(de_ctx) ((de_ctx)->signum)
92 void DetectEngineRegisterTests(void);
94 
95 uint32_t DetectEngineGetVersion(void);
96 void DetectEngineBumpVersion(void);
99 DetectEngineCtx *DetectEngineGetByTenantId(uint32_t tenant_id);
100 void DetectEnginePruneFreeList(void);
102 void DetectEngineClearMaster(void);
105 int DetectEngineReload(const SCInstance *suri);
106 int DetectEngineEnabled(void);
107 int DetectEngineMTApply(void);
109 int DetectEngineMultiTenantSetup(const bool unix_socket);
110 
111 int DetectEngineReloadStart(void);
112 int DetectEngineReloadIsStart(void);
113 void DetectEngineReloadSetIdle(void);
114 int DetectEngineReloadIsIdle(void);
115 
116 int DetectEngineLoadTenantBlocking(uint32_t tenant_id, const char *yaml);
117 int DetectEngineReloadTenantBlocking(uint32_t tenant_id, const char *yaml, int reload_cnt);
118 int DetectEngineReloadTenantsBlocking(const int reload_cnt);
119 
120 int DetectEngineTenantRegisterLivedev(uint32_t tenant_id, int device_id);
121 int DetectEngineTenantRegisterVlanId(uint32_t tenant_id, uint16_t vlan_id);
122 int DetectEngineTenantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id);
123 int DetectEngineTenantRegisterPcapFile(uint32_t tenant_id);
124 int DetectEngineTenantUnregisterPcapFile(uint32_t tenant_id);
125 
127  const struct DetectEngineAppInspectionEngine_ *, const Signature *, Flow *, uint8_t, void *,
128  void *, uint64_t);
129 
131  const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
132  void *alstate, void *txv, uint64_t tx_id);
133 
135  const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
136  void *alstate, void *txv, uint64_t tx_id);
137 
139  const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv,
140  const int list_id, InspectionSingleBufferGetDataPtr GetBuf);
142  const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv,
143  const int list_id, uint32_t index, InspectionMultiBufferGetDataPtr GetBuf);
146  const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
147 
149  DetectEngineThreadCtx *det_ctx,
150  const DetectEnginePktInspectionEngine *engine,
151  const Signature *s, Packet *p, uint8_t *alert_flags);
152 
153 /**
154  * \brief Registers an app inspection engine.
155  *
156  * \param name Name of the detection list
157  * \param alproto App layer protocol for which we will register the engine.
158  * \param direction The direction for the engine: SIG_FLAG_TOSERVER or
159  * SIG_FLAG_TOCLIENT
160  * \param progress Minimal progress value for inspect engine to run
161  * \param Callback The engine callback.
162  */
163 void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir,
164  int progress, InspectEngineFuncPtr Callback2, InspectionBufferGetDataPtr GetData);
165 
166 void DetectAppLayerInspectEngineRegisterSingle(const char *name, AppProto alproto, uint32_t dir,
167  int progress, InspectEngineFuncPtr Callback2, InspectionSingleBufferGetDataPtr GetData);
168 
169 void DetectAppLayerMultiRegister(const char *name, AppProto alproto, uint32_t dir, int progress,
170  InspectionMultiBufferGetDataPtr GetData, int priority);
171 
172 void DetectPktInspectEngineRegister(const char *name,
175 
177  InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type);
178 
181 
183  DetectEngineThreadCtx *det_ctx, const Signature *s,
184  Flow *f, Packet *p,
185  uint8_t *alert_flags);
187 
191 
192 bool DetectBufferIsPresent(const Signature *s, const uint32_t buf_id);
193 
195  ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt);
196 
197 void DetectRunStoreStateTx(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t tx_id,
198  const Signature *s, uint32_t inspect_flags, uint8_t flow_flags,
199  const uint16_t file_no_match);
200 
202 
204  const Signature *s, const char **sigerror, const DetectBufferType *map);
205 
206 void DeStateRegisterTests(void);
207 
208 /* packet injection */
209 void InjectPacketsForFlush(ThreadVars **detect_tvs, int no_of_detect_tvs);
210 #endif /* SURICATA_DETECT_ENGINE_H */
DetectEngineMultiTenantSetup
int DetectEngineMultiTenantSetup(const bool unix_socket)
setup multi-detect / multi-tenancy
Definition: detect-engine.c:4265
DetectEngineAppInspectionEngine_
Definition: detect.h:417
DetectEngineReloadIsIdle
int DetectEngineReloadIsIdle(void)
Definition: detect-engine.c:1909
DetectBufferTypeRegister
int DetectBufferTypeRegister(const char *name)
Definition: detect-engine.c:1192
DetectEnginePktInspectionEngine
Definition: detect.h:484
DetectEngineBufferTypeRegister
int DetectEngineBufferTypeRegister(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1343
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1589
DetectAppLayerInspectEngineRegister
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback2, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
Definition: detect-engine.c:249
DetectBufferTypeGetByName
int DetectBufferTypeGetByName(const char *name)
Definition: detect-engine.c:1256
DetectEngineTransforms
Definition: detect.h:392
DetectEnginePktInspectionRun
bool DetectEnginePktInspectionRun(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags)
Definition: detect-engine.c:1791
DetectBufferTypeSetDescriptionByName
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Definition: detect-engine.c:1353
DetectEngineBufferTypeSupportsFrames
void DetectEngineBufferTypeSupportsFrames(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1382
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:86
InspectionBuffer
Definition: detect-engine-inspect-buffer.h:34
DetectEngineTenantUnregisterPcapFile
int DetectEngineTenantUnregisterPcapFile(uint32_t tenant_id)
Definition: detect-engine.c:4567
DetectEngineMpmCachingGetPath
const char * DetectEngineMpmCachingGetPath(void)
Definition: detect-engine.c:2452
Flow_
Flow data structure.
Definition: flow.h:356
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:1933
DetectEngineReference
DetectEngineCtx * DetectEngineReference(DetectEngineCtx *)
Definition: detect-engine.c:3836
DetectEngineAppInspectionEngine2Signature
int DetectEngineAppInspectionEngine2Signature(DetectEngineCtx *de_ctx, Signature *s)
Definition: detect-engine.c:777
DetectThreadCtxGetGlobalKeywordThreadCtx
void * DetectThreadCtxGetGlobalKeywordThreadCtx(DetectEngineThreadCtx *det_ctx, int id)
Retrieve thread local keyword ctx by id.
Definition: detect-engine.c:3768
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:919
DetectEngineBufferTypeGetDescriptionById
const char * DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1364
DetectEngineReloadIsStart
int DetectEngineReloadIsStart(void)
Definition: detect-engine.c:1889
DetectEngineResetMaxSigId
void DetectEngineResetMaxSigId(DetectEngineCtx *)
Definition: detect-engine.c:3036
InspectionBufferGetPktDataPtr
InspectionBuffer *(* InspectionBufferGetPktDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Packet *p, const int list_id)
Definition: detect.h:479
DetectEngineCtxInitWithPrefix
DetectEngineCtx * DetectEngineCtxInitWithPrefix(const char *prefix, uint32_t tenant_id)
Definition: detect-engine.c:2590
DetectEngineBufferTypeSupportsMultiInstanceGetById
bool DetectEngineBufferTypeSupportsMultiInstanceGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1414
DetectGetMultiData
InspectionBuffer * DetectGetMultiData(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv, const int list_id, uint32_t index, InspectionMultiBufferGetDataPtr GetBuf)
Definition: detect-engine.c:2112
DetectEnginePktInspectionSetup
int DetectEnginePktInspectionSetup(Signature *s)
Definition: detect-engine.c:1839
DetectBufferType_
Definition: detect.h:450
DetectEngineReload
int DetectEngineReload(const SCInstance *suri)
Reload the detection engine.
Definition: detect-engine.c:4755
DetectEngineLoadTenantBlocking
int DetectEngineLoadTenantBlocking(uint32_t tenant_id, const char *yaml)
Load a tenant and wait for loading to complete.
Definition: detect-engine.c:4102
DetectEngineCtxInit
DetectEngineCtx * DetectEngineCtxInit(void)
Definition: detect-engine.c:2585
DetectEngineTenantRegisterLivedev
int DetectEngineTenantRegisterLivedev(uint32_t tenant_id, int device_id)
Definition: detect-engine.c:4545
TransformData_
Definition: detect.h:387
DetectEnginePruneFreeList
void DetectEnginePruneFreeList(void)
Definition: detect-engine.c:4698
DetectEngineBufferTypeSupportsMpm
void DetectEngineBufferTypeSupportsMpm(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1398
DetectBufferTypeGetDescriptionByName
const char * DetectBufferTypeGetDescriptionByName(const char *name)
Definition: detect-engine.c:1373
DetectBufferTypeRegisterSetupCallback
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*Callback)(const DetectEngineCtx *, Signature *))
Definition: detect-engine.c:1450
DetectEngineCtxFree
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Definition: detect-engine.c:2624
InjectPacketsForFlush
void InjectPacketsForFlush(ThreadVars **detect_tvs, int no_of_detect_tvs)
Definition: detect-engine.c:2226
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:214
DetectEngineGetByTenantId
DetectEngineCtx * DetectEngineGetByTenantId(uint32_t tenant_id)
Definition: detect-engine.c:4578
DetectEngineTenantUnregisterVlanId
int DetectEngineTenantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id)
Definition: detect-engine.c:4556
DetectEngineThreadCtxInit
TmEcode DetectEngineThreadCtxInit(ThreadVars *, void *, void **)
initialize thread specific detection engine context
Definition: detect-engine.c:3350
DetectBufferTypeSupportsFrames
void DetectBufferTypeSupportsFrames(const char *name)
Definition: detect-engine.c:1216
DetectEngineUnsetParseMetadata
void DetectEngineUnsetParseMetadata(void)
Definition: detect-engine.c:4941
InspectionBufferPktInspectFunc
int(* InspectionBufferPktInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEnginePktInspectionEngine *engine, const struct Signature_ *s, Packet *p, uint8_t *alert_flags)
Definition: detect.h:472
DetectEngineBufferTypeSupportsTransformations
void DetectEngineBufferTypeSupportsTransformations(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1406
DetectEngineBufferTypeSupportsMpmGetById
bool DetectEngineBufferTypeSupportsMpmGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1432
DetectSigmatchListEnumToString
const char * DetectSigmatchListEnumToString(enum DetectSigmatchListEnum type)
Definition: detect-engine.c:4951
DetectEngineBufferTypeGetByIdTransforms
int DetectEngineBufferTypeGetByIdTransforms(DetectEngineCtx *de_ctx, const int id, TransformData *transforms, int transform_cnt)
Definition: detect-engine.c:1641
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:18
DetectEngineBufferTypeSupportsFramesGetById
bool DetectEngineBufferTypeSupportsFramesGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1441
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:4116
DetectEngineThreadCtx_
Definition: detect.h:1211
DetectEngineReloadSetIdle
void DetectEngineReloadSetIdle(void)
Definition: detect-engine.c:1901
DetectEngineGetCurrent
DetectEngineCtx * DetectEngineGetCurrent(void)
Definition: detect-engine.c:3813
DetectAppLayerInspectEngineRegisterSingle
void DetectAppLayerInspectEngineRegisterSingle(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback2, InspectionSingleBufferGetDataPtr GetData)
Definition: detect-engine.c:271
DetectEngineCtxInitStubForMT
DetectEngineCtx * DetectEngineCtxInitStubForMT(void)
Definition: detect-engine.c:2575
DetectEngineBufferTypeGetNameById
const char * DetectEngineBufferTypeGetNameById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1286
detect.h
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
DetectEngineThreadCtxDeinit
TmEcode DetectEngineThreadCtxDeinit(ThreadVars *, void *)
Definition: detect-engine.c:3576
InspectionSingleBufferGetDataPtr
bool(* InspectionSingleBufferGetDataPtr)(const void *txv, const uint8_t flow_flags, const uint8_t **buf, uint32_t *buf_len)
Definition: detect-engine-helper.h:45
DetectEngineBufferRunValidateCallback
bool DetectEngineBufferRunValidateCallback(const DetectEngineCtx *de_ctx, const int id, const Signature *s, const char **sigerror)
Definition: detect-engine.c:1479
DetectEngineClearMaster
void DetectEngineClearMaster(void)
Definition: detect-engine.c:4728
DetectEngineDeReference
void DetectEngineDeReference(DetectEngineCtx **de_ctx)
Definition: detect-engine.c:4604
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:2036
DetectEngineMustParseMetadata
int DetectEngineMustParseMetadata(void)
Definition: detect-engine.c:4946
DetectEngineInspectMultiBufferGeneric
uint8_t DetectEngineInspectMultiBufferGeneric(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)
Definition: detect-engine.c:2136
DetectAppLayerMultiRegister
void DetectAppLayerMultiRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectionMultiBufferGetDataPtr GetData, int priority)
Definition: detect-engine.c:2086
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:427
DetectEngineGetVersion
uint32_t DetectEngineGetVersion(void)
Definition: detect-engine.c:3794
DetectEngineTenantRegisterVlanId
int DetectEngineTenantRegisterVlanId(uint32_t tenant_id, uint16_t vlan_id)
Definition: detect-engine.c:4551
DetectBufferTypeSupportsTransformations
void DetectBufferTypeSupportsTransformations(const char *name)
Definition: detect-engine.c:1246
Packet_
Definition: decode.h:492
type
uint16_t type
Definition: decode-vlan.c:106
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:505
DetectEngineReloadStart
int DetectEngineReloadStart(void)
Definition: detect-engine.c:1875
DetectBufferTypeSupportsPacket
void DetectBufferTypeSupportsPacket(const char *name)
Definition: detect-engine.c:1226
TmEcode
TmEcode
Definition: tm-threads-common.h:80
name
const char * name
Definition: tm-threads.c:2123
InspectionMultiBufferGetDataPtr
bool(* InspectionMultiBufferGetDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const void *txv, const uint8_t flow_flags, uint32_t local_id, const uint8_t **buf, uint32_t *buf_len)
Definition: detect-engine-helper.h:42
DetectEngineAddToMaster
int DetectEngineAddToMaster(DetectEngineCtx *de_ctx)
Definition: detect-engine.c:4628
DetectEngineBufferTypeSupportsPacketGetById
bool DetectEngineBufferTypeSupportsPacketGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1423
DetectEngineThreadCtxInitForReload
DetectEngineThreadCtx * DetectEngineThreadCtxInitForReload(ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt)
Definition: detect-engine.c:3429
DetectGetSingleData
InspectionBuffer * DetectGetSingleData(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv, const int list_id, InspectionSingleBufferGetDataPtr GetBuf)
Definition: detect-engine.c:2095
DetectEngineStateResetTxs
void DetectEngineStateResetTxs(Flow *f)
Reset de state for active tx' To be used on detect engine reload.
Definition: detect-engine-state.c:260
InspectEngineFuncPtr
uint8_t(* InspectEngineFuncPtr)(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:412
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:132
DetectBufferTypeMaxId
int DetectBufferTypeMaxId(void)
Definition: detect-engine.c:1013
DetectEngineSetParseMetadata
void DetectEngineSetParseMetadata(void)
Definition: detect-engine.c:4936
DetectEngineBufferTypeSupportsPacket
void DetectEngineBufferTypeSupportsPacket(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1390
DetectEngineBufferRunSetupCallback
void DetectEngineBufferRunSetupCallback(const DetectEngineCtx *de_ctx, const int id, Signature *s)
Definition: detect-engine.c:1460
DetectEngineEnabled
int DetectEngineEnabled(void)
Check if detection is enabled.
Definition: detect-engine.c:3780
DetectMd5ValidateCallback
bool DetectMd5ValidateCallback(const Signature *s, const char **sigerror, const DetectBufferType *map)
Definition: detect-engine.c:4986
DetectEngineCtxInitStubForDD
DetectEngineCtx * DetectEngineCtxInitStubForDD(void)
Definition: detect-engine.c:2580
DetectBufferTypeCloseRegistration
void DetectBufferTypeCloseRegistration(void)
Definition: detect-engine.c:1634
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:3724
DetectEngineMultiTenantEnabled
int DetectEngineMultiTenantEnabled(void)
Definition: detect-engine.c:3845
DetectEngineMoveToFreeList
int DetectEngineMoveToFreeList(DetectEngineCtx *de_ctx)
Definition: detect-engine.c:4688
Signature_
Signature container.
Definition: detect.h:657
DetectEngineMTApply
int DetectEngineMTApply(void)
Definition: detect-engine.c:4879
DetectEngineRegisterTests
void DetectEngineRegisterTests(void)
Definition: detect-engine.c:5237
DetectEngineReloadTenantsBlocking
int DetectEngineReloadTenantsBlocking(const int reload_cnt)
Reload all tenants and wait for loading to complete.
Definition: detect-engine.c:4130
suricata.h
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-engine-helper.h:39
DetectEngineBufferTypeRegisterWithFrameEngines
int DetectEngineBufferTypeRegisterWithFrameEngines(DetectEngineCtx *de_ctx, const char *name, const int direction, const AppProto alproto, const uint8_t frame_type)
Definition: detect-engine.c:1309
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:1518
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:2184
DetectEngineInspectBufferSingle
uint8_t DetectEngineInspectBufferSingle(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:1975
DetectEngineMpmCachingEnabled
bool DetectEngineMpmCachingEnabled(void)
Definition: detect-engine.c:2441
SCInstance_
Definition: suricata.h:128
DetectBufferIsPresent
bool DetectBufferIsPresent(const Signature *s, const uint32_t buf_id)
Definition: detect-engine.c:1490
DetectBufferTypeSupportsMpm
void DetectBufferTypeSupportsMpm(const char *name)
Definition: detect-engine.c:1236
DetectEngineBumpVersion
void DetectEngineBumpVersion(void)
Definition: detect-engine.c:3804
DetectSigmatchListEnum
DetectSigmatchListEnum
Definition: detect.h:115
DeStateRegisterTests
void DeStateRegisterTests(void)
Definition: detect-engine-state.c:1437
DetectEngineAppInspectionEngineSignatureFree
void DetectEngineAppInspectionEngineSignatureFree(DetectEngineCtx *, Signature *s)
free app inspect engines for a signature
Definition: detect-engine.c:907
DetectEngineTenantRegisterPcapFile
int DetectEngineTenantRegisterPcapFile(uint32_t tenant_id)
Definition: detect-engine.c:4561
DetectBufferTypeRegisterValidateCallback
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror, const DetectBufferType *))
Definition: detect-engine.c:1468
DetectEngineBufferTypeGetById
const DetectBufferType * DetectEngineBufferTypeGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1276
DetectBufferTypeSupportsMultiInstance
void DetectBufferTypeSupportsMultiInstance(const char *name)
Definition: detect-engine.c:1206