[Bro-Dev] Thoughts on documenting scripts

Seth Hall seth at icir.org
Fri Dec 3 12:06:53 PST 2010


On Nov 22, 2010, at 9:24 PM, Robin Sommer wrote:

> I've added a page on how we might use Sphinx to auto-generate Bro
> script documentation to the projects list, see

One question I just came across was how to document the values for an enum.  My example is below, I think it would be nice to either link to the potential values for that enum or include them inline (I think I prefer inline).

	# Enable and disable the log.  If you only want logs for certain transactions,
	# that can be configured with this variable as well.
	const logging: Directions = LocalHosts &redef;

In another file, the Directions enum might be:
	type Directions: enum{Inbound, Outbound, Enabled, Disabled};

It's a slightly convoluted example because the code doesn't exactly match the implementation that I currently have in my logging framework but it doesn't really matter since that will be changing anyway.

  .Seth



More information about the bro-dev mailing list