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(
const Signature *s,
const char **sigerror)
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 (rs_sip_tx_get_method(txv, &b, &b_len) != 1)
118 if (b == NULL || b_len == 0)
146 DetectSipMethodValidateCallback);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
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 a MPM engine
void DetectSipMethodRegister(void)
SignatureInitData * init_data
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
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)
register inspect engine at start up time
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)