mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00

to chose to not die upon encountering files/functions. I am not entirely sure if I like the approach I took for this, it is a bit... hacky.
59 lines
1.3 KiB
Text
59 lines
1.3 KiB
Text
# functions and types for the input framework
|
|
|
|
module Input;
|
|
|
|
%%{
|
|
#include "input/Manager.h"
|
|
#include "NetVar.h"
|
|
%%}
|
|
|
|
type TableDescription: record;
|
|
type EventDescription: record;
|
|
|
|
function Input::__create_table_stream%(description: Input::TableDescription%) : bool
|
|
%{
|
|
bool res = input_mgr->CreateTableStream(description->AsRecordVal());
|
|
return new Val(res, TYPE_BOOL);
|
|
%}
|
|
|
|
function Input::__create_event_stream%(description: Input::EventDescription%) : bool
|
|
%{
|
|
bool res = input_mgr->CreateEventStream(description->AsRecordVal());
|
|
return new Val(res, TYPE_BOOL);
|
|
%}
|
|
|
|
function Input::__remove_stream%(id: string%) : bool
|
|
%{
|
|
bool res = input_mgr->RemoveStream(id->AsString()->CheckString());
|
|
return new Val(res, TYPE_BOOL);
|
|
%}
|
|
|
|
function Input::__force_update%(id: string%) : bool
|
|
%{
|
|
bool res = input_mgr->ForceUpdate(id->AsString()->CheckString());
|
|
return new Val(res, TYPE_BOOL);
|
|
%}
|
|
|
|
# Options for the input framework
|
|
|
|
const accept_unsupported_types: bool;
|
|
|
|
# Options for Ascii Reader
|
|
|
|
module InputAscii;
|
|
|
|
const separator: string;
|
|
const set_separator: string;
|
|
const empty_field: string;
|
|
const unset_field: string;
|
|
|
|
module InputRaw;
|
|
const record_separator: string;
|
|
|
|
module InputBenchmark;
|
|
const factor: double;
|
|
const spread: count;
|
|
const autospread: double;
|
|
const addfactor: count;
|
|
const stopspreadat: count;
|
|
const timedspread: double;
|