A doubt regarding RecordVal

Vern Paxson vern at aciri.org
Thu Oct 25 00:12:31 PDT 2001


> when we say:
> conn_val = new RecordVal(connection_type);
> 
> How many fields are there in the created record ?

8, since that's how many are defined for the corresponding type in bro.init.

> Now after that when we say...
> conn_val->Assign(12, new StringVal(tm_string)); or
> conn_val->Assign(13, new StringVal(tm_string));

I don't know where you got those lines, but they won't work if you execute
them (follow the code executed by RecordVal::Assign).

> Is the size of the record increased dynamically depending on how many
> Assigns we make ?

No.  You have to manually make sure that your assignments to the record
value in the event engine are consistent with the number of fields *and their
types* as defined in bro.init.

		Vern



More information about the Bro mailing list