Skip to content

Commit

Permalink
Add anchors to FAQ items in docs [skip CI].
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Jan 26, 2023
1 parent 38842cc commit a94de1e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Frequently Asked Questions
Spicy Language
--------------

.. _faq_spicy_global_variables:

.. rubric:: Are Spicy's global variables *really* global?

Indeed, they are. Changes to global variables become visible to all
Expand All @@ -19,6 +21,8 @@ needs truly global state. Take a look at :ref:`unit_context` for a
different mechanism tying state to the current connection, which is a
much more common requirement.

.. _faq_spicy_line_numbers:

.. rubric:: What do the numbers in ``foo.spicy:37:1`` or
``foo.spicy:37:1-42:19`` in messages mean?

Expand All @@ -33,6 +37,8 @@ ending in line 42, character 19 in the same file.
Toolchain
---------

.. _faq_toolchain_speed_up_compilation:

.. rubric:: Is there a way to speed up compilation of Spicy code?

Depending on the complexity of the Spicy code, processing through
Expand All @@ -51,6 +57,8 @@ refers to compiling generated C++ code).
Zeek
----

.. _faq_zeek_install_spicy_and_plugin_to_use_parsers:

.. rubric:: Do I need to install Spicy and its Zeek plugin to use Spicy parsers in Zeek?

As of version 5.0 Zeek by default bundles Spicy and its Zeek plugin. If that is
Expand All @@ -67,6 +75,8 @@ If ``spicyc`` is missing, you need to :ref:`install Spicy <installation>`; if
``spicyz`` is missing or ``Zeek::Spicy`` is not listed you need to :ref:`install
Spicy plugin <zeek_spicy_plugin_installation>`.

.. _faq_zeek_install_spicy_to_use_plugin:

.. rubric:: Do I need a Spicy installation for using the Zeek plugin?

No, if the Zeek plugin was compiled with ``--build-toolchain=no``,
Expand All @@ -77,24 +87,32 @@ through :ref:`spicyz <spicyz>`. The build process will leave a binary
distribution inside your build directory at
``zeek/plugin/Zeek_Spicy.tgz``.

.. _faq_zeek_spicy_dpd_support:

.. rubric:: Does Spicy support *Dynamic Protocol Detection (DPD)*?

Yes, see the :ref:`corresponding section <zeek_dpd>` on how to add it
to your analyzers.

.. _faq_zeek_layer2_analyzer:

.. rubric:: Can I write a Layer 2 protocol analyzer with Spicy?

Yes, you can. In Zeek terminology a layer 2 protocol analyzer is a packet
analyzer, see the :ref:`corresponding section <zeek_packet_analyzer>` on how
to declare such an analyzer.

.. _faq_zeek_print_statements_no_effect:

.. rubric:: I have ``print`` statements in my Spicy grammar, why do I not see any output when running Zeek?

The Zeek plugin by default disables the output of Spicy-side ``print``
statements. To enable them, add ``Spicy::enable_print=T`` to the Zeek
command line (or ``redef Spicy::enable_print=T;`` to a Zeek script
that you are loading).

.. _faq_zeek_tcp_analyzer_not_all_messages_recognized:

.. rubric:: My analyzer recognizes only one or two TCP packets even though there are more in the input.

The Zeek Spicy plugin parses the sending and receiving sides of a TCP
Expand Down

0 comments on commit a94de1e

Please sign in to comment.