mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Merge remote-tracking branch 'origin/master' into topic/seth/elasticsearch
Conflicts: aux/binpac aux/bro-aux aux/broccoli aux/broctl scripts/base/frameworks/logging/__load__.bro src/logging.bif
This commit is contained in:
commit
601d1cf37e
217 changed files with 7146 additions and 2574 deletions
21
src/util.h
21
src/util.h
|
@ -160,6 +160,10 @@ extern bool have_random_seed();
|
|||
// predictable PRNG.
|
||||
long int bro_random();
|
||||
|
||||
// Calls the system srandom() function with the given seed if not running
|
||||
// in deterministic mode, else it updates the state of the deterministic PRNG.
|
||||
void bro_srandom(unsigned int seed);
|
||||
|
||||
extern uint64 rand64bit();
|
||||
|
||||
// Each event source that may generate events gets an internally unique ID.
|
||||
|
@ -194,9 +198,22 @@ extern FILE* rotate_file(const char* name, RecordVal* rotate_info);
|
|||
// This mimics the script-level function with the same name.
|
||||
const char* log_file_name(const char* tag);
|
||||
|
||||
// Parse a time string of the form "HH:MM" (as used for the rotation base
|
||||
// time) into a double representing the number of seconds. Returns -1 if the
|
||||
// string cannot be parsed. The function's result is intended to be used with
|
||||
// calc_next_rotate().
|
||||
//
|
||||
// This function is not thread-safe.
|
||||
double parse_rotate_base_time(const char* rotate_base_time);
|
||||
|
||||
// Calculate the duration until the next time a file is to be rotated, based
|
||||
// on the given rotate_interval and rotate_base_time.
|
||||
double calc_next_rotate(double rotate_interval, const char* rotate_base_time);
|
||||
// on the given rotate_interval and rotate_base_time. 'current' the the
|
||||
// current time to be used as base, 'rotate_interval' the rotation interval,
|
||||
// and 'base' the value returned by parse_rotate_base_time(). For the latter,
|
||||
// if the function returned -1, that's fine, calc_next_rotate() handles that.
|
||||
//
|
||||
// This function is thread-safe.
|
||||
double calc_next_rotate(double current, double rotate_interval, double base);
|
||||
|
||||
// Terminates processing gracefully, similar to pressing CTRL-C.
|
||||
void terminate_processing();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue