mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Reorganize reassembly data structures
Started by factoring some details into a new DataBlockList class to at least make it more clear where modifications occur. More abstractions likely to happen later as I experiment with alternate data structures aimed at improving worse-case scenarios.
This commit is contained in:
parent
395c685da1
commit
b19c8fad7a
8 changed files with 343 additions and 285 deletions
|
@ -44,13 +44,7 @@ public:
|
|||
// How much data is pending delivery since it's not yet reassembled.
|
||||
// Includes the data due to holes (so this value is a bit different
|
||||
// from waiting_on_hole above; and is computed in a different fashion).
|
||||
uint64_t NumUndeliveredBytes() const
|
||||
{
|
||||
if ( last_block )
|
||||
return last_block->upper - last_reassem_seq;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
uint64_t NumUndeliveredBytes() const;
|
||||
|
||||
void SetContentsFile(BroFile* f);
|
||||
BroFile* GetContentsFile() const { return record_contents_file; }
|
||||
|
@ -93,10 +87,10 @@ private:
|
|||
void Gap(uint64_t seq, uint64_t len);
|
||||
|
||||
void RecordToSeq(uint64_t start_seq, uint64_t stop_seq, BroFile* f);
|
||||
void RecordBlock(DataBlock* b, BroFile* f);
|
||||
void RecordBlock(const DataBlock* b, BroFile* f);
|
||||
void RecordGap(uint64_t start_seq, uint64_t upper_seq, BroFile* f);
|
||||
|
||||
void BlockInserted(DataBlock* b) override;
|
||||
void BlockInserted(const DataBlock* b) override;
|
||||
void Overlap(const u_char* b1, const u_char* b2, uint64_t n) override;
|
||||
|
||||
TCP_Endpoint* endp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue