mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Zeekygen: Merge in Spicy analyzer documentation.
This now merges information on analyzers from both plugins and Spicy. Closes #3306.
This commit is contained in:
parent
8a3d645caf
commit
a89694b32d
4 changed files with 99 additions and 15 deletions
25
testing/btest/Baseline/spicy.zeekygen/output2
Normal file
25
testing/btest/Baseline/spicy.zeekygen/output2
Normal 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 ...
|
||||
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue