Add spicy runtime-support current_analyzer_id(), use it to set id in events

This commit is contained in:
Tim Wojtulewicz 2024-12-18 15:32:10 -07:00
parent 991bc9644d
commit fd4f25965d
5 changed files with 42 additions and 1 deletions

View file

@ -209,6 +209,14 @@ void raise_event(const EventHandlerPtr& handler, const hilti::rt::Vector<ValPtr>
*/
TypePtr event_arg_type(const EventHandlerPtr& handler, const hilti::rt::integer::safe<uint64_t>& idx);
/**
* Retrieves the analyzer ID for the currently processed Zeek connection.
* Assumes that the HILTI context's cookie value has been set accordingly.
*
* @return Pointer to an analyzer instance
*/
zeek::analyzer::ID current_analyzer_id();
/**
* Retrieves the connection ID for the currently processed Zeek connection.
* Assumes that the HILTI context's cookie value has been set accordingly.