[Bro-Dev] #679: Add support for deleting vector elements

Bro Tracker bro at tracker.bro-ids.org
Thu Nov 17 15:05:28 PST 2011


#679: Add support for deleting vector elements
-----------------------+------------------------
  Reporter:  matthias  |      Owner:
      Type:  Problem   |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  Bro       |    Version:  git/master
Resolution:            |   Keywords:  language
-----------------------+------------------------

Comment (by matthias):

 Replying to [comment:5 gregor]:
 > What happens if you access v[2]??

 You mean this?

 {{{
 global v: vector of string;

 event bro_init()
 {
     local a = v[2];
     v[3] = "bar-baz";
     local b = v[2];

     print "-------------------";
     print a;
     print "-------------------";
     print b;
     print "-------------------";
 }
 }}}
 It prints:
 {{{
 -------------------
 anonymous-function
 {
 if (Notice::ACTION_DROP in Notice::n$actions)
 ;

 }
 -------------------
 22/tcp
 -------------------
 }}}

 > Maybe the goal for 2.1 should be to do a complete overhaul/redesign of
 list / vector functionality in Bro. I.e., lets discuss what functionality
 makes sense and then implement that. IIRC, the current functionality is
 inconsistent and partially broken. And I think vectors are hardly used, so
 it shouldn't be too painful to adapt script level code.

 I would really like to see that, but as Robin mentions, maybe at some
 future point in time.

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/679#comment:7>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list