suricata
app-layer-protos.h File Reference

Go to the source code of this file.

Typedefs

typedef uint16_t AppProto
 

Enumerations

enum  AppProtoEnum {
  ALPROTO_UNKNOWN = 0 , ALPROTO_FAILED = 1 , ALPROTO_HTTP1 , ALPROTO_FTP ,
  ALPROTO_SMTP , ALPROTO_TLS , ALPROTO_SSH , ALPROTO_IMAP ,
  ALPROTO_JABBER , ALPROTO_SMB , ALPROTO_DCERPC , ALPROTO_IRC ,
  ALPROTO_DNS , ALPROTO_MODBUS , ALPROTO_ENIP , ALPROTO_DNP3 ,
  ALPROTO_NFS , ALPROTO_NTP , ALPROTO_FTPDATA , ALPROTO_TFTP ,
  ALPROTO_IKE , ALPROTO_KRB5 , ALPROTO_QUIC , ALPROTO_DHCP ,
  ALPROTO_SIP , ALPROTO_RFB , ALPROTO_MQTT , ALPROTO_PGSQL ,
  ALPROTO_TELNET , ALPROTO_WEBSOCKET , ALPROTO_LDAP , ALPROTO_DOH2 ,
  ALPROTO_TEMPLATE , ALPROTO_RDP , ALPROTO_HTTP2 , ALPROTO_BITTORRENT_DHT ,
  ALPROTO_POP3 , ALPROTO_MDNS , ALPROTO_HTTP , ALPROTO_MAX_STATIC
}
 

Functions

const char * AppProtoToString (AppProto alproto)
 Maps the ALPROTO_*, to its string equivalent.
 
AppProto StringToAppProto (const char *proto_name)
 Maps a string to its ALPROTO_* equivalent.
 
AppProto AppProtoNewProtoFromString (const char *proto_name)
 
void AppProtoRegisterProtoString (AppProto alproto, const char *proto_name)
 

Variables

AppProto g_alproto_max
 

Detailed Description

Typedef Documentation

◆ AppProto

typedef uint16_t AppProto

Definition at line 86 of file app-layer-protos.h.

Enumeration Type Documentation

◆ AppProtoEnum

Enumerator
ALPROTO_UNKNOWN 
ALPROTO_FAILED 
ALPROTO_HTTP1 
ALPROTO_FTP 
ALPROTO_SMTP 
ALPROTO_TLS 
ALPROTO_SSH 
ALPROTO_IMAP 
ALPROTO_JABBER 
ALPROTO_SMB 
ALPROTO_DCERPC 
ALPROTO_IRC 
ALPROTO_DNS 
ALPROTO_MODBUS 
ALPROTO_ENIP 
ALPROTO_DNP3 
ALPROTO_NFS 
ALPROTO_NTP 
ALPROTO_FTPDATA 
ALPROTO_TFTP 
ALPROTO_IKE 
ALPROTO_KRB5 
ALPROTO_QUIC 
ALPROTO_DHCP 
ALPROTO_SIP 
ALPROTO_RFB 
ALPROTO_MQTT 
ALPROTO_PGSQL 
ALPROTO_TELNET 
ALPROTO_WEBSOCKET 
ALPROTO_LDAP 
ALPROTO_DOH2 
ALPROTO_TEMPLATE 
ALPROTO_RDP 
ALPROTO_HTTP2 
ALPROTO_BITTORRENT_DHT 
ALPROTO_POP3 
ALPROTO_MDNS 
ALPROTO_HTTP 
ALPROTO_MAX_STATIC 

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

Function Documentation

◆ AppProtoNewProtoFromString()

AppProto AppProtoNewProtoFromString ( const char *  proto_name)

Definition at line 74 of file app-layer-protos.c.

References AppProtoRegisterProtoString(), and g_alproto_max.

Here is the call graph for this function:

◆ AppProtoRegisterProtoString()

void AppProtoRegisterProtoString ( AppProto  alproto,
const char *  proto_name 
)

◆ AppProtoToString()

◆ StringToAppProto()

AppProto StringToAppProto ( const char *  proto_name)

Maps a string to its ALPROTO_* equivalent.

Parameters
Stringequivalent for the alproto.
Return values
alprotoApp layer protocol id, or ALPROTO_UNKNOWN.

Definition at line 60 of file app-layer-protos.c.

References AppProtoStringTuple::alproto, ALPROTO_UNKNOWN, g_alproto_max, g_alproto_strings, and str.

Referenced by AppLayerProtoDetectGetProtoByName(), AppLayerRegisterProtocolDetection(), and LLVMFuzzerTestOneInput().

Here is the caller graph for this function:

Variable Documentation

◆ g_alproto_max