#include "utils/util.h"
#include "utils/snort_bounds.h"
-typedef struct _MimeToken
+struct MimeToken
{
const char* name;
int name_len;
int search_id;
-} MimeToken;
+} ;
-typedef enum _MimeHdrEnum
+enum MimeHdrEnum
{
HDR_CONTENT_TYPE = 0,
HDR_CONT_TRANS_ENC,
HDR_CONT_DISP,
HDR_LAST
-} MimeHdrEnum;
+};
const MimeToken mime_hdrs[] =
{
{ NULL, 0, 0 }
};
-typedef struct _MIMESearch
+struct MIMESearch
{
const char* name;
int name_len;
-} MIMESearch;
+} ;
-typedef struct _MIMESearchInfo
+struct MIMESearchInfo
{
int id;
int index;
int length;
-} MIMESearchInfo;
+} ;
MIMESearchInfo mime_search_info;
const uint8_t* MimeSession::process_mime_data_paf(Flow* flow, const uint8_t* start, const uint8_t* end,
bool upload, FilePosition position)
{
-
bool done_data = is_end_of_data(flow);
/* if we've just entered the data state, check for a dot + end of line
return NULL;
}
-
if (normalize_data(config, start, end) < 0)
return NULL;
/* now we shouldn't have to worry about copying any data to the alt buffer
#include "utils/util.h"
#include "detection/detection_util.h"
#include "file_api/file_service.h"
+#include "file_api/file_flows.h"
#include "nhttp_enum.h"
#include "nhttp_msg_request.h"
// fully supports it remove the outer if statement that prevents it from being done.
if (session_data->file_depth_remaining[1-source_id] == 0)
{
+ FileFlows* file_flows = FileFlows::get_file_flows(flow);
+ if (!file_flows)
+ return;
+
if ((session_data->file_depth_remaining[source_id] = FileService::get_max_file_depth()) < 0)
{
session_data->file_depth_remaining[source_id] = 0;
if (file_flows)
file_flows->file_process(nullptr, 0, SNORT_FILE_END, false, false);
}
- else if (session_data->mime_state != nullptr)
+ else
{
session_data->mime_state->process_mime_data(flow, nullptr, 0, true,
SNORT_FILE_END);