[Bro-Dev] #884: Scripting inconsistency in the input framework
Bro Tracker
bro at tracker.bro-ids.org
Mon Oct 1 14:05:49 PDT 2012
#884: Scripting inconsistency in the input framework
---------------------------+------------------------
Reporter: sheharbano.k | Owner: amannb
Type: Problem | Status: accepted
Priority: Normal | Milestone: Bro2.2
Component: Bro | Version: git/master
Resolution: | Keywords:
---------------------------+------------------------
Comment (by sheharbano.k):
None
Filename config.txt could not be saved, problem: [Errno 13] Permission
denied: '/da/trac/projects/bro/attachments/ticket/884'
Filename config.bro could not be saved, problem: [Errno 13] Permission
denied: '/da/trac/projects/bro/attachments/ticket/884'
Filename test.bro could not be saved, problem: [Errno 13] Permission
denied: '/da/trac/projects/bro/attachments/ticket/884'\I have attached the
files:
config.txt: the file to be read
config.bro: the file that reads in info from config.txt (plz change
<config_filename> to reflect the path where config.txt is located on your
machine)
test.bro: the file that makes use of the config info in
Config::table_config. (I didn't test this one). Try applying different
functions to_* in bro.bif to the values in Config::table_config and see
what happens. For me, it generated error.
Thanks.
On Tue, Oct 2, 2012 at 1:42 AM, Bro Tracker <bro at tracker.bro-ids.org>
wrote:
> #884: Scripting inconsistency in the input framework
> ---------------------------+------------------------
> Reporter: sheharbano.k | Owner: amannb
> Type: Problem | Status: accepted
> Priority: Normal | Milestone: Bro2.2
> Component: Bro | Version: git/master
> Resolution: | Keywords:
> ---------------------------+------------------------
>
> Comment (by amannb):
>
> Sorry, I was not entirely able to reproduce this problem.
>
> If a table is read using the input framework and you use your type
(IdxIp)
> as the index type, the resulting table is of type
>
> {{{
> global tb_ip: table[addr] of count;
> }}}
>
> and not of type
>
> {{{
> global tb_ip: table[IdxIp] of count;
> }}}
>
> The index record is just there to give the input framework the
information
> about the names of the fields that are present in the input file -- the
> bro table that is constructed will use an IndexType that contains
> everything that was contained in the record in the same order.
>
> Thus if you have a record like
>
> {{{
> type testrecord: record {
> a: addr;
> b: count;
> c: string;
> }
> }}}
>
> the resulting table will be of type
>
> {{{
> table test [addr, count, string] of count;
> }}}
>
> and not of type
>
> {{{
> table test[testrecord] of count;
> }}}
>
> However you should not even have been able to load the data into a
table
> with the wrong type -- the input framework should refuse loading data
in a
> table with nonmatching index types. And this seemed to work in my
tests.
>
> So could you perhaps send me the exact scripts that you are using (or
> attach them here)? Perhaps something else is going on that I am not
> thinking of at the moment.
>
> --
> Ticket URL: <http://tracker.bro-ids.org/bro/ticket/884#comment:2>
> Bro Tracker <http://tracker.bro-ids.org/bro>
> Bro Issue Tracker
>
[attachment:"config.txt"]
[attachment:"config.bro"]
[attachment:"test.bro"]
--
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/884#comment:4>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list