doc/byte_test: Document byte_test variable usage

Issue: 6144

This commit updates the byte_test documentation now that a variable name
can be used for the nbytes value.
pull/9198/head
Jeff Lucovsky 2 years ago committed by Victor Julien
parent da866356c0
commit 73b943276e

@ -278,6 +278,13 @@ See :doc:`http-keywords` for all HTTP keywords.
- Suricata will never match if there's a zero divisor. Division by 0 is undefined.
``byte_test`` Keyword
---------------------
- Suricata allows a variable name from ``byte_extract`` or ``byte_math``
to be specified for the ``nbytes`` value. The value of ``nbytes`` must adhere
to the same constraints as though a value was directly supplied by the rule.
``isdataat`` Keyword
--------------------

@ -368,13 +368,14 @@ and the final result will be right shifted one bit for each trailing ``0`` in
the ``<bitmask value>``.
Format::
byte_test:<num of bytes>, [!]<operator>, <test value>, <offset> [,relative] \
[,<endian>][, string, <num type>][, dce][, bitmask <bitmask value>];
byte_test:<num of bytes> | <variable_name>, [!]<operator>, <test value>, <offset> [,relative] \
[,<endian>][, string, <num type>][, dce][, bitmask <bitmask value>];
+----------------+------------------------------------------------------------------------------+
| <num of bytes> | The number of bytes selected from the packet to be converted |
| | or the name of a byte_extract/byte_math variable. |
+----------------+------------------------------------------------------------------------------+
| <operator> | |
| | - [!] Negation can prefix other operators |

Loading…
Cancel
Save