[Bro-Dev] Bro internal integers types. Use stdint.h

Gregor Maier gregor at icir.org
Fri Nov 5 18:26:50 PDT 2010


Hi,

Currently Bro defines it's own integer types (uint32, uint64,
bro_int_t, etc.) with the help of ifdefs and autoconf. Furthermore, Bro
uses ifdef to decide which printf format to use for formatting 32 and 64
bit integers.

As part of the planned event engine cleanup, I suggest that we
  a) make sure that everything that can potentially overflow (counters)
     are 64 bit wide (in addition to enabling --enable-int64)
  b) use the standard type uint64_t, int32_t, etc. from inttypes.h (*)
  c) use the PRI* macros for *printf formatting (also from inttypes.h)

(*) inttypes.h is part of both, C99 and POSIX. See
http://www.opengroup.org/onlinepubs/000095399/basedefs/inttypes.h.html

Comments?

cu
Gregor
-- 
Gregor Maier                                             gregor at icir.org
Int. Computer Science Institute (ICSI)          gregor at icsi.berkeley.edu
1947 Center St., Ste. 600                    http://www.icir.org/gregor/
Berkeley, CA 94704
USA



More information about the bro-dev mailing list