mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
EventRegistry/zeek.bif/init-bare: Add event metadata infrastructure
Introduce a new EventMetadata module and members on EventMgr to register event metadata types.
This commit is contained in:
parent
fc96c81c70
commit
cc7dc60c1e
8 changed files with 218 additions and 1 deletions
|
@ -579,6 +579,21 @@ const io_poll_interval_live = 10 &redef;
|
|||
## while testing, but should be used sparingly.
|
||||
const running_under_test: bool = F &redef;
|
||||
|
||||
module EventMetadata;
|
||||
|
||||
export {
|
||||
## Enum type for metadata identifiers.
|
||||
type ID: enum {
|
||||
NETWORK_TIMESTAMP = 1,
|
||||
};
|
||||
|
||||
## A event metadata entry.
|
||||
type Entry: record {
|
||||
id: EventMetadata::ID; ##< The registered :zeek:see:`EventMetadata::ID` value.
|
||||
val: any; ##< The value. Its type matches what was passed to :zeek:see:`EventMetadata::register`.
|
||||
};
|
||||
}
|
||||
|
||||
module FTP;
|
||||
|
||||
export {
|
||||
|
@ -751,6 +766,9 @@ module GLOBAL;
|
|||
## directly and then remove this alias.
|
||||
type EncapsulatingConnVector: vector of Tunnel::EncapsulatingConn;
|
||||
|
||||
## A type alias for event metadata.
|
||||
type event_metadata_vec: vector of EventMetadata::Entry;
|
||||
|
||||
## Statistics about a :zeek:type:`connection` endpoint.
|
||||
##
|
||||
## .. zeek:see:: connection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue