29 static int IMAPRegisterPatternsForProtocolDetection(
void)
32 IPPROTO_TCP,
ALPROTO_IMAP,
"* OK ", 5, 0, STREAM_TOCLIENT) < 0) {
37 IPPROTO_TCP,
ALPROTO_IMAP,
"* NO ", 5, 0, STREAM_TOCLIENT) < 0) {
42 IPPROTO_TCP,
ALPROTO_IMAP,
"* BAD ", 6, 0, STREAM_TOCLIENT) < 0) {
47 IPPROTO_TCP,
ALPROTO_IMAP,
"* LIST ", 7, 0, STREAM_TOCLIENT) < 0) {
52 IPPROTO_TCP,
ALPROTO_IMAP,
"* ESEARCH ", 10, 0, STREAM_TOCLIENT) < 0) {
57 IPPROTO_TCP,
ALPROTO_IMAP,
"* STATUS ", 9, 0, STREAM_TOCLIENT) < 0) {
62 IPPROTO_TCP,
ALPROTO_IMAP,
"* FLAGS ", 8, 0, STREAM_TOCLIENT) < 0) {
77 17 , 0, STREAM_TOSERVER) < 0) {
86 const char *proto_name =
"imap";
89 SCLogDebug(
"IMAP protocol detection is enabled.");
91 if (IMAPRegisterPatternsForProtocolDetection() < 0)
92 SCLogError(
"Failed to register IMAP protocol detection patterns.");
94 SCLogDebug(
"Protocol detector and parser disabled for IMAP.");