Passing a Table to the policy engine
Charles John Wa
cjwa at umich.edu
Fri Apr 2 10:43:05 PST 2004
>
> There are two possibilities:
>
> - you can define a new type in bro.init and then access it:
>
> bro.init:
> type my_table_count_of_count: table[count] of count;
> *.cc:
> TableVal* myPath = new TableVal(internal_type("my_table_count_of_count")->AsTableType());
This works right out of the box! thanks!
charles
>
> - you instantiate a new BroType yourself:
>
> TypeList *myIndices = new TypeList(base_type(TYPE_COUNT));
> myIndices->Append(base_type(TYPE_COUNT));
> TableType* myType = new TableType(myIndices, base_type(TYPE_COUNT));
>
> TableVal* myPath = new TableVal(myType);
>
> (Both are completely untested which means that they probably won't
> work out-of-the-box :-)
>
> Robin
>
> --
> Robin Sommer * Room 01.08.055 * www.net.in.tum.de
> TU Munich * Phone (089) 289-18006 * sommer at in.tum.de
>
More information about the Bro
mailing list