suricata
app-layer-smtp.h File Reference
#include "app-layer-frames.h"
#include "util-streaming-buffer.h"
#include "rust.h"
Include dependency graph for app-layer-smtp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SMTPString_
 
struct  SMTPTransaction_
 
struct  SMTPConfig
 Structure for containing configuration options. More...
 
struct  SMTPState_
 

Macros

#define SMTP_LINE_BUFFER_LIMIT   4096
 

Typedefs

typedef struct SMTPString_ SMTPString
 
typedef struct SMTPTransaction_ SMTPTransaction
 
typedef struct SMTPConfig SMTPConfig
 Structure for containing configuration options. More...
 
typedef struct SMTPState_ SMTPState
 

Enumerations

enum  {
  SMTP_DECODER_EVENT_INVALID_REPLY, SMTP_DECODER_EVENT_UNABLE_TO_MATCH_REPLY_WITH_REQUEST, SMTP_DECODER_EVENT_MAX_COMMAND_LINE_LEN_EXCEEDED, SMTP_DECODER_EVENT_MAX_REPLY_LINE_LEN_EXCEEDED,
  SMTP_DECODER_EVENT_INVALID_PIPELINED_SEQUENCE, SMTP_DECODER_EVENT_BDAT_CHUNK_LEN_EXCEEDED, SMTP_DECODER_EVENT_NO_SERVER_WELCOME_MESSAGE, SMTP_DECODER_EVENT_TLS_REJECTED,
  SMTP_DECODER_EVENT_DATA_COMMAND_REJECTED, SMTP_DECODER_EVENT_FAILED_PROTOCOL_CHANGE, SMTP_DECODER_EVENT_MIME_PARSE_FAILED, SMTP_DECODER_EVENT_MIME_MALFORMED_MSG,
  SMTP_DECODER_EVENT_MIME_INVALID_BASE64, SMTP_DECODER_EVENT_MIME_INVALID_QP, SMTP_DECODER_EVENT_MIME_LONG_LINE, SMTP_DECODER_EVENT_MIME_LONG_ENC_LINE,
  SMTP_DECODER_EVENT_MIME_LONG_HEADER_NAME, SMTP_DECODER_EVENT_MIME_LONG_HEADER_VALUE, SMTP_DECODER_EVENT_MIME_BOUNDARY_TOO_LONG, SMTP_DECODER_EVENT_MIME_LONG_FILENAME,
  SMTP_DECODER_EVENT_DUPLICATE_FIELDS, SMTP_DECODER_EVENT_UNPARSABLE_CONTENT, SMTP_DECODER_EVENT_TRUNCATED_LINE
}
 

Functions

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
 

Detailed Description

Macro Definition Documentation

◆ SMTP_LINE_BUFFER_LIMIT

#define SMTP_LINE_BUFFER_LIMIT   4096

Definition at line 33 of file app-layer-smtp.h.

Typedef Documentation

◆ SMTPConfig

typedef struct SMTPConfig SMTPConfig

Structure for containing configuration options.

◆ SMTPState

typedef struct SMTPState_ SMTPState

◆ SMTPString

typedef struct SMTPString_ SMTPString

◆ SMTPTransaction

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SMTP_DECODER_EVENT_INVALID_REPLY 
SMTP_DECODER_EVENT_UNABLE_TO_MATCH_REPLY_WITH_REQUEST 
SMTP_DECODER_EVENT_MAX_COMMAND_LINE_LEN_EXCEEDED 
SMTP_DECODER_EVENT_MAX_REPLY_LINE_LEN_EXCEEDED 
SMTP_DECODER_EVENT_INVALID_PIPELINED_SEQUENCE 
SMTP_DECODER_EVENT_BDAT_CHUNK_LEN_EXCEEDED 
SMTP_DECODER_EVENT_NO_SERVER_WELCOME_MESSAGE 
SMTP_DECODER_EVENT_TLS_REJECTED 
SMTP_DECODER_EVENT_DATA_COMMAND_REJECTED 
SMTP_DECODER_EVENT_FAILED_PROTOCOL_CHANGE 
SMTP_DECODER_EVENT_MIME_PARSE_FAILED 
SMTP_DECODER_EVENT_MIME_MALFORMED_MSG 
SMTP_DECODER_EVENT_MIME_INVALID_BASE64 
SMTP_DECODER_EVENT_MIME_INVALID_QP 
SMTP_DECODER_EVENT_MIME_LONG_LINE 
SMTP_DECODER_EVENT_MIME_LONG_ENC_LINE 
SMTP_DECODER_EVENT_MIME_LONG_HEADER_NAME 
SMTP_DECODER_EVENT_MIME_LONG_HEADER_VALUE 
SMTP_DECODER_EVENT_MIME_BOUNDARY_TOO_LONG 
SMTP_DECODER_EVENT_MIME_LONG_FILENAME 
SMTP_DECODER_EVENT_DUPLICATE_FIELDS 
SMTP_DECODER_EVENT_UNPARSABLE_CONTENT 
SMTP_DECODER_EVENT_TRUNCATED_LINE 

Definition at line 34 of file app-layer-smtp.h.

Function Documentation

◆ RegisterSMTPParsers()

void RegisterSMTPParsers ( void  )

Register the SMTP Protocol parser.

Definition at line 1875 of file app-layer-smtp.c.

References ALPROTO_SMTP, AppLayerProtoDetectConfProtoDetectionEnabled(), and AppLayerProtoDetectRegisterProtocol().

Here is the call graph for this function:

◆ SMTPParserCleanup()

void SMTPParserCleanup ( void  )

Free memory allocated for global SMTP parser state.

Definition at line 1930 of file app-layer-smtp.c.

Referenced by AppLayerParserDeSetup().

Here is the caller graph for this function:

◆ SMTPParserRegisterTests()

void SMTPParserRegisterTests ( void  )

Definition at line 4260 of file app-layer-smtp.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ SMTPStateAlloc()

void* SMTPStateAlloc ( void *  orig_state,
AppProto  proto_orig 
)

Variable Documentation

◆ smtp_config

SMTPConfig smtp_config

Definition at line 298 of file app-layer-smtp.c.