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 "tm-threads.h"
29 #include "flow-private.h"
30 
31 #include "detect-engine-frame.h"
32 
33 void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size);
34 void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
35  InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len);
37 void InspectionBufferCheckAndExpand(InspectionBuffer *buffer, uint32_t min_size);
38 void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len);
40  const DetectEngineTransforms *transforms);
42 InspectionBuffer *InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id);
44  const uint8_t *data, const uint32_t data_len);
46  DetectEngineThreadCtx *det_ctx, const int list_id, uint32_t local_id);
47 
48 /* start up registery funcs */
49 
50 int DetectBufferTypeRegister(const char *name);
51 int DetectBufferTypeGetByName(const char *name);
52 void DetectBufferTypeSupportsMpm(const char *name);
53 void DetectBufferTypeSupportsPacket(const char *name);
54 void DetectBufferTypeSupportsFrames(const char *name);
55 void DetectBufferTypeSupportsTransformations(const char *name);
56 int DetectBufferTypeMaxId(void);
58 void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc);
59 const char *DetectBufferTypeGetDescriptionByName(const char *name);
60 void DetectBufferTypeRegisterSetupCallback(const char *name,
61  void (*Callback)(const DetectEngineCtx *, Signature *));
62 void DetectBufferTypeRegisterValidateCallback(const char *name,
63  bool (*ValidateCallback)(const Signature *, const char **sigerror));
64 
65 /* detect engine related buffer funcs */
66 
68  const int direction, const AppProto alproto, const uint8_t frame_type);
70 const char *DetectEngineBufferTypeGetNameById(const DetectEngineCtx *de_ctx, const int id);
74 const char *DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_ctx, const int id);
77  DetectEngineCtx *de_ctx, const int id, TransformData *transforms, int transform_cnt);
80  const DetectEngineCtx *de_ctx, const int id, const Signature *s, const char **sigerror);
82  const uint8_t *content, uint16_t content_len, const char **namestr);
87 
88 /* prototypes */
94 
95 int DetectRegisterThreadCtxGlobalFuncs(const char *name,
96  void *(*InitFunc)(void *), void *data, void (*FreeFunc)(void *));
98 
99 TmEcode DetectEngineThreadCtxInit(ThreadVars *, void *, void **);
101 //inline uint32_t DetectEngineGetMaxSigId(DetectEngineCtx *);
102 /* faster as a macro than a inline function on my box -- VJ */
103 #define DetectEngineGetMaxSigId(de_ctx) ((de_ctx)->signum)
105 void DetectEngineRegisterTests(void);
107 
108 uint32_t DetectEngineGetVersion(void);
109 void DetectEngineBumpVersion(void);
113 void DetectEnginePruneFreeList(void);
117 int DetectEngineReload(const SCInstance *suri);
118 int DetectEngineEnabled(void);
119 int DetectEngineMTApply(void);
122 
123 int DetectEngineReloadStart(void);
124 int DetectEngineReloadIsStart(void);
125 void DetectEngineReloadSetIdle(void);
126 int DetectEngineReloadIsIdle(void);
127 
128 int DetectEngineLoadTenantBlocking(uint32_t tenant_id, const char *yaml);
129 int DetectEngineReloadTenantBlocking(uint32_t tenant_id, const char *yaml, int reload_cnt);
130 
131 int DetectEngineTentantRegisterLivedev(uint32_t tenant_id, int device_id);
132 int DetectEngineTentantRegisterVlanId(uint32_t tenant_id, uint16_t vlan_id);
133 int DetectEngineTentantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id);
134 int DetectEngineTentantRegisterPcapFile(uint32_t tenant_id);
135 int DetectEngineTentantUnregisterPcapFile(uint32_t tenant_id);
136 
138  const Signature *, const SigMatchData *, Flow *, const uint8_t, void *, void *, uint64_t);
139 
141  const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
142  void *alstate, void *txv, uint64_t tx_id);
143 
145  DetectEngineThreadCtx *det_ctx,
146  const DetectEnginePktInspectionEngine *engine,
147  const Signature *s, Packet *p, uint8_t *alert_flags);
148 
149 /**
150  * \brief Registers an app inspection engine.
151  *
152  * \param name Name of the detection list
153  * \param alproto App layer protocol for which we will register the engine.
154  * \param direction The direction for the engine: SIG_FLAG_TOSERVER or
155  * SIG_FLAG_TOCLIENT
156  * \param progress Minimal progress value for inspect engine to run
157  * \param Callback The engine callback.
158  */
159 void DetectAppLayerInspectEngineRegister2(const char *name,
160  AppProto alproto, uint32_t dir, int progress,
161  InspectEngineFuncPtr2 Callback2,
163 
164 void DetectPktInspectEngineRegister(const char *name,
167 
168 void DetectFrameInspectEngineRegister(const char *name, int dir,
169  InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type);
170 void DetectEngineFrameInspectEngineRegister(DetectEngineCtx *de_ctx, const char *name, int dir,
171  InspectionBufferFrameInspectFunc Callback, AppProto alproto, uint8_t type);
172 
175 
177  const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags);
179  DetectEngineThreadCtx *det_ctx, const Signature *s,
180  Flow *f, Packet *p,
181  uint8_t *alert_flags);
183 
187 
188 int WARN_UNUSED DetectBufferSetActiveList(Signature *s, const int list);
190 
192  ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt);
193 
194 #endif /* __DETECT_ENGINE_H__ */
tm-threads.h
DetectEngineAppInspectionEngine_
Definition: detect.h:399
DetectEngineInspectGenericList
uint8_t DetectEngineInspectGenericList(const DetectEngineCtx *, DetectEngineThreadCtx *, const Signature *, const SigMatchData *, Flow *, const uint8_t, void *, void *, uint64_t)
Do the content inspection & validation for a signature.
Definition: detect-engine.c:1949
DetectBufferSetActiveList
int WARN_UNUSED DetectBufferSetActiveList(Signature *s, const int list)
Definition: detect-engine.c:1298
DetectEngineReloadIsIdle
int DetectEngineReloadIsIdle(void)
Definition: detect-engine.c:1925
DetectBufferTypeRegister
int DetectBufferTypeRegister(const char *name)
Definition: detect-engine.c:1030
DetectEnginePktInspectionEngine
Definition: detect.h:452
DetectEngineBufferTypeRegister
int DetectEngineBufferTypeRegister(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1171
InspectionBufferGet
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
Definition: detect-engine.c:1367
DetectBufferTypeGetByName
int DetectBufferTypeGetByName(const char *name)
Definition: detect-engine.c:1084
DetectEngineTransforms
Definition: detect.h:381
DetectEnginePktInspectionRun
bool DetectEnginePktInspectionRun(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags)
Definition: detect-engine.c:1807
InspectionBufferMultipleForListGet
InspectionBuffer * InspectionBufferMultipleForListGet(DetectEngineThreadCtx *det_ctx, const int list_id, uint32_t local_id)
for a InspectionBufferMultipleForList get a InspectionBuffer
Definition: detect-engine.c:1387
DetectBufferTypeSetDescriptionByName
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Definition: detect-engine.c:1181
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:1210
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:80
InspectionBuffer
Definition: detect.h:347
flow-private.h
Flow_
Flow data structure.
Definition: flow.h:356
InspectionBufferFree
void InspectionBufferFree(InspectionBuffer *buffer)
Definition: detect-engine.c:1466
DetectEngineReference
DetectEngineCtx * DetectEngineReference(DetectEngineCtx *)
Definition: detect-engine.c:3624
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:387
DetectEngineAppInspectionEngine2Signature
int DetectEngineAppInspectionEngine2Signature(DetectEngineCtx *de_ctx, Signature *s)
Definition: detect-engine.c:585
DetectThreadCtxGetGlobalKeywordThreadCtx
void * DetectThreadCtxGetGlobalKeywordThreadCtx(DetectEngineThreadCtx *det_ctx, int id)
Retrieve thread local keyword ctx by id.
Definition: detect-engine.c:3556
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:794
DetectEngineBufferTypeGetDescriptionById
const char * DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1192
DetectEngineReloadIsStart
int DetectEngineReloadIsStart(void)
Definition: detect-engine.c:1905
DetectEngineResetMaxSigId
void DetectEngineResetMaxSigId(DetectEngineCtx *)
Definition: detect-engine.c:2819
InspectionBufferClean
void InspectionBufferClean(DetectEngineThreadCtx *det_ctx)
Definition: detect-engine.c:1341
InspectionBufferGetPktDataPtr
InspectionBuffer *(* InspectionBufferGetPktDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Packet *p, const int list_id)
Definition: detect.h:447
detect-engine-frame.h
DetectEnginePktInspectionSetup
int DetectEnginePktInspectionSetup(Signature *s)
Definition: detect-engine.c:1855
DetectBufferType_
Definition: detect.h:421
DetectEngineReload
int DetectEngineReload(const SCInstance *suri)
Reload the detection engine.
Definition: detect-engine.c:4428
DetectEngineLoadTenantBlocking
int DetectEngineLoadTenantBlocking(uint32_t tenant_id, const char *yaml)
Load a tenant and wait for loading to complete.
Definition: detect-engine.c:3827
SigMatchData_
Data needed for Match()
Definition: detect.h:332
DetectEngineCtxInit
DetectEngineCtx * DetectEngineCtxInit(void)
Definition: detect-engine.c:2400
TransformData_
Definition: detect.h:376
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:225
DetectEnginePruneFreeList
void DetectEnginePruneFreeList(void)
Definition: detect-engine.c:4389
DetectEngineBufferTypeSupportsMpm
void DetectEngineBufferTypeSupportsMpm(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1226
DetectBufferTypeGetDescriptionByName
const char * DetectBufferTypeGetDescriptionByName(const char *name)
Definition: detect-engine.c:1201
DetectBufferTypeRegisterSetupCallback
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*Callback)(const DetectEngineCtx *, Signature *))
Definition: detect-engine.c:1260
DetectEngineCtxFree
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Definition: detect-engine.c:2439
DetectEngineGetByTenantId
DetectEngineCtx * DetectEngineGetByTenantId(int tenant_id)
Definition: detect-engine.c:4272
DetectEngineThreadCtxInit
TmEcode DetectEngineThreadCtxInit(ThreadVars *, void *, void **)
initialize thread specific detection engine context
Definition: detect-engine.c:3146
DetectBufferTypeSupportsFrames
void DetectBufferTypeSupportsFrames(const char *name)
Definition: detect-engine.c:1044
DetectEngineUnsetParseMetadata
void DetectEngineUnsetParseMetadata(void)
Definition: detect-engine.c:4592
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:1448
InspectionBufferPktInspectFunc
int(* InspectionBufferPktInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEnginePktInspectionEngine *engine, const struct Signature_ *s, Packet *p, uint8_t *alert_flags)
Definition: detect.h:440
DetectEngineBufferTypeSupportsTransformations
void DetectEngineBufferTypeSupportsTransformations(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1234
DetectEngineBufferTypeSupportsMpmGetById
bool DetectEngineBufferTypeSupportsMpmGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1251
DetectSigmatchListEnumToString
const char * DetectSigmatchListEnumToString(enum DetectSigmatchListEnum type)
Definition: detect-engine.c:4602
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:1663
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:3841
InspectionBufferCopy
void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len)
Definition: detect-engine.c:1495
DetectEngineThreadCtx_
Definition: detect.h:1043
DetectEngineReloadSetIdle
void DetectEngineReloadSetIdle(void)
Definition: detect-engine.c:1917
DetectEngineTentantUnregisterPcapFile
int DetectEngineTentantUnregisterPcapFile(uint32_t tenant_id)
Definition: detect-engine.c:4261
DetectEngineGetCurrent
DetectEngineCtx * DetectEngineGetCurrent(void)
Definition: detect-engine.c:3601
DetectEngineCtxInitStubForMT
DetectEngineCtx * DetectEngineCtxInitStubForMT(void)
Definition: detect-engine.c:2390
DetectEngineBufferTypeGetNameById
const char * DetectEngineBufferTypeGetNameById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1114
detect.h
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
InspectionBufferApplyTransforms
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
Definition: detect-engine.c:1550
DetectEngineThreadCtxDeinit
TmEcode DetectEngineThreadCtxDeinit(ThreadVars *, void *)
Definition: detect-engine.c:3358
DetectEngineBufferRunValidateCallback
bool DetectEngineBufferRunValidateCallback(const DetectEngineCtx *de_ctx, const int id, const Signature *s, const char **sigerror)
Definition: detect-engine.c:1288
DetectEngineDeReference
void DetectEngineDeReference(DetectEngineCtx **de_ctx)
Definition: detect-engine.c:4298
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:1991
DetectEngineMustParseMetadata
int DetectEngineMustParseMetadata(void)
Definition: detect-engine.c:4597
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:1434
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:418
DetectEngineGetVersion
uint32_t DetectEngineGetVersion(void)
Definition: detect-engine.c:3582
DetectBufferGetActiveList
int DetectBufferGetActiveList(DetectEngineCtx *de_ctx, Signature *s)
Definition: detect-engine.c:1311
DetectBufferTypeSupportsTransformations
void DetectBufferTypeSupportsTransformations(const char *name)
Definition: detect-engine.c:1074
DetectEngineTentantUnregisterVlanId
int DetectEngineTentantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id)
Definition: detect-engine.c:4250
Packet_
Definition: decode.h:442
DetectEngineReloadStart
int DetectEngineReloadStart(void)
Definition: detect-engine.c:1891
DetectBufferTypeSupportsPacket
void DetectBufferTypeSupportsPacket(const char *name)
Definition: detect-engine.c:1054
TmEcode
TmEcode
Definition: tm-threads-common.h:81
InspectionBufferInit
void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size)
Definition: detect-engine.c:1424
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:394
DetectEngineAddToMaster
int DetectEngineAddToMaster(DetectEngineCtx *de_ctx)
Definition: detect-engine.c:4322
DetectEngineBufferTypeSupportsPacketGetById
bool DetectEngineBufferTypeSupportsPacketGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1242
DetectEngineThreadCtxInitForReload
DetectEngineThreadCtx * DetectEngineThreadCtxInitForReload(ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt)
Definition: detect-engine.c:3211
DetectEngineTentantRegisterPcapFile
int DetectEngineTentantRegisterPcapFile(uint32_t tenant_id)
Definition: detect-engine.c:4255
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:134
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:1478
DetectEngineTentantRegisterLivedev
int DetectEngineTentantRegisterLivedev(uint32_t tenant_id, int device_id)
Definition: detect-engine.c:4240
DetectBufferTypeMaxId
int DetectBufferTypeMaxId(void)
Definition: detect-engine.c:920
DetectEngineSetParseMetadata
void DetectEngineSetParseMetadata(void)
Definition: detect-engine.c:4587
DetectEngineBufferTypeSupportsPacket
void DetectEngineBufferTypeSupportsPacket(DetectEngineCtx *de_ctx, const char *name)
Definition: detect-engine.c:1218
DetectEngineBufferRunSetupCallback
void DetectEngineBufferRunSetupCallback(const DetectEngineCtx *de_ctx, const int id, Signature *s)
Definition: detect-engine.c:1270
DetectEngineEnabled
int DetectEngineEnabled(void)
Check if detection is enabled.
Definition: detect-engine.c:3568
DetectEngineCtxInitStubForDD
DetectEngineCtx * DetectEngineCtxInitStubForDD(void)
Definition: detect-engine.c:2395
DetectBufferTypeCloseRegistration
void DetectBufferTypeCloseRegistration(void)
Definition: detect-engine.c:1656
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:29
DetectRegisterThreadCtxGlobalFuncs
int DetectRegisterThreadCtxGlobalFuncs(const char *name, void *(*InitFunc)(void *), void *data, void(*FreeFunc)(void *))
Register Thread keyword context Funcs (Global)
Definition: detect-engine.c:3512
InspectionBufferFrameInspectFunc
int(* InspectionBufferFrameInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEngineFrameInspectionEngine *engine, const struct Signature_ *s, Packet *p, const struct Frames *frames, const struct Frame *frame, const uint32_t idx)
Definition: detect.h:473
DetectEngineMultiTenantEnabled
int DetectEngineMultiTenantEnabled(void)
Definition: detect-engine.c:3633
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:4338
Signature_
Signature container.
Definition: detect.h:549
DetectEngineMTApply
int DetectEngineMTApply(void)
Definition: detect-engine.c:4532
DetectEngineRegisterTests
void DetectEngineRegisterTests(void)
Definition: detect-engine.c:4861
DetectEngineBufferTypeRegisterWithFrameEngines
int DetectEngineBufferTypeRegisterWithFrameEngines(DetectEngineCtx *de_ctx, const char *name, const int direction, const AppProto alproto, const uint8_t frame_type)
Definition: detect-engine.c:1137
DetectEngineCtxInitWithPrefix
DetectEngineCtx * DetectEngineCtxInitWithPrefix(const char *prefix)
Definition: detect-engine.c:2405
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:1525
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:2054
SCInstance_
Definition: suricata.h:123
DetectBufferTypeSupportsMpm
void DetectBufferTypeSupportsMpm(const char *name)
Definition: detect-engine.c:1064
DetectEngineBumpVersion
void DetectEngineBumpVersion(void)
Definition: detect-engine.c:3592
DetectSigmatchListEnum
DetectSigmatchListEnum
Definition: detect.h:88
DetectEngineAppInspectionEngineSignatureFree
void DetectEngineAppInspectionEngineSignatureFree(DetectEngineCtx *, Signature *s)
free app inspect engines for a signature
Definition: detect-engine.c:841
WARN_UNUSED
#define WARN_UNUSED
Definition: suricata-common.h:384
DetectEngineBufferTypeGetById
const DetectBufferType * DetectEngineBufferTypeGetById(const DetectEngineCtx *de_ctx, const int id)
Definition: detect-engine.c:1104
DetectEngineMultiTenantSetup
int DetectEngineMultiTenantSetup(void)
setup multi-detect / multi-tenancy
Definition: detect-engine.c:3973
DetectBufferTypeRegisterValidateCallback
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
Definition: detect-engine.c:1278
DetectEngineTentantRegisterVlanId
int DetectEngineTentantRegisterVlanId(uint32_t tenant_id, uint16_t vlan_id)
Definition: detect-engine.c:4245