Zeekygen: Merge in Spicy analyzer documentation.

This now merges information on analyzers from both plugins and Spicy.

Closes #3306.
This commit is contained in:
Robin Sommer 2023-09-18 12:00:37 +02:00
parent 8a3d645caf
commit a89694b32d
No known key found for this signature in database
GPG key ID: D8187293B3FFE5D0
4 changed files with 99 additions and 15 deletions

View file

@ -0,0 +1,25 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
.. _plugin-foo-bar:
Foo::Bar
--------
Just a "test" analyzer.h
Components
++++++++++
:zeek:enum:`Analyzer::ANALYZER_SPICY_SSH`
Events
++++++
.. zeek:id:: ssh::banner
:source-code: <...>/zeekygen.zeek 17 17
:Type: :zeek:type:`event` (c: :zeek:type:`connection`, facility: :zeek:type:`count`, severity: :zeek:type:`count`, msg: :zeek:type:`string`)
Test event.
Really, just a test ...

View file

@ -4,7 +4,17 @@
# @TEST-EXEC: cat output | grep 'module.s documentation' >output1
# @TEST-EXEC: btest-diff output1
#
# @TEST-DOC: Check that Spicy's tells Zeeygen about its analyzers. (TODO: Test only partially implemented right now)
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN && zeek -X zeekygen.conf test.hlto %INPUT
# @TEST-EXEC: cat protocol.rst | sed -n '/_plugin-foo-bar/,/_plugin/p' | sed '$d' >output2
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output2
#
# @TEST-DOC: Check that Spicy tells Zeekygen about its analyzers.
## Test event.
##
## Really, just a test ...
global ssh::banner: event(c: connection, facility: count, severity: count, msg: string);
# @TEST-START-FILE doc.spicy
@ -33,3 +43,7 @@ protocol analyzer spicy::SSH over TCP:
on SSH::Banner -> event ssh::banner((1, self.software));
# @TEST-END-FILE
# @TEST-START-FILE zeekygen.conf
proto_analyzer * protocol.rst