52#include "rust-bindings.h"
54#define KEYWORD_NAME_INITIATOR "ike.init_spi"
55#define KEYWORD_DOC_INITIATOR "ike-keywords.html#ike-init_spi";
56#define BUFFER_NAME_INITIATOR "ike.init_spi"
57#define BUFFER_DESC_INITIATOR "ike init spi"
59#define KEYWORD_NAME_RESPONDER "ike.resp_spi"
60#define KEYWORD_DOC_RESPONDER "ike-keywords.html#ike-resp_spi";
61#define BUFFER_NAME_RESPONDER "ike.resp_spi"
62#define BUFFER_DESC_RESPONDER "ike resp spi"
64static int g_buffer_initiator_id = 0;
65static int g_buffer_responder_id = 0;
95 const uint8_t *b = NULL;
98 if (SCIkeStateGetSpiInitiator(txv, &b, &b_len) != 1)
100 if (b == NULL || b_len == 0)
115 const uint8_t *b = NULL;
118 if (SCIkeStateGetSpiResponder(txv, &b, &b_len) != 1)
120 if (b == NULL || b_len == 0)
135 "sticky buffer to match on the IKE spi initiator";
154 "sticky buffer to match on the IKE spi responder";
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
void InspectionBufferSetupAndApplyTransforms(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len, const DetectEngineTransforms *transforms)
setup the buffer with our initial data
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
void DetectAppLayerMpmRegister(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register an app layer keyword for mpm
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
@ DETECT_IKE_SPI_INITIATOR
@ DETECT_IKE_SPI_RESPONDER
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
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.
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
int DetectBufferTypeGetByName(const char *name)
#define KEYWORD_DOC_INITIATOR
#define KEYWORD_NAME_RESPONDER
#define KEYWORD_NAME_INITIATOR
#define KEYWORD_DOC_RESPONDER
void DetectIkeSpiRegister(void)
#define BUFFER_NAME_RESPONDER
#define BUFFER_NAME_INITIATOR
#define BUFFER_DESC_RESPONDER
#define BUFFER_DESC_INITIATOR
int SCDetectSignatureSetAppProto(Signature *s, AppProto alproto)
SigTableElmt * sigmatch_table
#define SIG_FLAG_TOCLIENT
#define SIGMATCH_INFO_STICKY_BUFFER
#define SIG_FLAG_TOSERVER
main detection engine ctx
int(* Setup)(DetectEngineCtx *, Signature *, const char *)