Commit graph

3113 commits

Author SHA1 Message Date
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
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
Seth Hall
6621a3001a Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-04-26 11:18:58 -04:00
Seth Hall
f6e67a6a87 More script updates. 2011-04-26 11:08:04 -04:00
Robin Sommer
5662fe7358 Updating baselines. 2011-04-23 10:47:14 -07:00
Robin Sommer
c41da9ca99 Fixing bug with deleting still unset record fields of table type. 2011-04-23 10:40:07 -07:00
Seth Hall
adec99751d More script updates. 2011-04-23 02:58:44 -04:00
Robin Sommer
59d6202104 Merge remote branch 'origin/topic/robin/conn-ids'
* origin/topic/robin/conn-ids:
  Moving uid from conn_id to connection, and making output determistic if a hash seed is given.
  Extending conn_id with a globally unique identifiers.
2011-04-22 22:13:44 -07:00
Seth Hall
0a151882ae New software parsing tests and all pass now. 2011-04-22 23:39:19 -04:00
Seth Hall
0d870d203d Merge remote branch 'origin/master' into topic/policy-scripts-new 2011-04-22 22:22:08 -04:00
Robin Sommer
46b1fd9850 Delete operator for record fields.
"delete x$y" now resets record field "x" back to its original state if
it is either &optional or has a &default. "delete" may not be used
with non-optional/default fields.
2011-04-22 18:40:14 -07:00
Robin Sommer
964060c32f Fixing bug with nested record coercions. 2011-04-22 18:07:29 -07:00
Seth Hall
c5a19f7cdc Fixed another do_split bug and included a test for the fix. 2011-04-22 08:00:28 -04:00
Robin Sommer
c80cd26e17 Merge remote branch 'origin/topic/seth/decode-nbns-names'
* origin/topic/seth/decode-nbns-names:
  Updates and tests for netbios name BiF.
2011-04-21 19:49:24 -07:00
Robin Sommer
9fe52512eb Merge remote branch 'origin/topic/seth/fix-do_split'
* origin/topic/seth/fix-do_split:
  Fixed the do_split bug and added a test.
2011-04-21 19:42:50 -07:00
Robin Sommer
da0ea67453 Fixing btests.
- When Bro is given a PRNG seed, it now uses its own internal random
  number generator that produces consistent results across sytems.
  Note that this internal generator isn't very good, so it should only
  be used for testing purposes.

- The BTest configuration now sets the environemnt variables TZ=UTC
  and LANG=C to ensure consistent results.

- Fixing doc markup in logging.bro.

- Updating baselines.
2011-04-21 19:31:44 -07:00
Seth Hall
8b363e934a More updates to software logging and more tests. 2011-04-21 14:25:52 -04:00
Jon Siwek
4373565373 Merge branch 'master' into topic/jsiwek/doc-framework 2011-04-21 11:09:58 -05:00
Seth Hall
6275bc555d Merge remote branch 'origin/master' into topic/policy-scripts-new
Conflicts:
	policy/conn.bro
2011-04-21 01:16:08 -04:00
Robin Sommer
13a492091f Merge remote branch 'origin/topic/robin/logging-internals'
Includes some additional cleanup.
2011-04-20 21:30:41 -07:00
Seth Hall
5a868eefda More extensive base script updating.
* This is basically another checkpoint, but the difference
  is that in this one all.bro loads just about all of the
  new scripts and functionality.
2011-04-20 23:14:54 -04:00
Jon Siwek
4634d92394 Move stuff related to policy script documentation from doc/ to doc/scripts/ 2011-04-20 21:11:32 -05:00
Jon Siwek
c472931eb9 Fixing example.bro's auto-reST generation baseline test.
Adds a diff canonifier that skips diffing the places where example.bro
may use MutableVal derivatives (e.g. sets/tables), which don't always
generate the same ordering in the reST docs across runs.
2011-04-20 20:09:33 -05:00