Go to the documentation of this file.
41 #define BUFFER_NAME "smb_version"
42 #define KEYWORD_NAME "smb.version"
44 static int g_smb_version_list_id = 0;
49 SCLogDebug(
"smb_version: DetectSmbVersionFree");
50 rs_smb_version_free(ptr);
67 SCLogDebug(
"smb_version: DetectSmbVersionSetup");
73 SCLogError(
"Error parsing smb.version option in signature, it needs a value");
78 SCLogError(
"Can't use 2 or more smb.version declarations in "
79 "the same sig. Invalidating signature.");
83 void *dod = rs_smb_version_parse(arg);
86 SCLogError(
"Error parsing smb.version option in signature");
92 DetectSmbVersionFree(
de_ctx, dod);
118 SCLogDebug(
"smb_version: DetectSmbVersionMatchRust");
120 int matchvalue = rs_smb_version_match(txv, (
void *)
m);
122 if (matchvalue != 1) {
123 SCLogDebug(
"rs_smb_version_match: didn't match");
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
SigTableElmt * sigmatch_table
void(* Free)(DetectEngineCtx *, void *)
main detection engine ctx
void DetectSmbVersionRegister(void)
Registers the keyword handlers for the "smb_version" keyword.
int(* AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, void *alstate, void *txv, const Signature *, const SigMatchCtx *)
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define SIG_FLAG_TOSERVER
Data structures and function prototypes for keeping state for the detection engine.
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
int DetectBufferTypeRegister(const char *name)
uint8_t DetectEngineInspectGenericList(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const struct 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.
#define SCLogError(...)
Macro used to log ERROR messages.
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
SigMatch * DetectGetLastSMFromLists(const Signature *s,...)
Returns the sm with the largest index (added latest) from the lists passed to us.
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.