[Bro] Two-dimensional arrays and for loop in Bro
abhinay at cs.utexas.edu
Fri Feb 23 18:05:13 PST 2007
I need to use two-dimensional (2D) arrays and for loops in one of my policy
scripts. Could someone please clarify the following questions for me.
1. I am thinking of implementing 2D arrays as table of tables. Is this the
best of doing this? Is "array" in C equivalent to "global array:
table[count] of table[count] of count" in Bro? Can I access an element of
this array as array[index1][index2]? Also, is there a short-hand notation of
initializing all the elements of the 2D array to 0?
2. The reference manual mentions that Bro lacks ways of controlling the
order in which it iterates over the indices in a for loop. I need to iterate
over a for loop in order. What is the best way of doing this?
Thanks and Regards,
More information about the Bro