Commit graph

102 commits

Author SHA1 Message Date
Robin Sommer
cdd8827cc4 Adding a script that extracts a connection from a trace based on uid.
The script parsed conn.log to find the 4-tuple and then runs tcpdump
to find the relevant packets.
2011-07-07 19:56:48 -07:00
Robin Sommer
df1b2f922b Renaming reporter_message to report_info.
Same change internally.
2011-07-07 19:56:25 -07:00
Robin Sommer
c8f5a1eeaa Updating submodule(s). 2011-07-05 18:48:55 -07:00
Robin Sommer
3340bc0f26 Updating submodule(s). 2011-07-01 22:20:34 -07:00
Robin Sommer
ed727aeaad Updating submodule(s). 2011-07-01 22:05:01 -07:00
Robin Sommer
c21d75489f Updating submodule(s). 2011-07-01 22:03:31 -07:00
Robin Sommer
c1a3cc0e5a Updating submodule(s). 2011-07-01 22:02:17 -07:00
Robin Sommer
bbb57329fd Updating submodule(s). 2011-07-01 22:00:54 -07:00
Robin Sommer
cea00fe51b Missing pieces. 2011-07-01 21:59:25 -07:00
Robin Sommer
9709b1d522 Merge remote branch 'origin/topic/robin/reporting'
* origin/topic/robin/reporting:
  Syslog BiF now goes through the reporter as well.
  Avoiding infinite loops when an error message handlers triggers errors itself.
  Renaming the Logger to Reporter.
  Overhauling the internal reporting of messages to the user.

Updating a bunch of tests/baselines as well.

Conflicts:
	aux/broccoli
	policy.old/alarm.bro
	policy/all.bro
	policy/bro.init
	policy/frameworks/notice/weird.bro
	policy/notice.bro
	src/SSL-binpac.cc
	src/bro.bif
	src/main.cc
2011-07-01 13:59:21 -07:00
Robin Sommer
704cc45165 Updating submodule(s). 2011-06-25 18:22:45 -07:00
Robin Sommer
93894eed9b Overhauling the internal reporting of messages to the user.
The Logger class is now in charge of reporting all errors, warnings,
informational messages, weirds, and syslogs. All other components
route their messages through the global bro_logger singleton.

The Logger class comes with these reporting methods:

    void Message(const char* fmt, ...);
    void Warning(const char* fmt, ...);
    void Error(const char* fmt, ...);
    void FatalError(const char* fmt, ...); // Terminate Bro.
    void Weird(const char* name);
    [ .. some more Weird() variants ... ]
    void Syslog(const char* fmt, ...);
    void InternalWarning(const char* fmt, ...);
    void InternalError(const char* fmt, ...); // Terminates Bro.

See Logger.h for more information on these.

Generally, the reporting now works as follows:

    - All non-fatal message are reported in one of two ways:

        (1) At startup (i.e., before we start processing packets),
            they are logged to stderr.

        (2) During processing, they turn into events:

            event log_message%(msg: string, location: string%);
            event log_warning%(msg: string, location: string%);
            event log_error%(msg: string, location: string%);

            The script level can then handle them as desired.

            If we don't have an event handler, we fall back to
            reporting on stderr.

    - All fatal errors are logged to stderr and Bro terminates
      immediately.

    - Syslog(msg) directly syslogs, but doesn't do anything else.

The three main types of messages can also be generated on the
scripting layer via new Log::* bifs:

    Log::error(msg: string);
    Log::warning(msg: string);
    Log::message(msg: string);

These pass through the bro_logger as well and thus are handled in the
same way. Their output includes location information.

More changes:

    - Removed the alarm statement and the alarm_hook event.

    - Adapted lots of locations to use the bro_logger, including some
      of the messages that were previously either just written to
      stdout, or even funneled through the alarm mechanism.

    - No distinction anymore between Error() and RunTime(). There's
      now only one class of errors; the line was quite blurred already
      anyway.

    - util.h: all the error()/warn()/message()/run_time()/pinpoint()
      functions are gone. Use the bro_logger instead now.

    - Script errors are formatted a bit differently due to the
      changes. What I've seen so far looks ok to me, but let me know
      if there's something odd.

Notes:

    - The default handlers for the new log_* events are just dummy
      implementations for now since we need to integrate all this into
      the new scripts anyway.

    - I'm not too happy with the names of the Logger class and its
      instance bro_logger. We now have a LogMgr as well, which makes
      this all a bit confusing. But I didn't have a good idea for
      better names so I stuck with them for now.

      Perhaps we should merge Logger and LogMgr?
2011-06-25 16:40:54 -07:00
Robin Sommer
e00e29273a Updating submodule(s). 2011-06-14 21:16:01 -07:00
Robin Sommer
09083b8992 Updating submodule(s). 2011-06-01 11:35:37 -07:00
Robin Sommer
a3b527be4b Updating submodule(s). 2011-06-01 11:30:59 -07:00
Robin Sommer
e0c05868e3 Updating submodule(s). 2011-05-18 09:08:59 -07:00
Jon Siwek
f18951a77e Changes to allow DEB packaging via CPack, addresses #458 2011-05-16 13:51:32 -05:00
Robin Sommer
437ac29ca9 Updating submodule(s). 2011-05-13 17:40:12 -07:00
Robin Sommer
33f1e00264 Updating submodule(s). 2011-05-10 20:57:45 -07:00
Robin Sommer
42a1efa77f Updating submodule(s). 2011-05-10 18:30:05 -07:00
Robin Sommer
ee872c12c8 New bif bro_has_ipv6() to check whether IPv6 support is compiled in. 2011-05-10 18:02:10 -07:00
Robin Sommer
bd9855a380 Merge of Gregor's conn-size branch.
If 'use_conn_size_analyzer' is true, the event engine tracks number of
packets and raw IP bytes per connection. If report_conn_size_analyzer
is true, these values are included as four new columns into conn.log

