[Bro-Dev] #800: Change Broccoli BroAddr type to a single 16 byte array

Bro Tracker bro at tracker.bro-ids.org
Wed Mar 21 11:23:09 PDT 2012


#800: Change Broccoli BroAddr type to a single 16 byte array
-----------------------------+------------------------
 Reporter:  matthias         |      Owner:
     Type:  Feature Request  |     Status:  new
 Priority:  Normal           |  Milestone:  Bro2.1
Component:  Broccoli         |    Version:  git/master
 Keywords:                   |
-----------------------------+------------------------
 Broccoli currently uses an extra size field to distinguish IPv4 and IPv6
 addresses:
 {{{
    typedef struct bro_addr {
      uint32      addr[4];   /**< IP address in network byte order */
      int         size;      /**< Number of 4-byte words occupied in addr
 */
    } BroAddr;
 }}}

 Since there exists a standard mapping for IPv4 in IPv6 addresses, we can
 get rid of the extra size field.

 To facilitate the distinction between IPv4 and IPv6, we could provide a
 boolean function that tests the first 12 bytes against the mapped prefix.

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/800>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list