I have attached the files:<br><br>config.txt: the file to be read<br><br>config.bro: the file that reads in info from config.txt (plz change &lt;config_filename&gt; to reflect the path where config.txt is located on your machine)<br>
<br>test.bro: the file that makes use of the config info in Config::table_config. (I didn&#39;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.<br>
<br>Thanks.<br><br><div class="gmail_quote">On Tue, Oct 2, 2012 at 1:42 AM, Bro Tracker <span dir="ltr">&lt;<a href="mailto:bro@tracker.bro-ids.org" target="_blank">bro@tracker.bro-ids.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">#884: Scripting inconsistency in the input framework<br>
</div><div class="im">---------------------------+------------------------<br>
  Reporter:  sheharbano.k  |      Owner:  amannb<br>
      Type:  Problem       |     Status:  accepted<br>
</div><div class="im">  Priority:  Normal        |  Milestone:  Bro2.2<br>
 Component:  Bro           |    Version:  git/master<br>
</div>Resolution:                |   Keywords:<br>
---------------------------+------------------------<br>
<br>
Comment (by amannb):<br>
<br>
 Sorry, I was not entirely able to reproduce this problem.<br>
<br>
 If a table is read using the input framework and you use your type (IdxIp)<br>
 as the index type, the resulting table is of type<br>
<br>
 {{{<br>
 global tb_ip: table[addr] of count;<br>
 }}}<br>
<br>
 and not of type<br>
<br>
 {{{<br>
<div class="im"> global tb_ip: table[IdxIp] of count;<br>
 }}}<br>
<br>
</div> The index record is just there to give the input framework the information<br>
 about the names of the fields that are present in the input file -- the<br>
 bro table that is constructed will use an IndexType that contains<br>
 everything that was contained in the record in the same order.<br>
<br>
 Thus if you have a record like<br>
<br>
 {{{<br>
 type testrecord: record {<br>
    a: addr;<br>
    b: count;<br>
    c: string;<br>
 }<br>
 }}}<br>
<br>
 the resulting table will be of type<br>
<br>
 {{{<br>
  table test [addr, count, string] of count;<br>
 }}}<br>
<br>
 and not of type<br>
<br>
 {{{<br>
  table test[testrecord] of count;<br>
 }}}<br>
<br>
 However you should not even have been able to load the data into a table<br>
 with the wrong type -- the input framework should refuse loading data in a<br>
 table with nonmatching index types. And this seemed to work in my tests.<br>
<br>
 So could you perhaps send me the exact scripts that you are using (or<br>
 attach them here)? Perhaps something else is going on that I am not<br>
 thinking of at the moment.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Ticket URL: &lt;<a href="http://tracker.bro-ids.org/bro/ticket/884#comment:2" target="_blank">http://tracker.bro-ids.org/bro/ticket/884#comment:2</a>&gt;<br>
</font></span><div class="HOEnZb"><div class="h5">Bro Tracker &lt;<a href="http://tracker.bro-ids.org/bro" target="_blank">http://tracker.bro-ids.org/bro</a>&gt;<br>
Bro Issue Tracker<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sheharbano Khattak<br><br><a href="http://etheryell.com" target="_blank">http://etheryell.com</a><br><br><img src="http://etheryell.com/etheryell_sig.jpg" height="49" width="200"><br>
<br>