int var;
var = opt_internal_int("var");
--------------------------------------
Now if i change var in the any of the .cc files does the change reflect at
the policy level ?
No, it doesn't. (This is implicitly apparent from the type signature
of opt_internal_int() - it returns an int, not an int&, so there's no
way for an assignment to the C++ variable "var" to affect any other value.
**Otherwise is there a way to share a variable between the .cc files and
the policy scripts ?? **
There is no simple mechanism to reflect changes to a C++ variable into
a Bro policy script variable. To do so, you have to locate the corresponding
Bro variable and invoke the Assign() method on it.
Vern