I changed conn.bro so that the value of report_conn_size_analyzer
follows that of use_conn_size_analyzer. For the new conn.log, we
probably want to get rid of report_conn_size_analyzer anyway.
2011-05-09 17:14:31 -07:00
Robin Sommer
cde6076857 Updating submodule(s). 2011-05-05 21:06:29 -07:00
Robin Sommer
f564023a12 Updating submodule(s). 2011-05-02 11:29:07 -07:00
Robin Sommer
80376653c2 Updating submodule(s). 2011-04-26 21:30:37 -07:00
Robin Sommer
dbecbccdbc Updating submodule(s). 2011-04-21 19:59:49 -07:00
Robin Sommer
f945bd5b7f Updating submodule(s). 2011-04-20 21:33:38 -07:00
Robin Sommer
2bc5e69961 Updating submodule(s). 2011-04-19 15:55:33 -07:00
Robin Sommer
b59a2127db Updating submodule(s). 2011-04-18 12:51:11 -07:00
Robin Sommer
f090764ac6 Merge remote branch 'origin/topic/jsiwek/CMake-IDE-tweaks'
* origin/topic/jsiwek/CMake-IDE-tweaks:
  Adding files to CMake build targets so they show up in generated IDE projects.

Conflicts:
	aux/binpac
2011-04-18 12:50:15 -07:00
Robin Sommer
f72ec9a39b Updating submodule(s). 2011-04-17 20:29:04 -07:00
Robin Sommer
65016dc5e8 Updating istate tests.
Some still don't pass:

    - events-ssl doesn't work; not clear yet why, there may be some
      problem with SSL connections.

    - broccoli needs the changes topic/jsiwek/64bit-val-fix, plus
    adaption of the protocol version.

    - pybroccoli crashes even with the 64bit-val-fix changes. Reason
      unclear.
2011-04-17 19:53:56 -07:00
Jon Siwek
7d2938dac6 Adding files to CMake build targets so they show up in generated IDE projects.
This includes flex/bison/binpac/bifcl input files as well as C/C++ header
files.  Header files for the bro target are determined dynamically at
configure time from a given list of source files.

This addresses #413.
2011-04-12 12:01:04 -05:00
Robin Sommer
68a30a0b5a Updating submodule(s). 2011-04-01 16:29:15 -07:00
Robin Sommer
a3a075174b Merging in 'topic/robin/cleanup-rewriter'.
Removing everything related to trace rewriting.

(I wasn't too careful in ensuring that I catch everything in the
scripts; Seth is working on those anyway.)

(Merging by cherry-picking the corresponding commit, as the branch was
accidentally made off of the logging stuff).
2011-04-01 15:23:50 -07:00
Robin Sommer
1e54dfba34 Updating submodule(s). 2011-03-29 21:53:53 -07:00
Robin Sommer
871eff9f90 Updating submodule(s). 2011-03-21 16:35:22 -07:00
Robin Sommer
c92154994a Updating submodule(s). 2011-03-14 17:42:32 -07:00
Robin Sommer
88b41b6320 Merge remote branch 'origin/topic/jsiwek/cmake-compiler-check'
* origin/topic/jsiwek/cmake-compiler-check:
  Add explicit CMake check for compiler

Conflicts:
	aux/broccoli
	aux/broctl
2011-03-14 17:42:25 -07:00
Robin Sommer
b68d50d717 Updating submodule(s). 2011-03-11 18:41:45 -08:00
Jon Siwek
9282e0adff Add explicit CMake check for compiler 2011-03-09 11:48:00 -06:00
Robin Sommer
e5d3654266 Updating submodule(s). 2011-02-28 15:39:24 -08:00
Gregor Maier
c54c1e0dce Revert "Updating submodule to current master"
This reverts commit 8b42bfed7c.
Master seems to have outdated submodules. Reverting to previous ones on
fastpath.
2011-02-25 21:11:06 -08:00
Gregor Maier
8b42bfed7c Updating submodule to current master 2011-02-25 20:43:53 -08:00
Robin Sommer
888719e922 Adding new aux/btest submodule. 2011-02-08 14:28:15 -08:00
Robin Sommer
0d9de7d719 Updating submodule(s). 2011-02-07 14:07:29 -08:00
Robin Sommer
ee6abcba72 Updating submodule(s). 2011-02-03 21:57:11 -08:00
Robin Sommer
88b31a04d0 Updating submodule(s). 2011-01-31 15:36:01 -08:00
Robin Sommer
7432761558 Updating submodule(s). 2011-01-31 08:48:41 -08:00
Robin Sommer
7de348da11 Merge remote branch 'origin/topic/jsiwek/missing-config-options'
* origin/topic/jsiwek/missing-config-options:
  Adding more configure options for finding dependencies

Conflicts:
	aux/binpac
2011-01-31 08:48:12 -08:00