suricata
app-layer-ftp.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  FtpCommand_
 
struct  FtpLineState_
 
struct  FTPString_
 
struct  FTPTransaction_
 
struct  FtpState_
 
struct  FtpDataState_
 

Typedefs

typedef struct FtpCommand_ FtpCommand
 
typedef uint32_t FtpRequestCommandArgOfs
 
typedef uint16_t FtpResponseCode
 
typedef struct FtpLineState_ FtpLineState
 
typedef struct FTPString_ FTPString
 
typedef struct FTPTransaction_ FTPTransaction
 
typedef struct FtpState_ FtpState
 
typedef struct FtpDataState_ FtpDataState
 

Enumerations

enum  { FTP_STATE_IN_PROGRESS, FTP_STATE_PORT_DONE, FTP_STATE_FINISHED }
 
enum  FtpRequestCommand {
  FTP_COMMAND_UNKNOWN = 0, FTP_COMMAND_ABOR, FTP_COMMAND_ACCT, FTP_COMMAND_ALLO,
  FTP_COMMAND_APPE, FTP_COMMAND_AUTH_TLS, FTP_COMMAND_CDUP, FTP_COMMAND_CHMOD,
  FTP_COMMAND_CWD, FTP_COMMAND_DELE, FTP_COMMAND_EPSV, FTP_COMMAND_HELP,
  FTP_COMMAND_IDLE, FTP_COMMAND_LIST, FTP_COMMAND_MAIL, FTP_COMMAND_MDTM,
  FTP_COMMAND_MKD, FTP_COMMAND_MLFL, FTP_COMMAND_MODE, FTP_COMMAND_MRCP,
  FTP_COMMAND_MRSQ, FTP_COMMAND_MSAM, FTP_COMMAND_MSND, FTP_COMMAND_MSOM,
  FTP_COMMAND_NLST, FTP_COMMAND_NOOP, FTP_COMMAND_PASS, FTP_COMMAND_PASV,
  FTP_COMMAND_PORT, FTP_COMMAND_PWD, FTP_COMMAND_QUIT, FTP_COMMAND_REIN,
  FTP_COMMAND_REST, FTP_COMMAND_RETR, FTP_COMMAND_RMD, FTP_COMMAND_RNFR,
  FTP_COMMAND_RNTO, FTP_COMMAND_SITE, FTP_COMMAND_SIZE, FTP_COMMAND_SMNT,
  FTP_COMMAND_STAT, FTP_COMMAND_STOR, FTP_COMMAND_STOU, FTP_COMMAND_STRU,
  FTP_COMMAND_SYST, FTP_COMMAND_TYPE, FTP_COMMAND_UMASK, FTP_COMMAND_USER,
  FTP_COMMAND_EPRT, FTP_COMMAND_MAX
}
 
enum  {
  FTP_FIELD_NONE = 0, FTP_FIELD_REQUEST_LINE, FTP_FIELD_REQUEST_COMMAND, FTP_FIELD_REQUEST_ARGS,
  FTP_FIELD_RESPONSE_LINE, FTP_FIELD_REPONSE_CODE, FTP_FIELD_MAX
}
 
enum  { FTPDATA_STATE_IN_PROGRESS, FTPDATA_STATE_FINISHED }
 

Functions

void RegisterFTPParsers (void)
 
void FTPParserRegisterTests (void)
 
void FTPAtExitPrintStats (void)
 
uint64_t FTPMemuseGlobalCounter (void)
 
uint64_t FTPMemcapGlobalCounter (void)
 

Variables

const FtpCommand FtpCommands [FTP_COMMAND_MAX+1]
 

Detailed Description

Typedef Documentation

typedef struct FtpCommand_ FtpCommand
typedef struct FtpDataState_ FtpDataState

FTP Data State for app layer parser

typedef struct FtpLineState_ FtpLineState

used to hold the line state when we have fragmentation.

typedef uint32_t FtpRequestCommandArgOfs

Definition at line 98 of file app-layer-ftp.h.

typedef uint16_t FtpResponseCode

Definition at line 100 of file app-layer-ftp.h.

typedef struct FtpState_ FtpState

FTP State for app layer parser

typedef struct FTPString_ FTPString

Enumeration Type Documentation

anonymous enum
Enumerator
FTP_STATE_IN_PROGRESS 
FTP_STATE_PORT_DONE 
FTP_STATE_FINISHED 

Definition at line 28 of file app-layer-ftp.h.

anonymous enum
Enumerator
FTP_FIELD_NONE 
FTP_FIELD_REQUEST_LINE 
FTP_FIELD_REQUEST_COMMAND 
FTP_FIELD_REQUEST_ARGS 
FTP_FIELD_RESPONSE_LINE 
FTP_FIELD_REPONSE_CODE 
FTP_FIELD_MAX 

Definition at line 102 of file app-layer-ftp.h.

anonymous enum
Enumerator
FTPDATA_STATE_IN_PROGRESS 
FTPDATA_STATE_FINISHED 

Definition at line 197 of file app-layer-ftp.h.

Enumerator
FTP_COMMAND_UNKNOWN 
FTP_COMMAND_ABOR 
FTP_COMMAND_ACCT 
FTP_COMMAND_ALLO 
FTP_COMMAND_APPE 
FTP_COMMAND_AUTH_TLS 
FTP_COMMAND_CDUP 
FTP_COMMAND_CHMOD 
FTP_COMMAND_CWD 
FTP_COMMAND_DELE 
FTP_COMMAND_EPSV 
FTP_COMMAND_HELP 
FTP_COMMAND_IDLE 
FTP_COMMAND_LIST 
FTP_COMMAND_MAIL 
FTP_COMMAND_MDTM 
FTP_COMMAND_MKD 
FTP_COMMAND_MLFL 
FTP_COMMAND_MODE 
FTP_COMMAND_MRCP 
FTP_COMMAND_MRSQ 
FTP_COMMAND_MSAM 
FTP_COMMAND_MSND 
FTP_COMMAND_MSOM 
FTP_COMMAND_NLST 
FTP_COMMAND_NOOP 
FTP_COMMAND_PASS 
FTP_COMMAND_PASV 
FTP_COMMAND_PORT 
FTP_COMMAND_PWD 
FTP_COMMAND_QUIT 
FTP_COMMAND_REIN 
FTP_COMMAND_REST 
FTP_COMMAND_RETR 
FTP_COMMAND_RMD 
FTP_COMMAND_RNFR 
FTP_COMMAND_RNTO 
FTP_COMMAND_SITE 
FTP_COMMAND_SIZE 
FTP_COMMAND_SMNT 
FTP_COMMAND_STAT 
FTP_COMMAND_STOR 
FTP_COMMAND_STOU 
FTP_COMMAND_STRU 
FTP_COMMAND_SYST 
FTP_COMMAND_TYPE 
FTP_COMMAND_UMASK 
FTP_COMMAND_USER 
FTP_COMMAND_EPRT 
FTP_COMMAND_MAX 
Todo:
more if missing..

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

Function Documentation

uint64_t FTPMemuseGlobalCounter ( void  )

Definition at line 163 of file app-layer-ftp.c.

References SC_ATOMIC_GET.

Referenced by AppLayerRegisterGlobalCounters().

Here is the caller graph for this function:

void FTPParserRegisterTests ( void  )

Definition at line 1713 of file app-layer-ftp.c.

References UtRegisterTest().

Referenced by RegisterFTPParsers().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const FtpCommand FtpCommands[FTP_COMMAND_MAX+1]

Definition at line 67 of file app-layer-ftp.c.