mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Add basic structure for fuzzing targets
General changes: * Add -D/--deterministic command line option as convenience/alternative to -G/--load-seeds (i.e. no file needed, it just uses zero-initialized random seeds). It also changes Broker data stores over to using deterministic timing rather than real time. * Add option to make Reporter abort on runtime scripting errors
This commit is contained in:
parent
f849571910
commit
8f1b34b915
20 changed files with 1290 additions and 928 deletions
31
src/zeek-setup.h
Normal file
31
src/zeek-setup.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Options.h"
|
||||
|
||||
namespace zeek {
|
||||
|
||||
struct SetupResult {
|
||||
int code = 0;
|
||||
zeek::Options options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes Zeek's global state.
|
||||
* @param argc the argument count (same semantics as main function)
|
||||
* @param argv the argument strings (same semantics as main function)
|
||||
* @param options if provided, those options are used instead of
|
||||
* deriving them by parsing the "argv" list. The "argv" list still
|
||||
* needs to be provided regardless since some functionality requires
|
||||
* it, particularly, several things use the value of argv[0].
|
||||
*/
|
||||
SetupResult setup(int argc, char** argv, zeek::Options* options = nullptr);
|
||||
|
||||
/**
|
||||
* Cleans up Zeek's global state.
|
||||
* @param did_net_run whether the net_run() was called.
|
||||
*/
|
||||
int cleanup(bool did_net_run);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue