Hello again,<br><br>Sorry for the previous email fragment, apparently there is a hot-key in GMail that automagically sends the message. What I meant to say was....<br><br>I'm trying to use a table of sets in my policy, and can't figure out
how to statically define values. The manual covers use of the add()
function, but I would need to define them just as a redef in my startup policy. The objective here is a hash table of strings with chaining. I define the table as <br><br>global table_of_sets: table[string] of set[string]<br>
<br>after the similar definition in scan.bro of <br><br>global distinct_peers: table[addr] of set[addr]<br><br>Then I try to redef the table and add values:<br><br>
redef SMITH::table_of_sets = {<br>
[ "a" ] = { "alpha", "anchor", "armor" },<br>
[ "b" ] = { "bravo", "biscuit", "blue" },<br>
};<br>
<br>
This gives me<br>
<br>
smith.bro, line 149: error: syntax error, at or near "{"<br><br>Just to see what would happen I changed the curly brackets to square brackets, and that changes to error to<br><br>
smith.bro, line 150 (alpha, anchor, armor): bad tag in Val::CONVERTER (types/table)<br>
<br>I can't seem to find this being done anywhere else the existing policies, it is always done through the add() function, but I can't imagine that it is not possible. Is there an explanation in the reference manual and I am just missing it?<br>
<br>Thanks,<br>Stephen<br><br><br>