|
|
|
@ -148,52 +148,77 @@ const char *AppProtoToString(AppProto alproto)
|
|
|
|
|
|
|
|
|
|
AppProto StringToAppProto(const char *proto_name)
|
|
|
|
|
{
|
|
|
|
|
if (proto_name == NULL) return ALPROTO_UNKNOWN;
|
|
|
|
|
if (proto_name == NULL)
|
|
|
|
|
return ALPROTO_UNKNOWN;
|
|
|
|
|
|
|
|
|
|
if (strcmp(proto_name, "http") == 0)
|
|
|
|
|
return ALPROTO_HTTP;
|
|
|
|
|
if (strcmp(proto_name, "http1") == 0)
|
|
|
|
|
return ALPROTO_HTTP1;
|
|
|
|
|
if (strcmp(proto_name,"ftp")==0) return ALPROTO_FTP;
|
|
|
|
|
if (strcmp(proto_name, "ftp") == 0)
|
|
|
|
|
return ALPROTO_FTP;
|
|
|
|
|
if (strcmp(proto_name, "ftp-data") == 0)
|
|
|
|
|
return ALPROTO_FTPDATA;
|
|
|
|
|
if (strcmp(proto_name, "tftp") == 0)
|
|
|
|
|
return ALPROTO_TFTP;
|
|
|
|
|
if (strcmp(proto_name,"smtp")==0) return ALPROTO_SMTP;
|
|
|
|
|
if (strcmp(proto_name,"tls")==0) return ALPROTO_TLS;
|
|
|
|
|
if (strcmp(proto_name,"ssh")==0) return ALPROTO_SSH;
|
|
|
|
|
if (strcmp(proto_name,"imap")==0) return ALPROTO_IMAP;
|
|
|
|
|
if (strcmp(proto_name,"jabber")==0) return ALPROTO_JABBER;
|
|
|
|
|
if (strcmp(proto_name,"smb")==0) return ALPROTO_SMB;
|
|
|
|
|
if (strcmp(proto_name,"dcerpc")==0) return ALPROTO_DCERPC;
|
|
|
|
|
if (strcmp(proto_name,"irc")==0) return ALPROTO_IRC;
|
|
|
|
|
if (strcmp(proto_name,"dns")==0) return ALPROTO_DNS;
|
|
|
|
|
if (strcmp(proto_name,"modbus")==0) return ALPROTO_MODBUS;
|
|
|
|
|
if (strcmp(proto_name,"enip")==0) return ALPROTO_ENIP;
|
|
|
|
|
if (strcmp(proto_name,"dnp3")==0) return ALPROTO_DNP3;
|
|
|
|
|
if (strcmp(proto_name,"nfs")==0) return ALPROTO_NFS;
|
|
|
|
|
if (strcmp(proto_name,"ntp")==0) return ALPROTO_NTP;
|
|
|
|
|
if (strcmp(proto_name, "smtp") == 0)
|
|
|
|
|
return ALPROTO_SMTP;
|
|
|
|
|
if (strcmp(proto_name, "tls") == 0)
|
|
|
|
|
return ALPROTO_TLS;
|
|
|
|
|
if (strcmp(proto_name, "ssh") == 0)
|
|
|
|
|
return ALPROTO_SSH;
|
|
|
|
|
if (strcmp(proto_name, "imap") == 0)
|
|
|
|
|
return ALPROTO_IMAP;
|
|
|
|
|
if (strcmp(proto_name, "jabber") == 0)
|
|
|
|
|
return ALPROTO_JABBER;
|
|
|
|
|
if (strcmp(proto_name, "smb") == 0)
|
|
|
|
|
return ALPROTO_SMB;
|
|
|
|
|
if (strcmp(proto_name, "dcerpc") == 0)
|
|
|
|
|
return ALPROTO_DCERPC;
|
|
|
|
|
if (strcmp(proto_name, "irc") == 0)
|
|
|
|
|
return ALPROTO_IRC;
|
|
|
|
|
if (strcmp(proto_name, "dns") == 0)
|
|
|
|
|
return ALPROTO_DNS;
|
|
|
|
|
if (strcmp(proto_name, "modbus") == 0)
|
|
|
|
|
return ALPROTO_MODBUS;
|
|
|
|
|
if (strcmp(proto_name, "enip") == 0)
|
|
|
|
|
return ALPROTO_ENIP;
|
|
|
|
|
if (strcmp(proto_name, "dnp3") == 0)
|
|
|
|
|
return ALPROTO_DNP3;
|
|
|
|
|
if (strcmp(proto_name, "nfs") == 0)
|
|
|
|
|
return ALPROTO_NFS;
|
|
|
|
|
if (strcmp(proto_name, "ntp") == 0)
|
|
|
|
|
return ALPROTO_NTP;
|
|
|
|
|
if (strcmp(proto_name, "ike") == 0)
|
|
|
|
|
return ALPROTO_IKE;
|
|
|
|
|
if (strcmp(proto_name,"krb5")==0) return ALPROTO_KRB5;
|
|
|
|
|
if (strcmp(proto_name, "krb5") == 0)
|
|
|
|
|
return ALPROTO_KRB5;
|
|
|
|
|
if (strcmp(proto_name, "quic") == 0)
|
|
|
|
|
return ALPROTO_QUIC;
|
|
|
|
|
if (strcmp(proto_name,"dhcp")==0) return ALPROTO_DHCP;
|
|
|
|
|
if (strcmp(proto_name,"snmp")==0) return ALPROTO_SNMP;
|
|
|
|
|
if (strcmp(proto_name,"sip")==0) return ALPROTO_SIP;
|
|
|
|
|
if (strcmp(proto_name,"rfb")==0) return ALPROTO_RFB;
|
|
|
|
|
if (strcmp(proto_name,"mqtt")==0) return ALPROTO_MQTT;
|
|
|
|
|
if (strcmp(proto_name, "dhcp") == 0)
|
|
|
|
|
return ALPROTO_DHCP;
|
|
|
|
|
if (strcmp(proto_name, "snmp") == 0)
|
|
|
|
|
return ALPROTO_SNMP;
|
|
|
|
|
if (strcmp(proto_name, "sip") == 0)
|
|
|
|
|
return ALPROTO_SIP;
|
|
|
|
|
if (strcmp(proto_name, "rfb") == 0)
|
|
|
|
|
return ALPROTO_RFB;
|
|
|
|
|
if (strcmp(proto_name, "mqtt") == 0)
|
|
|
|
|
return ALPROTO_MQTT;
|
|
|
|
|
if (strcmp(proto_name, "pgsql") == 0)
|
|
|
|
|
return ALPROTO_PGSQL;
|
|
|
|
|
if (strcmp(proto_name, "telnet") == 0)
|
|
|
|
|
return ALPROTO_TELNET;
|
|
|
|
|
if (strcmp(proto_name, "template") == 0)
|
|
|
|
|
return ALPROTO_TEMPLATE;
|
|
|
|
|
if (strcmp(proto_name,"rdp")==0) return ALPROTO_RDP;
|
|
|
|
|
if (strcmp(proto_name,"http2")==0) return ALPROTO_HTTP2;
|
|
|
|
|
if (strcmp(proto_name, "rdp") == 0)
|
|
|
|
|
return ALPROTO_RDP;
|
|
|
|
|
if (strcmp(proto_name, "http2") == 0)
|
|
|
|
|
return ALPROTO_HTTP2;
|
|
|
|
|
if (strcmp(proto_name, "bittorrent-dht") == 0)
|
|
|
|
|
return ALPROTO_BITTORRENT_DHT;
|
|
|
|
|
if (strcmp(proto_name,"failed")==0) return ALPROTO_FAILED;
|
|
|
|
|
if (strcmp(proto_name, "failed") == 0)
|
|
|
|
|
return ALPROTO_FAILED;
|
|
|
|
|
|
|
|
|
|
return ALPROTO_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|