return 0;
}
+static uint64_t SMTPGetTxDetectFlags(void *vtx, uint8_t dir)
+{
+ SMTPTransaction *tx = (SMTPTransaction *)vtx;
+ if (dir & STREAM_TOSERVER) {
+ return tx->detect_flags_ts;
+ } else {
+ return tx->detect_flags_tc;
+ }
+}
+
+static void SMTPSetTxDetectFlags(void *vtx, uint8_t dir, uint64_t flags)
+{
+ SMTPTransaction *tx = (SMTPTransaction *)vtx;
+ if (dir & STREAM_TOSERVER) {
+ tx->detect_flags_ts = flags;
+ } else {
+ tx->detect_flags_tc = flags;
+ }
+}
+
/**
* \brief Register the SMTP Protocol parser.
*/
AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_SMTP, SMTPGetEvents);
AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_SMTP, NULL,
SMTPGetTxDetectState, SMTPSetTxDetectState);
+ AppLayerParserRegisterDetectFlagsFuncs(IPPROTO_TCP, ALPROTO_SMTP,
+ SMTPGetTxDetectFlags, SMTPSetTxDetectFlags);
+
AppLayerParserRegisterLocalStorageFunc(IPPROTO_TCP, ALPROTO_SMTP, SMTPLocalStorageAlloc,
SMTPLocalStorageFree);
typedef struct SMTPTransaction_ {
/** id of this tx, starting at 0 */
uint64_t tx_id;
+
+ uint64_t detect_flags_ts;
+ uint64_t detect_flags_tc;
+
int done;
/** indicates loggers done logging */
uint32_t logged;