mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Deprecate Plugin::HookCallFunction(), replace with HookFunctionCall()
This also changes the argument type of Func::operator() to zeek::Args* to allow plugins to be able to alter function arguments in place as was previously documented.
This commit is contained in:
parent
46c5dea733
commit
272db640aa
27 changed files with 417 additions and 77 deletions
27
testing/btest/plugins/func-hook-plugin/src/Plugin.h
Normal file
27
testing/btest/plugins/func-hook-plugin/src/Plugin.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <plugin/Plugin.h>
|
||||
|
||||
namespace plugin {
|
||||
namespace Demo_Hooks {
|
||||
|
||||
class Plugin : public ::plugin::Plugin
|
||||
{
|
||||
protected:
|
||||
|
||||
std::pair<bool, IntrusivePtr<Val>> HookFunctionCall(const Func* func,
|
||||
Frame* frame,
|
||||
zeek::Args* args) override;
|
||||
|
||||
void MetaHookPre(HookType hook, const HookArgumentList& args) override;
|
||||
void MetaHookPost(HookType hook, const HookArgumentList& args, HookArgument result) override;
|
||||
|
||||
// Overridden from plugin::Plugin.
|
||||
plugin::Configuration Configure() override;
|
||||
};
|
||||
|
||||
extern Plugin plugin;
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue