Go to the documentation of this file.
34 static int g_smtp_helo_buffer_id = 0;
35 static int g_smtp_mail_from_buffer_id = 0;
36 static int g_smtp_rcpt_to_buffer_id = 0;
57 if (smtp_state->
helo == NULL || smtp_state->
helo_len == 0)
105 const int list_id, uint32_t idx)
123 for (uint32_t i = 0; i < idx; i++) {
139 SCSigTableElmt kw = { 0 };
140 kw.name =
"smtp.helo";
141 kw.desc =
"SMTP helo buffer";
142 kw.url =
"/rules/smtp-keywords.html#smtp-helo";
143 kw.Setup = (int (*)(
void *,
void *,
const char *))DetectSmtpHeloSetup;
146 g_smtp_helo_buffer_id =
151 kw.name =
"smtp.mail_from";
152 kw.desc =
"SMTP mail from buffer";
153 kw.url =
"/rules/smtp-keywords.html#smtp-mail-from";
154 kw.Setup = (int (*)(
void *,
void *,
const char *))DetectSmtpMailFromSetup;
157 g_smtp_mail_from_buffer_id =
160 GetSmtpMailFromData);
162 kw.name =
"smtp.rcpt_to";
163 kw.desc =
"SMTP rcpt to buffer";
164 kw.url =
"/rules/smtp-keywords.html#smtp-rcpt-to";
165 kw.Setup = (int (*)(
void *,
void *,
const char *))DetectSmtpRcptToSetup;
168 g_smtp_rcpt_to_buffer_id =
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
#define SIGMATCH_INFO_STICKY_BUFFER
struct HtpBodyChunk_ * next
int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
main detection engine ctx
#define TAILQ_EMPTY(head)
int DetectHelperBufferMpmRegister(const char *name, const char *desc, AppProto alproto, bool toclient, bool toserver, InspectionBufferGetDataPtr GetData)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
void InspectionBufferSetupMultiEmpty(InspectionBuffer *buffer)
setup the buffer empty
#define TAILQ_FIRST(head)
void SCDetectSMTPRegister(void)
int DetectHelperMultiBufferMpmRegister(const char *name, const char *desc, AppProto alproto, bool toclient, bool toserver, InspectionMultiBufferGetDataPtr GetData)
#define DETECT_CI_FLAGS_SINGLE
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
int DetectHelperKeywordRegister(const SCSigTableElmt *kw)
#define TAILQ_NEXT(elm, field)
void InspectionBufferSetupMulti(InspectionBuffer *buffer, const DetectEngineTransforms *transforms, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
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
InspectionBuffer * InspectionBufferMultipleForListGet(DetectEngineThreadCtx *det_ctx, const int list_id, const uint32_t local_id)
for a InspectionBufferMultipleForList get a InspectionBuffer