Commit graph

603 commits

Author SHA1 Message Date
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
Robin Sommer
c132506203 Merge branch 'topic/robin/record-table-default' into topic/robin/logging-internals
Includes additional fixes for the &default attribute's type checking.
2011-04-17 12:03:58 -07:00
Robin Sommer
09d37b2026 Fixing logging filter "include" and "exclude" options. 2011-04-17 11:14:07 -07:00
Robin Sommer
58f86ae55d Fixing bug with records sometimes unnecessarily coerced on assignment. 2011-04-17 10:42:51 -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
Jon Siwek
c732cef69b Fix unnecessary config.h preprocessor (re)definitions.
The CMake-generated config.h would redundantly define some types to
themselves, causing lots of warning in some cases (e.g. Xcode build).

This addresses #414
2011-04-11 16:59:07 -05:00
Jon Siwek
515b96685a Fix generated docs displaying "func" for events in identifier summary table. 2011-04-11 10:32:07 -05:00
Jon Siwek
0a14cd11f6 Move generated script doc for "private interface" to bottom of page. 2011-04-11 10:29:41 -05:00
Jon Siwek
552a70c563 Make doc build target depend on doc-clean to prevent accumulation of junk
Sphinx was adding a new .bro script in the HTML output directory regardless
of whether the source script differed.
2011-04-08 14:26:51 -05:00
Jon Siwek
057ad684d8 Add brief descriptions for classes involved in generation of script docs. 2011-04-08 12:30:06 -05:00
Jon Siwek
af54714839 Add tests for auto-generating reST from bro scripts. 2011-04-08 12:02:03 -05:00
Jon Siwek
3ad5f0559d Remove empty private interface sections from generated script docs. 2011-04-08 10:16:44 -05:00
Jon Siwek
7d261dcb55 Merge branch 'master' into topic/jsiwek/doc-framework
Conflicts:
	src/main.cc
2011-04-07 16:44:29 -05:00
Jon Siwek
c81b83475a Fix table/set type naming in summary table of generated script docs 2011-04-07 16:19:09 -05:00
Jon Siwek
cb68371006 Generated bro docs now track non-enum redefs.
But currently only as cross-referencing links.  Tracking exactly how redefs
modify values would require more work.
2011-04-07 16:11:35 -05:00
Jon Siwek
a7d8d9e1d6 Modifying bifcl to pass "##" comments into the .bro file being generated.
This will allow .bif files to be documented in the same manner as regular
bro scripts.
2011-04-07 13:02:09 -05:00
Jon Siwek
35fdba23ea Fix wrong delete syntax in CommentedEnumType 2011-04-07 12:34:57 -05:00
Jon Siwek
b8f6c5bc7d Improving documention for the Bro script document-generation process
Some minor organizational revisions to the python scripting.
2011-04-06 16:39:50 -05:00
Jon Siwek
f3b1a6bb9e Implementing capability to logically group generated policy script docs 2011-04-06 14:38:35 -05:00
Jon Siwek
e4e7a26ba1 Add :download: role to reST docs for linking to original script source files.
This role allows Sphinx to copy non-reST files in the source tree into
the output tree.
2011-04-06 12:12:21 -05:00
Jon Siwek
7593d4d368 Don't warn about generating reST script documentation for stdin 2011-04-06 12:08:23 -05:00
Jon Siwek
5183ab409b Initial implementation of a make doc target to generate script docs. 2011-04-06 12:06:39 -05:00
Robin Sommer
5629359a87 Test commit. 2011-04-05 16:28:55 -07:00
Robin Sommer
0257bd304e Adding language directory to btest.cfg. 2011-04-05 16:23:49 -07:00
Robin Sommer
9a12443f76 Merge branch 'master' into topic/robin/record-table-default 2011-04-05 16:23:07 -07:00
Robin Sommer
050680aa63 Adding new environment variable BRO_SEED_FILE to set the seed file for
the random number generator.

This works like the corresponding command line option but is more
convinient when writing tests as it can be set in btest.cfg.
2011-04-05 16:21:43 -07:00
Robin Sommer
0a97a9e82a Fixing attributes to allow &default in tables/sets to be associated
with the field.

This works now:

    type X: record {
        a: table[string] of bool &default=table( ["foo"] = T );
        b: table[string] of bool &default=table();
        c: set[string] &default=set("A", "B", "C");
        d: set[string] &default=set();
    };

I think previously the intend was to associate &default with the
table/set (i.e., define the default value for non-existing indices).
However, that was already not working: the error checking was
reporting type mismatches. So, this shouldn't break anything and make
things more consistent.
2011-04-05 16:20:27 -07:00
Jon Siwek
bd523f2905 Automatic reST doc markup for event/function params/return comments
For a bro script that is documented like:

  ## ...
  ## bar: ...
  ## Returns: ...
  global foo(bar: string): string;

the generated reST documentation will automatically substitute meaningful
markup (reST field lists) for the parameter and return type comments
2011-04-04 12:29:48 -05:00
Robin Sommer
68a30a0b5a Updating submodule(s). 2011-04-01 16:29:15 -07:00
Robin Sommer
03c0d587a4 Removing code for unused hash functions. 2011-04-01 16:09:28 -07:00
Robin Sommer
4677174aa4 Merge remote branch 'origin/topic/robin/comm-ssl'
The merge does not include the hack to switch back to 32-bit for
Broccoli. It does contain a version of the SSL tests converted to
btest, which however doesn't pass yet (as some of the others as well)

* origin/topic/robin/comm-ssl:
  Fixing crashes when SSL is not configured correctly.
  Adding a test for SSL-based communciation to the istate testsuite.
2011-04-01 15:57:07 -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
ec1b2b4d2a Merge branch 'topic/robin/cleanup-dfa-cache'
* topic/robin/cleanup-dfa-cache:
  Removing the EXPIRE_DFA_STATES code.
2011-04-01 14:52:27 -07:00
Robin Sommer
3a5384907f Merge branch 'topic/robin/cleanup-active-mapping'
* topic/robin/cleanup-active-mapping:
  Removing active mapping.
2011-04-01 14:42:22 -07:00
Jon Siwek
758172120b Revising format of initialization values in generated script docs.
Fixed the obvious things: reduced the space taken up by empty tables
and allowed record values to span multiple lines (one for each record field).
2011-04-01 15:21:15 -05:00
Jon Siwek
2d17ca0942 Generated script docs now have a new summary section.
It's a table listing all the identifiers in the script's public interface
and an optional, brief (one-sentence) description of each.
2011-04-01 12:30:22 -05:00
Jon Siwek
cf45ae19e1 Generated script docs can now link to the original source.
The original bro source file needs to be copied to the same directory
that Sphinx outputs the rendered html.
2011-03-30 10:24:44 -05:00
Robin Sommer
1e54dfba34 Updating submodule(s). 2011-03-29 21:53:53 -07:00
Robin Sommer
bc39f9f048 Porting the istate tests to btest.
Note that currently most of them don't pass because (i) the code
adding the environment variable for seeding the RNG has not been
merged into master yet; and (2) Broccoli to Bro communication is
currently broken because of the int64 problem. Once these are fixed,
then baselines need to be recreated and checked.

Therefore, the istate tests aren't activated in btest.cfg yet.
2011-03-29 21:46:06 -07:00
Robin Sommer
3562682ac9 Merge remote branch 'origin/topic/appleman/unittests'
Note that I've shifted things around a little bit. The traces are now
in Traces/* (capital T), and the known-hosts-test in policy/*.
Scripts/ was meant just for helper shell scripts for the testing
framework. Also, I've not yet included "policy" in btest.cfg as a
TestDir because the corresponding script is not yet in master.

* origin/topic/appleman/unittests:
  Test, trace file, and baseline for testing the known-services policy script
  Baseline for KNOWN-HOSTS tesT
  Initial drop of known-hosts unit test, with tracefile and directory structure, as well as c ouple of files pulled from Robin's logging branch.
2011-03-29 21:43:34 -07:00
Jon Siwek
090ce2d03c Fix generated script docs displaying functions twice.
A function prototype can be declared separately from where it's defined;
the doc framework should now recognize them as the same and combine
reST documentation associated with either case if both are present.
2011-03-29 16:54:16 -05:00
Jon Siwek
94ac3f3c23 Revise the way "port analysis" and "packet filter" documentation is generated.
They now appear at the bottom of generated docs.

Also, a "more info" link is added which can point to an arbitrary location
in any reST document processed by Sphinx.
2011-03-29 14:19:33 -05:00
Jon Siwek
a9810d21a9 Generated docs now have xref links for attribute values that are enums. 2011-03-29 12:10:08 -05:00
Seth Hall
f66ad1cffd Regenerated the Mozilla CA bundle without the untrusted server authentication certs.
Certs intended for email protection and code signing have been removed
as well due to the change.
2011-03-29 10:03:20 -04:00
Robin Sommer
1cbde793d8 Merge branch 'topic/robin/extend-records' into topic/robin/logging-internals
Includes some fixes for using &log with record-extension.
2011-03-28 18:56:19 -07:00
Robin Sommer
38a1aa5a34 &log keyword, and vector logging.
The &log keyword now operates as discussed:

    - When associated with individual record fields, it defines them
      as being logged.

    - When associated with a complete record type, it defines all fields
      to be logged.

    - When associated with a record extension, it defines all added
      fields to be logged.

    Note that for nested record types, the inner fields must likewise
    be declared with &log. Consequently, conn_id is now declared with
    &log in bro.init.

Vectors are now allowed to be logged and will be recorded as an
ordered set of items.
2011-03-28 18:14:05 -07:00
Seth Hall
7faf3e0f3b Complete rewrite to SSL analyzer.
* I haven't removed handwritten analyzer code yet although it isn't built anymore.
* The ssl.bro script is just an example and doesn't keep any state yet.
2011-03-28 12:15:53 -04:00
Don Appleman
ebb4eb552a Test, trace file, and baseline for testing the known-services policy script 2011-03-25 16:17:27 -05:00
Jon Siwek
60a7dc6f55 Autodoc framework now tracks script constants
Also, it's starting to attempt to describe more complex types
of initial values.
2011-03-24 16:56:25 -05:00