I am trying to auto generate a variable name dynamically.
...
The above does not work, so is there any command in bro language that could
transform a string into a variable ?
I wonder if O(1) is the case for reading from a table as well ?
If so, what would be the benefit of using a bloom filter ?
Roughly said: You cannot store the actual data in a bloom filter. It is
a probabilistic data structure for membership testing only. Compared to
hash tables, bloom filters are very small and constant in space.
So testing if an element was seen before using a bloom filter has the same
complexity as checking if its in a table ?
It is a different tradeoff: The worst case for a hash table would be a
lookup that takes O(n). The "worst case" for a bloom filter would be a
match although the tested element was not added to the filter.
It is a different tradeoff: The worst case for a hash table would be a
lookup that takes O(n).
While that's indeed the worst case, note that Bro uses randomized universal
hash functions, so in practice you should never see such a run-time, even
for maliciously crafted inputs.