Squashed commit of the following:
commit
5d33a2096b9e5122c9f5612136b90dbe0f886bca
Author: Steven Baigal (sbaigal) <sbaigal@cisco.com>
Date: Thu Feb 14 15:32:12 2019 -0500
file_capture: sync with firewall changes
set( FILE_API_INCLUDES
file_api.h
+ file_capture.h
file_config.h
file_flows.h
file_identifier.h
circular_buffer.cc
circular_buffer.h
file_capture.cc
- file_capture.h
file_cache.cc
file_cache.h
file_config.cc
FileSigState sig_state;
};
-struct FileCaptureInfo;
-
namespace snort
{
#define FILE_ID_MAX 1024
FileCaptureBlock* next; /* next block of file data */
};
-class FileCapture
+class SO_PUBLIC FileCapture
{
public:
FileCapture(int64_t capture_min_size, int64_t capture_max_size);
snort::FileInfo* get_file_info() { return file_info; }
+ int64_t get_max_file_capture_size() { return capture_max_size; }
+ int64_t get_file_capture_size() { return capture_size; }
+ void get_file_reset() { current_block = head; }
+
private:
static void init_mempool(int64_t max_file_mem, int64_t block_size);
return state;
}
+int64_t FileInfo::get_max_file_capture_size()
+{
+ return (file_capture ? file_capture->get_max_file_capture_size() : 0);
+}
+
FileContext::FileContext ()
{
file_type_context = nullptr;
// Preserve the file in memory until it is released
// The file reserved will be returned and it will be detached from file context/session
FileCaptureState reserve_file(FileCapture*& dest);
+ int64_t get_max_file_capture_size();
FileState get_file_state() { return file_state; }