"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/service_inspectors/http_inspect/http_stream_splitter.h" between
snort3-3.1.28.0.tar.gz and snort3-3.1.29.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

http_stream_splitter.h  (snort3-3.1.28.0):http_stream_splitter.h  (snort3-3.1.29.0)
skipping to change at line 25 skipping to change at line 25
// with this program; if not, write to the Free Software Foundation, Inc., // with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// http_stream_splitter.h author Tom Peters <thopeter@cisco.com> // http_stream_splitter.h author Tom Peters <thopeter@cisco.com>
#ifndef HTTP_STREAM_SPLITTER_H #ifndef HTTP_STREAM_SPLITTER_H
#define HTTP_STREAM_SPLITTER_H #define HTTP_STREAM_SPLITTER_H
#include <zlib.h> #include <zlib.h>
#include "stream/stream_splitter.h"
#include "http_common.h" #include "http_common.h"
#include "http_enum.h" #include "http_enum.h"
#include "http_flow_data.h" #include "http_flow_data.h"
#include "http_stream_splitter_base.h"
#include "http_test_manager.h" #include "http_test_manager.h"
class HttpInspect; class HttpInspect;
class HttpStreamSplitter : public snort::StreamSplitter class HttpStreamSplitter : public HttpStreamSplitterBase
{ {
public: public:
HttpStreamSplitter(bool is_client_to_server, HttpInspect* my_inspector_) : HttpStreamSplitter(bool is_client_to_server, HttpInspect* my_inspector_) :
snort::StreamSplitter(is_client_to_server), HttpStreamSplitterBase(is_client_to_server),
my_inspector(my_inspector_), my_inspector(my_inspector_),
source_id(is_client_to_server ? HttpCommon::SRC_CLIENT : HttpCommon::SRC _SERVER) {} source_id(is_client_to_server ? HttpCommon::SRC_CLIENT : HttpCommon::SRC _SERVER) {}
Status scan(snort::Packet* pkt, const uint8_t* data, uint32_t length, uint32 _t not_used, Status scan(snort::Packet* pkt, const uint8_t* data, uint32_t length, uint32 _t not_used,
uint32_t* flush_offset) override; uint32_t* flush_offset) override;
const snort::StreamBuffer reassemble(snort::Flow* flow, unsigned total, unsi gned, const const snort::StreamBuffer reassemble(snort::Flow* flow, unsigned total, unsi gned, const
uint8_t* data, unsigned len, uint32_t flags, unsigned& copied) override; uint8_t* data, unsigned len, uint32_t flags, unsigned& copied) override;
bool finish(snort::Flow* flow) override; bool finish(snort::Flow* flow) override;
void prep_partial_flush(snort::Flow* flow, uint32_t num_flush); void prep_partial_flush(snort::Flow* flow, uint32_t num_flush) override;
bool is_paf() override { return true; } bool is_paf() override { return true; }
static StreamSplitter::Status status_value(StreamSplitter::Status ret_val, b ool http2 = false); static StreamSplitter::Status status_value(StreamSplitter::Status ret_val, b ool http2 = false);
// FIXIT-M should return actual packet buffer size // FIXIT-M should return actual packet buffer size
unsigned max(snort::Flow*) override { return HttpEnums::MAX_OCTETS; } unsigned max(snort::Flow*) override { return HttpEnums::MAX_OCTETS; }
void go_away() override {} void go_away() override {}
private: private:
void prepare_flush(HttpFlowData* session_data, uint32_t* flush_offset, HttpE nums::SectionType void prepare_flush(HttpFlowData* session_data, uint32_t* flush_offset, HttpC ommon::SectionType
section_type, uint32_t num_flushed, uint32_t num_excess, int32_t num_hea d_lines, section_type, uint32_t num_flushed, uint32_t num_excess, int32_t num_hea d_lines,
bool is_broken_chunk, uint32_t num_good_chunks, uint32_t octets_seen) bool is_broken_chunk, uint32_t num_good_chunks, uint32_t octets_seen)
const; const;
HttpCutter* get_cutter(HttpEnums::SectionType type, HttpFlowData* session) c onst; HttpCutter* get_cutter(HttpCommon::SectionType type, HttpFlowData* session) const;
void chunk_spray(HttpFlowData* session_data, uint8_t* buffer, const uint8_t* data, void chunk_spray(HttpFlowData* session_data, uint8_t* buffer, const uint8_t* data,
unsigned length) const; unsigned length) const;
void decompress_copy(uint8_t* buffer, uint32_t& offset, const uint8_t* data, void decompress_copy(uint8_t* buffer, uint32_t& offset, const uint8_t* data,
uint32_t length, HttpEnums::CompressId& compression, z_stream*& compress _stream, uint32_t length, HttpEnums::CompressId& compression, z_stream*& compress _stream,
bool at_start, HttpInfractions* infractions, HttpEventGen* events, bool at_start, HttpInfractions* infractions, HttpEventGen* events,
HttpFlowData* session_data) const; HttpFlowData* session_data) const;
void process_gzip_header(const uint8_t* data, void process_gzip_header(const uint8_t* data,
uint32_t length, HttpFlowData* session_data) const; uint32_t length, HttpFlowData* session_data) const;
bool gzip_header_check_done(HttpFlowData* session_data) const; bool gzip_header_check_done(HttpFlowData* session_data) const;
 End of changes. 7 change blocks. 
7 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)