50 #define KEYWORD_NAME "ssh.proto" 51 #define KEYWORD_NAME_LEGACY "ssh_proto" 52 #define KEYWORD_DOC "ssh-keywords.html#ssh-proto" 53 #define BUFFER_NAME "ssh.proto" 54 #define BUFFER_DESC "ssh protocol version field" 55 static int g_buffer_id = 0;
59 const uint8_t flow_flags,
void *txv,
const int list_id)
74 if (protocol == NULL) {
79 uint32_t data_len = strlen((
char *)protocol);
81 if (data == NULL || data_len == 0) {
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority, int(*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id), InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register a MPM engine
main detection engine ctx
int DetectBufferTypeGetByName(const char *name)
#define SIG_FLAG_TOCLIENT
#define SIGMATCH_INFO_STICKY_BUFFER
Data structures and function prototypes for keeping state for the detection engine.
#define SIG_FLAG_TOSERVER
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
int 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.
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
#define KEYWORD_NAME_LEGACY
void InspectionBufferSetup(InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
int DetectBufferSetActiveList(Signature *s, const int list)
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
void DetectSshProtocolRegister(void)