mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Move BroString to zeek namespace
This commit is contained in:
parent
464efbe66a
commit
58c6e10b62
54 changed files with 317 additions and 303 deletions
|
@ -325,7 +325,7 @@ void File::InferMetadata()
|
|||
if ( bof_buffer.size == 0 )
|
||||
return;
|
||||
|
||||
BroString* bs = concatenate(bof_buffer.chunks);
|
||||
zeek::BroString* bs = concatenate(bof_buffer.chunks);
|
||||
val->Assign<zeek::StringVal>(bof_buffer_idx, bs);
|
||||
bof_buffer_val = val->GetField(bof_buffer_idx).get();
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ bool File::BufferBOF(const u_char* data, uint64_t len)
|
|||
|
||||
uint64_t desired_size = LookupFieldDefaultCount(bof_buffer_size_idx);
|
||||
|
||||
bof_buffer.chunks.push_back(new BroString(data, len, false));
|
||||
bof_buffer.chunks.push_back(new zeek::BroString(data, len, false));
|
||||
bof_buffer.size += len;
|
||||
|
||||
if ( bof_buffer.size < desired_size )
|
||||
|
@ -369,7 +369,7 @@ bool File::BufferBOF(const u_char* data, uint64_t len)
|
|||
|
||||
if ( bof_buffer.size > 0 )
|
||||
{
|
||||
BroString* bs = concatenate(bof_buffer.chunks);
|
||||
zeek::BroString* bs = concatenate(bof_buffer.chunks);
|
||||
val->Assign(bof_buffer_idx, zeek::make_intrusive<zeek::StringVal>(bs));
|
||||
}
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ protected:
|
|||
|
||||
bool full;
|
||||
uint64_t size;
|
||||
BroString::CVec chunks;
|
||||
zeek::BroString::CVec chunks;
|
||||
} bof_buffer; /**< Beginning of file buffer. */
|
||||
|
||||
WeirdStateMap weird_state;
|
||||
|
|
|
@ -80,7 +80,7 @@ void Manager::SetHandle(const string& handle)
|
|||
#ifdef DEBUG
|
||||
if ( debug_logger.IsEnabled(DBG_FILE_ANALYSIS) )
|
||||
{
|
||||
BroString tmp{handle};
|
||||
zeek::BroString tmp{handle};
|
||||
auto rendered = tmp.Render();
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Set current handle to %s", rendered);
|
||||
delete [] rendered;
|
||||
|
|
|
@ -45,7 +45,7 @@ bool DataEvent::DeliverChunk(const u_char* data, uint64_t len, uint64_t offset)
|
|||
|
||||
mgr.Enqueue(chunk_event,
|
||||
GetFile()->ToVal(),
|
||||
zeek::make_intrusive<zeek::StringVal>(new BroString(data, len, false)),
|
||||
zeek::make_intrusive<zeek::StringVal>(new zeek::BroString(data, len, false)),
|
||||
val_mgr->Count(offset)
|
||||
);
|
||||
|
||||
|
@ -58,7 +58,7 @@ bool DataEvent::DeliverStream(const u_char* data, uint64_t len)
|
|||
|
||||
mgr.Enqueue(stream_event,
|
||||
GetFile()->ToVal(),
|
||||
zeek::make_intrusive<zeek::StringVal>(new BroString(data, len, false))
|
||||
zeek::make_intrusive<zeek::StringVal>(new zeek::BroString(data, len, false))
|
||||
);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue