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(
79 for (; sm != NULL; sm = sm->
next) {
85 *sigerror =
"sip.method pattern with trailing space";
88 }
else if (cd->
content[0] == 0x20) {
89 *sigerror =
"sip.method pattern with leading space";
93 *sigerror =
"sip.method pattern with trailing tab";
96 }
else if (cd->
content[0] == 0x09) {
97 *sigerror =
"sip.method pattern with leading tab";
109 const uint8_t _flow_flags,
void *txv,
const int list_id)
113 const uint8_t *b = NULL;
116 if (SCSipTxGetMethod(txv, &b, &b_len) != 1)
118 if (b == NULL || b_len == 0)
145 DetectSipMethodValidateCallback);
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.
InspectionBuffer * SCInspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
main detection engine ctx
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror, const DetectBufferType *))
void SCInspectionBufferSetupAndApplyTransforms(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
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
int SCDetectSignatureSetAppProto(Signature *s, AppProto alproto)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, uint8_t progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
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 DetectSipMethodRegister(void)
SignatureInitData * init_data
void DetectAppLayerMpmRegister(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, uint8_t tx_min_progress)
register an app layer keyword for mpm
SignatureInitDataBuffer * buffers
#define SCLogError(...)
Macro used to log ERROR messages.
a single match condition for a signature
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)