Go to the documentation of this file.
55 #define KEYWORD_NAME "sip.method"
56 #define KEYWORD_DOC "sip-keywords.html#sip-method"
57 #define BUFFER_NAME "sip.method"
58 #define BUFFER_DESC "sip request method"
59 static int g_buffer_id = 0;
72 static bool DetectSipMethodValidateCallback(
const Signature *s,
const char **sigerror)
78 for (; sm != NULL; sm = sm->
next) {
84 *sigerror =
"sip.method pattern with trailing space";
87 }
else if (cd->
content[0] == 0x20) {
88 *sigerror =
"sip.method pattern with leading space";
92 *sigerror =
"sip.method pattern with trailing tab";
95 }
else if (cd->
content[0] == 0x09) {
96 *sigerror =
"sip.method pattern with leading tab";
108 const uint8_t _flow_flags,
void *txv,
const int list_id)
112 const uint8_t *b = NULL;
115 if (rs_sip_tx_get_method(txv, &b, &b_len) != 1)
117 if (b == NULL || b_len == 0)
145 DetectSipMethodValidateCallback);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
SigTableElmt * sigmatch_table
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.
int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
main detection engine ctx
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
#define SIG_FLAG_TOSERVER
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, 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
void DetectSipMethodRegister(void)
SignatureInitData * init_data
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
SignatureInitDataBuffer * buffers
#define SCLogError(...)
Macro used to log ERROR messages.
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
a single match condition for a signature
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)