Introduce global_hash_seed script variable.

This commit adds support for script-level specification of a seed to be used by
hashers. For example, if the given name of a Bloom filter is not empty, then
the seed used by the underlying hasher only depends on the Bloom filter name.
If the name is empty, we check whether the user defined a non-empty
global_hash_seed string variable at script and use it instead. If that script
variable does not exist, then we fall back to the initial seed computed a
Bro startup (which is affected ultimately by $BRO_SEED).

See Hasher::MakeSeed for details.
This commit is contained in:
Matthias Vallentin 2013-07-31 17:59:08 +02:00
parent af9e181731
commit 8ca76dd4ee
6 changed files with 82 additions and 67 deletions

View file

@ -242,6 +242,8 @@ extern TableType* record_field_table;
extern StringVal* cmd_line_bpf_filter;
extern StringVal* global_hash_seed;
class OpaqueType;
extern OpaqueType* md5_type;
extern OpaqueType* sha1_type;