mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Some working code. Adds UID pools classified by string. Just compiles
and runs; need to go back through and make sure this code is actually doing what I want it to do. Note: Added new function unique_id_from(pool: string, prefix: string) that allows the user to explicitly specify a randomness pool to use when generating unique IDs.
This commit is contained in:
parent
f36310dc0e
commit
9322c063cc
10 changed files with 78 additions and 21 deletions
|
@ -226,7 +226,10 @@ extern int time_compare(struct timeval* tv_a, struct timeval* tv_b);
|
|||
|
||||
// Returns an integer that's very likely to be unique, even across Bro
|
||||
// instances.
|
||||
#define BRO_DEFAULT_UID_POOL "bro"
|
||||
#define BRO_SCRIPT_UID_POOL "bro script"
|
||||
extern uint64 calculate_unique_id();
|
||||
extern uint64 calculate_unique_id(const std::string& pool);
|
||||
|
||||
// For now, don't use hash_maps - they're not fully portable.
|
||||
#if 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue