Go to the documentation of this file.
56 #define KEYWORD_NAME "sip.method"
57 #define KEYWORD_DOC "sip-keywords.html#sip-method"
58 #define BUFFER_NAME "sip.method"
59 #define BUFFER_DESC "sip request method"
60 static int g_buffer_id = 0;
73 static bool DetectSipMethodValidateCallback(
80 for (; sm != NULL; sm = sm->
next) {
86 *sigerror =
"sip.method pattern with trailing space";
89 }
else if (cd->
content[0] == 0x20) {
90 *sigerror =
"sip.method pattern with leading space";
94 *sigerror =
"sip.method pattern with trailing tab";
97 }
else if (cd->
content[0] == 0x09) {
98 *sigerror =
"sip.method pattern with leading tab";
110 const uint8_t _flow_flags,
void *txv,
const int list_id)
114 const uint8_t *b = NULL;
117 if (SCSipTxGetMethod(txv, &b, &b_len) != 1)
119 if (b == NULL || b_len == 0)
146 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.
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
main detection engine ctx
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror, const DetectBufferType *))
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
#define SIG_FLAG_TOSERVER
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
SignatureInitDataBuffer * buffers
#define SCLogError(...)
Macro used to log ERROR messages.
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)