Thank you! Exactly what I was looking for
On Tue, Aug 8, 2017 at 11:27 AM, Aashish Sharma wrote:
> (Not sure if I am interpreting your question right but here is how I read
> it)
>
> basically use "in" operator
>
>
> local my_ip_table : table[addr] of bool ;
>
> local ip: addr = 127.0.0.1
>
> if
(Not sure if I am interpreting your question right but here is how I read it)
basically use "in" operator
local my_ip_table : table[addr] of bool ;
local ip: addr = 127.0.0.1
if ( ip in my_ip_table)
found
else
not found
btw, you can also use "!in" operator too which is
You're looking for 'in'
http://try.bro.org/#/?example=basics-composite-types-table
--
- Justin Azoff
> On Aug 8, 2017, at 2:04 PM, Reinhard Gentz wrote:
>
> Hi,
>
> I would like to check if a certain table element exists and then take
> corresponding action like the following:
>
> if (exi
Use "in":
if ("my_dynamic_name" in mytable)
Johanna
On 8 Aug 2017, at 11:04, Reinhard Gentz wrote:
> Hi,
>
> I would like to check if a certain table element exists and then take
> corresponding action like the following:
>
> if (exists(mytable["my_dynamic_name"]))
> do something
> else
>
Hi,
I would like to check if a certain table element exists and then take
corresponding action like the following:
if (exists(mytable["my_dynamic_name"]))
do something
else
do something else
Can someone give me a hint?
Reinhard
___
bro-dev mai