This file is indexed.

/usr/share/bro/base/bif/cardinality-counter.bif.bro is in bro-common 2.5.3-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This file was automatically generated by bifcl from /build/bro-a60mw1/bro-2.5.3/src/probabilistic/cardinality-counter.bif (alternative mode).

##! Functions to create and manipulate probabilistic cardinality counters.

export {


module GLOBAL;


## Initializes a probabilistic cardinality counter that uses the HyperLogLog
## algorithm.
##
## err: the desired error rate (e.g. 0.01).
##
## confidence: the desired confidence for the error rate (e.g., 0.95).
##
## Returns: a HLL cardinality handle.
##
## .. bro:see:: hll_cardinality_estimate hll_cardinality_merge_into hll_cardinality_add
##    hll_cardinality_copy
global hll_cardinality_init: function(err: double , confidence: double ): opaque of cardinality ;


## Adds an element to a HyperLogLog cardinality counter.
##
## handle: the HLL handle.
##
## elem: the element to add.
##
## Returns: true on success.
##
## .. bro:see:: hll_cardinality_estimate hll_cardinality_merge_into
##    hll_cardinality_init hll_cardinality_copy
global hll_cardinality_add: function(handle: opaque of cardinality , elem: any ): bool ;


## Merges a HLL cardinality counter into another.
##
## .. note:: The same restrictions as for Bloom filter merging apply,
##    see :bro:id:`bloomfilter_merge`.
##
## handle1: the first HLL handle, which will contain the merged result.
##
## handle2: the second HLL handle, which will be merged into the first.
##
## Returns: true on success.
##
## .. bro:see:: hll_cardinality_estimate  hll_cardinality_add
##    hll_cardinality_init hll_cardinality_copy
global hll_cardinality_merge_into: function(handle1: opaque of cardinality , handle2: opaque of cardinality ): bool ;


## Estimate the current cardinality of an HLL cardinality counter.
##
## handle: the HLL handle.
##
## Returns: the cardinality estimate. Returns -1.0 if the counter is empty.
##
## .. bro:see:: hll_cardinality_merge_into hll_cardinality_add
##    hll_cardinality_init hll_cardinality_copy
global hll_cardinality_estimate: function(handle: opaque of cardinality ): double ;


## Copy a HLL cardinality counter.
##
## handle: cardinality counter to copy.
##
## Returns: copy of handle.
##
## .. bro:see:: hll_cardinality_estimate hll_cardinality_merge_into hll_cardinality_add
##    hll_cardinality_init
global hll_cardinality_copy: function(handle: opaque of cardinality ): opaque of cardinality ;


} # end of export section
module GLOBAL;