[Bro] problem with &expire_func
Christoph Göldi
goeldich at ee.ethz.ch
Thu Feb 10 13:57:23 PST 2005
--On Donnerstag, 10. Februar 2005 13:29 -0800 Vern Paxson <vern at icir.org>
wrote:
>> > function myfunc(t: table[addr] of bool , idx: addr): interval {
>> > local srcIP: addr;
>> > srcIP = idx;
>> > return 0secs;
>> > }
>>
>> results in this error when i want to start bro:
>> > policy/test.bro, line xx (srcIP = idx): error, type clash in assignment
>
> Please send the full script exhibiting this problem. I actually *did*
> test my suggestion and it works for me, and I just fed the above into Bro
> and it didn't generate any error message.
here:
######### test.bro
> global myfunc: function(t: table[addr] of count, idx: any): interval;
>
> global tcp_host_state: table[addr] of count &default=0 &write_expire=1day
> &expire_func=myfunc;
>
> function myfunc(t: table[addr] of count, idx: any): interval {
> local srcIP: addr;
> srcIP = idx;
> print t[srcIP];
> return 0secs;
> }
result:
> christoph:/usr/local/bro # ./bin/bro -i eth0 test
> policy/test.bro, line 7 (srcIP = idx): error, type clash in assignment
thanx
christoph
More information about the Bro
mailing list