mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Fix minor typos in the documentation
This commit is contained in:
parent
9ab5180aa9
commit
a28e671f8d
2 changed files with 16 additions and 16 deletions
|
@ -22,7 +22,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
is a string of digits preceded by a ``+`` or ``-`` sign, e.g.
|
is a string of digits preceded by a ``+`` or ``-`` sign, e.g.
|
||||||
``-42`` or ``+5``. When using type inferencing use care so that the
|
``-42`` or ``+5``. When using type inferencing use care so that the
|
||||||
intended type is inferred, e.g. ``local size_difference = 0`` will
|
intended type is inferred, e.g. ``local size_difference = 0`` will
|
||||||
infer the :bro:type:`count` while ``local size_difference = +0``
|
infer :bro:type:`count`, while ``local size_difference = +0``
|
||||||
will infer :bro:type:`int`.
|
will infer :bro:type:`int`.
|
||||||
|
|
||||||
.. bro:type:: count
|
.. bro:type:: count
|
||||||
|
@ -32,7 +32,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
|
|
||||||
.. bro:type:: counter
|
.. bro:type:: counter
|
||||||
|
|
||||||
An alias to :bro:type:`count`
|
An alias to :bro:type:`count`.
|
||||||
|
|
||||||
.. TODO: is there anything special about this type?
|
.. TODO: is there anything special about this type?
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
|
|
||||||
A type used to hold character-string values which represent text.
|
A type used to hold character-string values which represent text.
|
||||||
String constants are created by enclosing text in double quotes (")
|
String constants are created by enclosing text in double quotes (")
|
||||||
and the backslash character (\) introduces escape sequences.
|
and the backslash character (\\) introduces escape sequences.
|
||||||
|
|
||||||
Note that Bro represents strings internally as a count and vector of
|
Note that Bro represents strings internally as a count and vector of
|
||||||
bytes rather than a NUL-terminated byte string (although string
|
bytes rather than a NUL-terminated byte string (although string
|
||||||
|
@ -135,7 +135,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
|
|
||||||
type color: enum { Red, White, Blue, };
|
type color: enum { Red, White, Blue, };
|
||||||
|
|
||||||
The last comma is after ``Blue`` is optional.
|
The last comma after ``Blue`` is optional.
|
||||||
|
|
||||||
.. bro:type:: timer
|
.. bro:type:: timer
|
||||||
|
|
||||||
|
@ -150,8 +150,8 @@ The Bro scripting language supports the following built-in types.
|
||||||
followed by one of ``/tcp``, ``/udp``, ``/icmp``, or ``/unknown``.
|
followed by one of ``/tcp``, ``/udp``, ``/icmp``, or ``/unknown``.
|
||||||
|
|
||||||
Ports can be compared for equality and also for ordering. When
|
Ports can be compared for equality and also for ordering. When
|
||||||
comparing order across transport-level protocols, ``/unknown`` <
|
comparing order across transport-level protocols, ``unknown`` <
|
||||||
``/tcp`` < ``/udp`` < ``icmp``, for example ``65535/tcp`` is smaller
|
``tcp`` < ``udp`` < ``icmp``, for example ``65535/tcp`` is smaller
|
||||||
than ``0/udp``.
|
than ``0/udp``.
|
||||||
|
|
||||||
.. bro:type:: addr
|
.. bro:type:: addr
|
||||||
|
@ -230,7 +230,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
|
|
||||||
global a: table[count] of table[addr, port] of string;
|
global a: table[count] of table[addr, port] of string;
|
||||||
|
|
||||||
which declared a table indexed by :bro:type:`count` and yielding
|
which declares a table indexed by :bro:type:`count` and yielding
|
||||||
another :bro:type:`table` which is indexed by an :bro:type:`addr`
|
another :bro:type:`table` which is indexed by an :bro:type:`addr`
|
||||||
and :bro:type:`port` to yield a :bro:type:`string`.
|
and :bro:type:`port` to yield a :bro:type:`string`.
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
:bro:attr:`&optional` or have a :bro:attr:`&default` attribute must
|
:bro:attr:`&optional` or have a :bro:attr:`&default` attribute must
|
||||||
be specified.
|
be specified.
|
||||||
|
|
||||||
To test for existence of field that is :bro:attr:`&optional`, use the
|
To test for existence of a field that is :bro:attr:`&optional`, use the
|
||||||
``?$`` operator:
|
``?$`` operator:
|
||||||
|
|
||||||
.. code:: bro
|
.. code:: bro
|
||||||
|
@ -412,7 +412,7 @@ The Bro scripting language supports the following built-in types.
|
||||||
print f, "hello, world";
|
print f, "hello, world";
|
||||||
close(f);
|
close(f);
|
||||||
|
|
||||||
Writing to files like this for logging usually isn't recommend, for better
|
Writing to files like this for logging usually isn't recommended, for better
|
||||||
logging support see :doc:`/logging`.
|
logging support see :doc:`/logging`.
|
||||||
|
|
||||||
.. bro:type:: func
|
.. bro:type:: func
|
||||||
|
@ -512,22 +512,22 @@ scripting language supports the following built-in attributes.
|
||||||
|
|
||||||
.. bro:attr:: &optional
|
.. bro:attr:: &optional
|
||||||
|
|
||||||
Allows record field to be missing. For example the type ``record {
|
Allows a record field to be missing. For example the type ``record {
|
||||||
a: int, b: port &optional }`` could be instantiated both as
|
a: int, b: port &optional }`` could be instantiated both as
|
||||||
singleton ``[$a=127.0.0.1]`` or pair ``[$a=127.0.0.1, $b=80/tcp]``.
|
singleton ``[$a=127.0.0.1]`` or pair ``[$a=127.0.0.1, $b=80/tcp]``.
|
||||||
|
|
||||||
.. bro:attr:: &default
|
.. bro:attr:: &default
|
||||||
|
|
||||||
Uses a default value for a record field or container elements. For
|
Uses a default value for a record field or container elements. For
|
||||||
example, ``table[int] of string &default="foo" }`` would create
|
example, ``table[int] of string &default="foo" }`` would create a
|
||||||
table that returns The :bro:type:`string` ``"foo"`` for any
|
table that returns the :bro:type:`string` ``"foo"`` for any
|
||||||
non-existing index.
|
non-existing index.
|
||||||
|
|
||||||
.. bro:attr:: &redef
|
.. bro:attr:: &redef
|
||||||
|
|
||||||
Allows for redefinition of initial object values. This is typically
|
Allows for redefinition of initial object values. This is typically
|
||||||
used with constants, for example, ``const clever = T &redef;`` would
|
used with constants, for example, ``const clever = T &redef;`` would
|
||||||
allow the constant to be redifined at some later point during script
|
allow the constant to be redefined at some later point during script
|
||||||
execution.
|
execution.
|
||||||
|
|
||||||
.. bro:attr:: &rotate_interval
|
.. bro:attr:: &rotate_interval
|
||||||
|
@ -536,7 +536,7 @@ scripting language supports the following built-in attributes.
|
||||||
|
|
||||||
.. bro:attr:: &rotate_size
|
.. bro:attr:: &rotate_size
|
||||||
|
|
||||||
Rotates af file after it has reached a given size in bytes.
|
Rotates a file after it has reached a given size in bytes.
|
||||||
|
|
||||||
.. bro:attr:: &add_func
|
.. bro:attr:: &add_func
|
||||||
|
|
||||||
|
|
|
@ -601,10 +601,10 @@ function add_signature_file(sold: string, snew: string): string
|
||||||
}
|
}
|
||||||
|
|
||||||
## Signature files to read. Use ``redef signature_files += "foo.sig"`` to
|
## Signature files to read. Use ``redef signature_files += "foo.sig"`` to
|
||||||
## extend. Signature files will be searched relative to ``BRO_PATH``.
|
## extend. Signature files will be searched relative to ``BROPATH``.
|
||||||
global signature_files = "" &add_func = add_signature_file;
|
global signature_files = "" &add_func = add_signature_file;
|
||||||
|
|
||||||
## ``p0f`` fingerprint file to use. Will be searched relative to ``BRO_PATH``.
|
## ``p0f`` fingerprint file to use. Will be searched relative to ``BROPATH``.
|
||||||
const passive_fingerprint_file = "base/misc/p0f.fp" &redef;
|
const passive_fingerprint_file = "base/misc/p0f.fp" &redef;
|
||||||
|
|
||||||
# todo::testing to see if I can remove these without causing problems.
|
# todo::testing to see if I can remove these without causing problems.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue