mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
GH-1620: Add event and plugin hook to track packets not processed
This commit is contained in:
parent
8fece3d8ea
commit
fe932944c4
16 changed files with 194 additions and 25 deletions
|
@ -31,6 +31,7 @@ const char* hook_name(HookType h)
|
|||
"SetupAnalyzerTree",
|
||||
"LogInit",
|
||||
"LogWrite",
|
||||
"UnprocessedPacket",
|
||||
// MetaHooks
|
||||
"MetaHookPre",
|
||||
"MetaHookPost",
|
||||
|
@ -244,7 +245,11 @@ void HookArgument::Describe(ODesc* d) const
|
|||
d->Add("<no content>");
|
||||
|
||||
d->Add(")");
|
||||
break;
|
||||
}
|
||||
|
||||
case PACKET:
|
||||
d->Add("<packet>");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -432,6 +437,8 @@ bool Plugin::HookReporter(const std::string& prefix, const EventHandlerPtr event
|
|||
return true;
|
||||
}
|
||||
|
||||
void Plugin::HookUnprocessedPacket(const Packet* packet) { }
|
||||
|
||||
void Plugin::MetaHookPre(HookType hook, const HookArgumentList& args) { }
|
||||
|
||||
void Plugin::MetaHookPost(HookType hook, const HookArgumentList& args, HookArgument result) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue