suricata
|
#include "decode-events.h"
#include "util-decode-mime.h"
#include "queue.h"
#include "util-streaming-buffer.h"
#include "rust.h"
Go to the source code of this file.
Data Structures | |
struct | SMTPString_ |
struct | SMTPTransaction_ |
struct | SMTPConfig |
struct | SMTPState_ |
Typedefs | |
typedef struct SMTPString_ | SMTPString |
typedef struct SMTPTransaction_ | SMTPTransaction |
typedef struct SMTPConfig | SMTPConfig |
typedef struct SMTPState_ | SMTPState |
Functions | |
int | SMTPProcessDataChunk (const uint8_t *chunk, uint32_t len, MimeDecParseState *state) |
void * | SMTPStateAlloc (void *orig_state, AppProto proto_orig) |
void | RegisterSMTPParsers (void) |
Register the SMTP Protocol parser. More... | |
void | SMTPParserCleanup (void) |
Free memory allocated for global SMTP parser state. More... | |
void | SMTPParserRegisterTests (void) |
Variables | |
SMTPConfig | smtp_config |
Definition in file app-layer-smtp.h.
typedef struct SMTPConfig SMTPConfig |
typedef struct SMTPState_ SMTPState |
typedef struct SMTPString_ SMTPString |
typedef struct SMTPTransaction_ SMTPTransaction |
anonymous enum |
Definition at line 33 of file app-layer-smtp.h.
void RegisterSMTPParsers | ( | void | ) |
Register the SMTP Protocol parser.
Definition at line 1731 of file app-layer-smtp.c.
References ALPROTO_SMTP, AppLayerProtoDetectConfProtoDetectionEnabled(), and AppLayerProtoDetectRegisterProtocol().
Referenced by AppLayerParserRegisterProtocolParsers().
void SMTPParserCleanup | ( | void | ) |
Free memory allocated for global SMTP parser state.
Definition at line 1785 of file app-layer-smtp.c.
Referenced by AppLayerParserDeSetup().
void SMTPParserRegisterTests | ( | void | ) |
Definition at line 4693 of file app-layer-smtp.c.
References UtRegisterTest().
int SMTPProcessDataChunk | ( | const uint8_t * | chunk, |
uint32_t | len, | ||
MimeDecParseState * | state | ||
) |
Definition at line 457 of file app-layer-smtp.c.
References Flow_::alstate, MimeDecParseState::body_begin, SMTPConfig::content_inspect_min_size, MimeDecEntity::ctnt_flags, CTNT_IS_ATTACHMENT, MimeDecStackNode::data, MimeDecParseState::data, FILE_STORE, FILE_USE_DETECT, FileContainerAlloc(), FileFlowToFlags(), MimeDecEntity::filename, MimeDecEntity::filename_len, flags, len, MIME_DEC_ERR_MEM, MIME_DEC_OK, Flow_::protoctx, SC_ERR_MEM_ALLOC, SC_FILENAME_MAX, SCEnter, SCLogDebug, SCLogDebugEnabled(), SCLogError, SCReturnInt, smtp_config, MimeDecParseState::stack, StreamTcpReassemblySetMinInspectDepth(), and MimeDecStack::top.
void* SMTPStateAlloc | ( | void * | orig_state, |
AppProto | proto_orig | ||
) |
Definition at line 1420 of file app-layer-smtp.c.
References SMTPState_::cmds, SMTPState_::cmds_buffer_len, SCFree, SCMalloc, SMTP_COMMAND_BUFFER_STEPS, TAILQ_INIT, and unlikely.
SMTPConfig smtp_config |
Definition at line 222 of file app-layer-smtp.c.
Referenced by SMTPProcessDataChunk().