ClearEmailDecodeState(decode_state);
}
-/*
- * Main function for mime processing
- *
- * This should be called when mime data is available
- */
const uint8_t* MimeSession::process_mime_data_paf(Flow* flow, const uint8_t* start, const uint8_t* end,
bool upload, FilePosition position)
{
return end;
}
-/*
- * * Main function for mime processing
- * *
- * * This should be called when mime data is available
- * */
+// Main function for mime processing
+// This should be called when mime data is available
const uint8_t* MimeSession::process_mime_data(Flow* flow, const uint8_t* start,
const uint8_t* data_end_marker, bool upload, FilePosition position)
{
smtp_ssn = &fd->session;
smtp_ssn->mime_ssn = new SmtpMime(&(config->decode_conf), &(config->log_config));
- //smtp_ssn->mime_ssn.methods = &(smtp_mime_methods);
- //smtp_ssn->mime_ssn.config = config;
+ smtp_ssn->mime_ssn->config = config;
if(stream.is_midstream(p->flow))
{
{
int ret;
int header_line_len;
- SMTP_PROTO_CONF* config = (SMTP_PROTO_CONF*)conf;
MimeSession* mime_ssn = (MimeSession*)this;
/* get length of header line */
header_line_len = eol - ptr;
int SmtpMime::normalize_data(void* conf, const uint8_t* ptr, const uint8_t* data_end)
{
- SMTP_PROTO_CONF* config = (SMTP_PROTO_CONF*)conf;
-
/* if we're ignoring data and not already normalizing, copy everything
* up to here into alt buffer so detection engine doesn't have
* to look at the data; otherwise, if we're normalizing and not
class SmtpMime : public MimeSession
{
+public:
using MimeSession::MimeSession;
+ SMTP_PROTO_CONF* config;
private:
int handle_header_line(void* conf, const uint8_t* ptr, const uint8_t* eol,
int max_header_len) override;