Hi
I am new to bro but really interested working in bro. I have already started the work. I am encountering a problem now.
It is about records. Let me explain wid the help of example:
type con: record
{
orig_h: addr;
orig_p: port;
resp_h: addr;
resp_p: port;
};
No, this assignment doesn't work because the two records have
different types; that's not defined. Bro shouldn't crash however but
better report an error at parse time. Could you file a bug report
with the Bro tracker for that? Thanks.
documentation of bro , they have said this is absolutely right. Please
That surprises me. Can you point to the location where the docs say
such an assignment is ok?
Thanks for your help. I have got my mistake and what I wanted to do is done but now I come to you point that
local id: con;
local id2: con2;
id2 = id;
is not right but it is “WORKING”. Actaully read the following line is documentaion in reference manual under Record Assignment:
In order to produce a deep copy, use the clone operator copy(). For more details, see Expressions.
You can also assign to a record another record that has fields with the same names and types, even if they come in a different order.
So I have noticed that even if record types are different but the filed names and types inside these records are same then also we can assign them to each other.