mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/master' into topic/seth/files-tracking
Conflicts: src/Reassem.cc src/Reassem.h src/analyzer/protocol/tcp/TCP_Reassembler.cc testing/btest/Baseline/scripts.base.frameworks.file-analysis.bifs.set_timeout_interval/bro..stdout testing/btest/Baseline/scripts.base.frameworks.file-analysis.http.partial-content/b.out testing/btest/Baseline/scripts.base.frameworks.file-analysis.http.partial-content/c.out testing/btest/Baseline/scripts.base.frameworks.file-analysis.logging/files.log
This commit is contained in:
commit
fb0a658a7c
658 changed files with 21875 additions and 5792 deletions
|
@ -8,16 +8,16 @@
|
|||
|
||||
class DataBlock {
|
||||
public:
|
||||
DataBlock(const u_char* data, int size, int seq,
|
||||
DataBlock(const u_char* data, uint64 size, uint64 seq,
|
||||
DataBlock* prev, DataBlock* next);
|
||||
|
||||
~DataBlock();
|
||||
|
||||
int Size() const { return upper - seq; }
|
||||
uint64 Size() const { return upper - seq; }
|
||||
|
||||
DataBlock* next; // next block with higher seq #
|
||||
DataBlock* prev; // previous block with lower seq #
|
||||
int seq, upper;
|
||||
uint64 seq, upper;
|
||||
u_char* block;
|
||||
};
|
||||
|
||||
|
@ -25,22 +25,22 @@ public:
|
|||
|
||||
class Reassembler : public BroObj {
|
||||
public:
|
||||
Reassembler(int init_seq);
|
||||
Reassembler(uint64 init_seq);
|
||||
virtual ~Reassembler();
|
||||
|
||||
void NewBlock(double t, int seq, int len, const u_char* data);
|
||||
void NewBlock(double t, uint64 seq, uint64 len, const u_char* data);
|
||||
|
||||
// Throws away all blocks up to seq. Returns number of bytes
|
||||
// if not all in-sequence, 0 if they were.
|
||||
int TrimToSeq(int seq);
|
||||
uint64 TrimToSeq(uint64 seq);
|
||||
|
||||
// Delete all held blocks.
|
||||
void ClearBlocks();
|
||||
|
||||
int HasBlocks() const { return blocks != 0; }
|
||||
int LastReassemSeq() const { return last_reassem_seq; }
|
||||
uint64 LastReassemSeq() const { return last_reassem_seq; }
|
||||
|
||||
int TotalSize() const; // number of bytes buffered up
|
||||
uint64 TotalSize() const; // number of bytes buffered up
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
static Reassembler* Unserialize(UnserialInfo* info);
|
||||
|
||||
// Sum over all data buffered in some reassembler.
|
||||
static unsigned int TotalMemoryAllocation() { return total_size; }
|
||||
static uint64 TotalMemoryAllocation() { return total_size; }
|
||||
|
||||
protected:
|
||||
Reassembler() { }
|
||||
|
@ -57,20 +57,20 @@ protected:
|
|||
|
||||
friend class DataBlock;
|
||||
|
||||
virtual void Undelivered(int up_to_seq);
|
||||
virtual void Undelivered(uint64 up_to_seq);
|
||||
|
||||
virtual void BlockInserted(DataBlock* b) = 0;
|
||||
virtual void Overlap(const u_char* b1, const u_char* b2, int n) = 0;
|
||||
virtual void Overlap(const u_char* b1, const u_char* b2, uint64 n) = 0;
|
||||
|
||||
DataBlock* AddAndCheck(DataBlock* b, int seq,
|
||||
int upper, const u_char* data);
|
||||
DataBlock* AddAndCheck(DataBlock* b, uint64 seq,
|
||||
uint64 upper, const u_char* data);
|
||||
|
||||
DataBlock* blocks;
|
||||
DataBlock* last_block;
|
||||
int last_reassem_seq;
|
||||
int trim_seq; // how far we've trimmed
|
||||
uint64 last_reassem_seq;
|
||||
uint64 trim_seq; // how far we've trimmed
|
||||
|
||||
static unsigned int total_size;
|
||||
static uint64 total_size;
|
||||
};
|
||||
|
||||
inline DataBlock::~DataBlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue