mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Refactor how file analysis actions are tracked.
The Info record now uses a "table[ActionArgs] of ActionResults", which allows for simultaneous actions of a given type as long as other args (fields in the ActionArgs record) are different.
This commit is contained in:
parent
4b30cc2e24
commit
691622b3aa
13 changed files with 233 additions and 158 deletions
|
@ -100,23 +100,22 @@ bool Manager::PostponeTimeout(const FileID& file_id) const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Manager::AddAction(const FileID& file_id, EnumVal* act,
|
||||
RecordVal* args) const
|
||||
bool Manager::AddAction(const FileID& file_id, RecordVal* args) const
|
||||
{
|
||||
Info* info = Lookup(file_id);
|
||||
|
||||
if ( ! info ) return false;
|
||||
|
||||
return info->AddAction(static_cast<ActionTag>(act->AsEnum()), args);
|
||||
return info->AddAction(args);
|
||||
}
|
||||
|
||||
bool Manager::RemoveAction(const FileID& file_id, EnumVal* act) const
|
||||
bool Manager::RemoveAction(const FileID& file_id, const RecordVal* args) const
|
||||
{
|
||||
Info* info = Lookup(file_id);
|
||||
|
||||
if ( ! info ) return false;
|
||||
|
||||
return info->RemoveAction(static_cast<ActionTag>(act->AsEnum()));
|
||||
return info->RemoveAction(args);
|
||||
}
|
||||
|
||||
Info* Manager::GetInfo(const string& unique, Connection* conn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue