Fix typos in BIF documentation

Fixed typos in documentation of hexstr_to_bytestring.
Also added documentation that was missing for function parameters
and return values of other BIFs.
This commit is contained in:
Daniel Thayer 2013-11-22 14:49:16 -06:00
parent 7025d511e4
commit 6f06705c23
2 changed files with 15 additions and 9 deletions

View file

@ -973,6 +973,8 @@ function entropy_test_finish%(handle: opaque of entropy%): entropy_test_result
##
## prefix: A custom string prepended to the result.
##
## Returns: A string identifier that is unique.
##
## .. bro:see:: unique_id_from
function unique_id%(prefix: string%) : string
%{
@ -987,6 +989,8 @@ function unique_id%(prefix: string%) : string
##
## prefix: A custom string prepended to the result.
##
## Returns: A string identifier that is unique.
##
## .. bro:see:: unique_id
function unique_id_from%(pool: int, prefix: string%) : string
%{
@ -1857,8 +1861,8 @@ function global_ids%(%): id_table
##
## id: The global identifier.
##
## Returns the value of *id*. If *id* does not describe a valid identifier, the
## function returns the string ``"<unknown id>"`` or ``"<no ID value>"``.
## Returns: The value of *id*. If *id* does not describe a valid identifier,
## the string ``"<unknown id>"`` or ``"<no ID value>"`` is returned.
function lookup_ID%(id: string%) : any
%{
ID* i = global_scope()->Lookup(id->CheckString());
@ -2632,15 +2636,15 @@ function bytestring_to_hexstr%(bytestring: string%): string
return new StringVal(hexstr);
%}
## Converts a hex-string into its binary representation.
## Converts a hex-string into its binary representation.
## For example, ``"3034"`` would be converted to ``"04"``.
##
## The input string is assumed to only contain 0-9 and a-f,
## otherwhise behavior is undefines.
## The input string is assumed to contain an even number of hexadecimal digits
## (0-9, a-f, or A-F), otherwise behavior is undefined.
##
## hexstring: The hexadecimal string representation.
## hexstr: The hexadecimal string representation.
##
## Returns: The binary representation of *hexstring*.
## Returns: The binary representation of *hexstr*.
##
## .. bro:see:: hexdump bytestring_to_hexstr
function hexstr_to_bytestring%(hexstr: string%): string
@ -4964,8 +4968,6 @@ function preserve_prefix%(a: addr, width: count%): any
##
## a: The subnet to preserve.
##
## width: The number of bits from the top that should remain intact.
##
## .. bro:see:: preserve_prefix anonymize_addr
##
## .. todo:: Currently dysfunctional.

View file

@ -138,6 +138,10 @@ function topk_sum%(handle: opaque of topk%): count
## Merge the second top-k data structure into the first.
##
## handle1: the first TopK handle.
##
## handle2: the second TopK handle.
##
## .. note:: This does not remove any elements, the resulting data structure
## can be bigger than the maximum size given on initialization.
##