mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Move IntrusivePtr and utility methods to the zeek namespace
This commit is contained in:
parent
4668378d91
commit
9364e6a5b7
255 changed files with 3761 additions and 3730 deletions
|
@ -92,7 +92,7 @@ uint64_t TCP_Reassembler::NumUndeliveredBytes() const
|
|||
return last_block.upper - last_reassem_seq;
|
||||
}
|
||||
|
||||
void TCP_Reassembler::SetContentsFile(IntrusivePtr<BroFile> f)
|
||||
void TCP_Reassembler::SetContentsFile(zeek::IntrusivePtr<BroFile> f)
|
||||
{
|
||||
if ( ! f->IsOpen() )
|
||||
{
|
||||
|
@ -317,7 +317,7 @@ void TCP_Reassembler::MatchUndelivered(uint64_t up_to_seq, bool use_last_upper)
|
|||
}
|
||||
}
|
||||
|
||||
void TCP_Reassembler::RecordToSeq(uint64_t start_seq, uint64_t stop_seq, const IntrusivePtr<BroFile>& f)
|
||||
void TCP_Reassembler::RecordToSeq(uint64_t start_seq, uint64_t stop_seq, const zeek::IntrusivePtr<BroFile>& f)
|
||||
{
|
||||
auto it = block_list.Begin();
|
||||
|
||||
|
@ -348,7 +348,7 @@ void TCP_Reassembler::RecordToSeq(uint64_t start_seq, uint64_t stop_seq, const I
|
|||
RecordGap(last_seq, stop_seq, f);
|
||||
}
|
||||
|
||||
void TCP_Reassembler::RecordBlock(const DataBlock& b, const IntrusivePtr<BroFile>& f)
|
||||
void TCP_Reassembler::RecordBlock(const DataBlock& b, const zeek::IntrusivePtr<BroFile>& f)
|
||||
{
|
||||
if ( f->Write((const char*) b.block, b.Size()) )
|
||||
return;
|
||||
|
@ -359,11 +359,11 @@ void TCP_Reassembler::RecordBlock(const DataBlock& b, const IntrusivePtr<BroFile
|
|||
tcp_analyzer->EnqueueConnEvent(contents_file_write_failure,
|
||||
Endpoint()->Conn()->ConnVal(),
|
||||
val_mgr->Bool(IsOrig()),
|
||||
make_intrusive<StringVal>("TCP reassembler content write failure")
|
||||
zeek::make_intrusive<StringVal>("TCP reassembler content write failure")
|
||||
);
|
||||
}
|
||||
|
||||
void TCP_Reassembler::RecordGap(uint64_t start_seq, uint64_t upper_seq, const IntrusivePtr<BroFile>& f)
|
||||
void TCP_Reassembler::RecordGap(uint64_t start_seq, uint64_t upper_seq, const zeek::IntrusivePtr<BroFile>& f)
|
||||
{
|
||||
if ( f->Write(fmt("\n<<gap %" PRIu64">>\n", upper_seq - start_seq)) )
|
||||
return;
|
||||
|
@ -374,7 +374,7 @@ void TCP_Reassembler::RecordGap(uint64_t start_seq, uint64_t upper_seq, const In
|
|||
tcp_analyzer->EnqueueConnEvent(contents_file_write_failure,
|
||||
Endpoint()->Conn()->ConnVal(),
|
||||
val_mgr->Bool(IsOrig()),
|
||||
make_intrusive<StringVal>("TCP reassembler gap write failure")
|
||||
zeek::make_intrusive<StringVal>("TCP reassembler gap write failure")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -453,9 +453,9 @@ void TCP_Reassembler::Overlap(const u_char* b1, const u_char* b2, uint64_t n)
|
|||
|
||||
tcp_analyzer->EnqueueConnEvent(rexmit_inconsistency,
|
||||
tcp_analyzer->ConnVal(),
|
||||
make_intrusive<StringVal>(b1_s),
|
||||
make_intrusive<StringVal>(b2_s),
|
||||
make_intrusive<StringVal>(flags.AsString())
|
||||
zeek::make_intrusive<StringVal>(b1_s),
|
||||
zeek::make_intrusive<StringVal>(b2_s),
|
||||
zeek::make_intrusive<StringVal>(flags.AsString())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ void TCP_Reassembler::DeliverBlock(uint64_t seq, int len, const u_char* data)
|
|||
tcp_analyzer->ConnVal(),
|
||||
val_mgr->Bool(IsOrig()),
|
||||
val_mgr->Count(seq),
|
||||
make_intrusive<StringVal>(len, (const char*) data)
|
||||
zeek::make_intrusive<StringVal>(len, (const char*) data)
|
||||
);
|
||||
|
||||
// Q. Can we say this because it is already checked in DataSent()?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue