Commit graph

140 commits

Author SHA1 Message Date
Seth Hall
a8893052ac Added some HTTP tests.
- Tests HTTP pipelining, MD5 summing and general HTTP handling.
- I checked over the baseline closely and it appears correct.
2011-06-15 13:29:04 -04:00
Seth Hall
844afba017 Added Apple Mail to the software parsing tests. 2011-06-14 13:40:29 -04:00
Seth Hall
00f4751ada Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-06-14 13:02:19 -04:00
Seth Hall
c6bf94f276 First commit of intelligence framework.
- Data insertion and querying works.
- A few tests are implemented to show usage scenarios.
2011-06-10 16:52:46 -04:00
Jon Siwek
b4d70a22db Fixed core.load-pkg test w/ diff canonifier instead 2011-06-10 15:07:32 -05:00
Jon Siwek
9e747a040d Revert "Fix core.load-pkg unit test."
This reverts commit 80558a994a.
2011-06-10 15:01:35 -05:00
Jon Siwek
cb89440593 Fix language.wrong-delete-field test by running through abs path canonifier 2011-06-10 14:56:49 -05:00
Jon Siwek
90196b4dc8 Fix bifs.unique_id-rnd test failing because of wc output formatting 2011-06-10 13:27:08 -05:00
Jon Siwek
13c90fc732 Fix core.conn-id test on some platforms.
The output of some versions of `wc` (e.g. MacOS) seems to indent
their output while others don't, causing the baseline diff to fail.
So pipe to sed to get rid of spaces before diffing.
2011-06-10 12:17:10 -05:00
Jon Siwek
80558a994a Fix core.load-pkg unit test.
Removed the test's diff against baseline output that contained absolute
paths so that it will work across systems.  Also don't redirect anything
to stderr so that failure information shows up in btest diagnostic output.
2011-06-10 11:53:51 -05:00
Seth Hall
57531e0769 Merge remote branch 'origin/master' into topic/policy-scripts-new
Conflicts:
	policy/bro.init
	policy/ssl.bro
2011-06-07 23:26:03 -04:00
Robin Sommer
8266709e20 A new bif unique_id(prefix) that returns a string that's unique across
Bro instaces with high probablity.

"prefix" is a string that will be prepended to the returned ID.
2011-06-07 17:57:22 -07:00
Seth Hall
fbf207deda Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-06-03 07:38:28 -04:00
Robin Sommer
a236dd0d3d Fixing typo in test. 2011-06-02 22:07:36 -07:00
Robin Sommer
fac328685b @load now supports loading a directory.
With a directory "foo" somewhere in BROPATH, "@load foo" now checks if
there's a file "foo/__load__.bro". If so, it reads that file in. (If
not, Bro reports the same error as before, complaining that it can't
read a directory).
2011-06-02 21:57:24 -07:00
Robin Sommer
5c0704eec8 ASCII logger now escapes non-printable characters.
Closes #450.
2011-06-01 22:33:44 -07:00
Jon Siwek
f0143c3c5f Merge branch 'master' into topic/policy-scripts-new 2011-05-18 11:44:45 -05:00
Jon Siwek
73a18714b3 Fix reST markup generated for record redefs.
They should have been using reST roles to xref the original record type
instead of a reST directive to declare a new type.
2011-05-17 15:27:45 -05:00
Jon Siwek
d69c3edf21 Fixes for more doc mode corner cases caused by type cloning.
"shallow" copying has to be done for any type that can contain
record types in order to accommodate record redefs that add fields.
2011-05-17 15:03:40 -05:00
Jon Siwek
e608aae0ba Merge remote-tracking branch 'origin/master' into topic/policy-scripts-new 2011-05-16 13:59:02 -05:00
Jon Siwek
70e14cb7d5 Fix CommentedTypeDecl to track whether it's in a record like TypeDecl does. 2011-05-12 19:55:26 -05:00
Jon Siwek
68784634ff Fixing doc tests in the btest suite.
- reduce number of docs generated by `make doc`; will add as they're reviewed

- Conforming to new Notice::Type enum for notices
2011-05-12 11:21:20 -05:00
Seth Hall
01499922ac Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-05-11 10:53:56 -04:00
Robin Sommer
da5618b9ba Portability fixes for tests on MacOS. 2011-05-10 21:27:44 -07:00
Robin Sommer
4bf6d6092b Sorting was still not consistent. 2011-05-10 19:48:40 -07:00
Robin Sommer
b16bb7fff4 Test updates.
Includes splitting up one test which's output now depends on wether
we've compiled with IPv6 support or not.
2011-05-10 19:33:37 -07:00
Robin Sommer
1b76b76bb0 Removing old istate test-suite. 2011-05-10 18:58:19 -07:00
Robin Sommer
63f7359e1e Bugfix: vectors in records were not initalized.
Closes #421.
2011-05-10 18:19:27 -07:00
Robin Sommer
61c929bc16 Updating btests and a Makefile.
"make" now runs all the tests.
2011-05-10 17:56:45 -07:00
Robin Sommer
03cd7a47ac Moving the test-scripts from the old test-suite over to btest. 2011-05-10 17:28:09 -07:00
Seth Hall
ebf75eb373 Found another software string that isn't parsed correctly.
I added it to the parse testing script but left it
commented out.
2011-05-10 15:09:14 -04:00
Robin Sommer
5cd6394916 Merge remote branch 'remotes/origin/topic/jsiwek/doc-framework'
* remotes/origin/topic/jsiwek/doc-framework:
  Adding example documentation for a script's use of logging features.
  Adding &log attribute to static attr_names array.
  Small typo fix.
  Bro doc mode now tracks record redefs that extend its field list.
  BroBifDoc was unneeded; now dead code, so removed.
  Bro doc mode now only does a "shallow" copy of declared record types
  Bro's doc mode now terminates after processing bro_init but before net_run
  Fixes related to `make doc` handling of script summary text (##! comments)
  Overhaul of "doc" build target for generating policy script documentation.
  Add parser error hint when in doc mode about checking ## comment syntax.
  Move stuff related to policy script documentation from doc/ to doc/scripts/
  Fixing example.bro's auto-reST generation baseline test.
2011-05-09 19:02:39 -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
Jon Siwek
80abad01a9 Adding example documentation for a script's use of logging features. 2011-05-06 19:23:15 -05:00
Jon Siwek
34c475d4db Small typo fix. 2011-05-06 18:24:38 -05:00
Jon Siwek
cf0a542f7c Bro doc mode now tracks record redefs that extend its field list. 2011-05-05 10:43:15 -05:00
Jon Siwek
6d867cf999 Bro doc mode now only does a "shallow" copy of declared record types
This is necessary so that the cloned type will be able to see additions
to the original type's list of fields
2011-05-04 21:53:51 -05:00
Jon Siwek
481a1d097b Merge branch 'master' into topic/jsiwek/doc-framework 2011-05-04 19:38:03 -05:00
Don Appleman
7dfb9e1c7e Move loading of tcp.bro from command line to script body 2011-05-03 13:49:03 -05:00
Seth Hall
0a0dbcc44e Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-05-02 22:25:54 -04:00
Robin Sommer
4aa844aa87 Switching vectors from being 1-based to 0-based.
This is obviously a change that break backwards-compatibility. I hope
I caught all cases where vectors are used ...

I've completely removed the VECTOR_MIN constant. Turns out that was
already not working: some code pieces were nevertheless hard-coding
the 1-based indexing ...
2011-05-02 17:10:18 -07:00
Jon Siwek
7490095e42 Merge branch 'master' into topic/jsiwek/doc-framework 2011-05-02 15:50:21 -05:00
Robin Sommer
90302a8834 Adding istate tests to default btest configuration. 2011-05-02 11:28:40 -07:00
Jon Siwek
54e9946fc7 Merge branch 'master' into topic/jsiwek/doc-framework 2011-05-02 12:23:56 -05:00
Robin Sommer
5478bd5b1d Updating tests.
The istate tests now all pass except for the SSL one. Still need to
figure out why it fails.
2011-05-02 08:43:39 -07:00
Seth Hall
12820563a1 Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-04-29 21:39:23 -04:00
Robin Sommer
9ddc26328d Support for (mixed) MPLS and VLAN traffic, and a new default BPF
filter. (Seth Hall and Robin Sommer)

- Merging in the patch from #264, which provides support for mixed
  VLAN and MPLS traffic.

- Changing Bro's default filter from being built dynamically to being
  a static "ip or not ip". To get the old behaviour back (i.e., the
  dynamically built filter), redef "all_packets" to false.

- print-filter.bro now always prints the filter that Bro is actually
  using, even if overriden from the command line.
2011-04-29 09:10:43 -07:00
Don Appleman
d5bfc6f5bd Added "policy" subdirectory to list of TestDirs 2011-04-27 12:53:40 -05:00
Jon Siwek
f10d2e10ea Overhaul of "doc" build target for generating policy script documentation.
It's now all implemented in CMake scripting.

The generation of reST docs is now a distinct target, "restdoc", while
the target to generate HTML docs, "doc", depends on "restdoc".  reST doc
generation supports incremental builds (documentation for a given policy
script is only regenerated when it is out of date), but HTML doc generation
via ``make doc`` is not incremental (Sphinx always starts with fresh input).

Building the "restdoc" target is now covered by a btest to ensure all
policy scripts are parse-able when Bro is in "doc mode".

Generated reST docs should now support "@load"ing from subdirectories.  e.g.
"@load foo/baz" and "@load bar/baz" will now generate the right xref links.
2011-04-26 22:13:04 -05:00
Jon Siwek
9875c2ba9c Merge branch 'master' into topic/jsiwek/doc-framework 2011-04-26 10:27:06 -05:00