Commit graph

6667 commits

Author SHA1 Message Date
Robin Sommer
c41da9ca99 Fixing bug with deleting still unset record fields of table type. 2011-04-23 10:40:07 -07: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
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
6826b58fb4 Merge remote branch 'origin/master' into topic/seth/ssl-binpac 2011-04-22 09:53:25 -04: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
Robin Sommer
5fba6d144e Logging fixes.
- Now compiles in v6 mode.

- Loading logging.bif.*bro* in logging.bro for consistency.
2011-04-21 18:50:11 -07:00
Jon Siwek
17314fa144 Add parser error hint when in doc mode about checking ## comment syntax. 2011-04-21 13:34:37 -05: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
c564f545c0 Updates and tests for netbios name BiF.
* New BiF named: decode_netbios_name_type
* \x01 and \x02 are now decoded because I saw those
  bytes being actively used in names.
2011-04-20 15:59:11 -04:00
Seth Hall
cba5766bc8 Fixed the do_split bug and added a test.
* do_split was having a problem if there was another match
  after the end of the number of separators.  It would only
  return the match up to the point of the next match instead
  of the rest of the string.
2011-04-19 22:24:46 -04:00
Robin Sommer
5a6311d360 Implementing a VectorCoerceExpr.
Turns out we didn't have that yet.

I don't remember who implemented vectors originally, but he does owe
us all round at Jupiter ...
2011-04-19 16:58:18 -07:00
Robin Sommer
b3b5a73113 Fixing problem with optional fields. 2011-04-19 16:22:40 -07:00
Robin Sommer
a4a47c3df1 Merge remote branch 'origin/topic/seth/count_to_addr'
* origin/topic/seth/count_to_addr:
  Adjusting BiF name to indicate v4 addresses only.
  count_to_addr function
2011-04-19 15:52:16 -07:00
Seth Hall
61be2f5bd3 Adjusting BiF name to indicate v4 addresses only.
* Function is now named count_to_v4_addr
2011-04-19 00:30:56 -04:00
Robin Sommer
20a7a98de6 Adding missing include. 2011-04-18 17:33:13 -07:00
Robin Sommer
0590d899f6 Constness tweak. 2011-04-18 16:50:13 -07:00
Robin Sommer
e7bde27f2d Merge remote branch 'origin/topic/jsiwek/doc-framework' 2011-04-18 14:54:23 -07:00
Seth Hall
dfd9b40466 count_to_addr function
* Updates to_count to cope with 64bit ints.
* Adds count_to_addr which will turn a count into an IPv4 address.
* Includes tests.
2011-04-18 15:22:48 -04:00
Robin Sommer
29b0d0d1d9 Files can now be logged; their filename will be written out. 2011-04-17 20:52:18 -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
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
057ad684d8 Add brief descriptions for classes involved in generation of script docs. 2011-04-08 12:30:06 -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
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
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
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
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
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