}
+static void SMTPStateSetTxLogged(void *state, void *vtx, uint32_t logger)
+{
+ SMTPTransaction *tx = vtx;
+ tx->logged |= logger;
+}
+
+static int SMTPStateGetTxLogged(void *state, void *vtx, uint32_t logger)
+{
+ SMTPTransaction *tx = vtx;
+ if (tx->logged & logger)
+ return 1;
+
+ return 0;
+}
+
static int SMTPStateGetAlstateProgressCompletionStatus(uint8_t direction) {
return 1;
}
AppLayerParserRegisterGetStateProgressFunc(IPPROTO_TCP, ALPROTO_SMTP, SMTPStateGetAlstateProgress);
AppLayerParserRegisterGetTxCnt(IPPROTO_TCP, ALPROTO_SMTP, SMTPStateGetTxCnt);
AppLayerParserRegisterGetTx(IPPROTO_TCP, ALPROTO_SMTP, SMTPStateGetTx);
+ AppLayerParserRegisterLoggerFuncs(IPPROTO_TCP, ALPROTO_SMTP, SMTPStateGetTxLogged,
+ SMTPStateSetTxLogged);
AppLayerParserRegisterGetStateProgressCompletionStatus(ALPROTO_SMTP,
SMTPStateGetAlstateProgressCompletionStatus);
AppLayerParserRegisterTruncateFunc(IPPROTO_TCP, ALPROTO_SMTP, SMTPStateTruncate);
/** id of this tx, starting at 0 */
uint64_t tx_id;
int done;
+ /** indicates loggers done logging */
+ uint32_t logged;
/** the first message contained in the session */
MimeDecEntity *msg_head;
/** the last message contained in the session */