mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Added str to pred function
This commit is contained in:
parent
6244bf4308
commit
d5cf730b51
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ export {
|
||||||
id: string &optional;
|
id: string &optional;
|
||||||
## A predicate so that you can decide per index if you would like
|
## A predicate so that you can decide per index if you would like
|
||||||
## to accept the data being inserted.
|
## to accept the data being inserted.
|
||||||
pred: function(index: Index): bool &optional;
|
pred: function(index: Index, str: string): bool &optional;
|
||||||
## A function to normalize the index. This can be used to normalize
|
## A function to normalize the index. This can be used to normalize
|
||||||
## any field in the index and is likely most useful to normalize
|
## any field in the index and is likely most useful to normalize
|
||||||
## the $str field.
|
## the $str field.
|
||||||
|
@ -328,7 +328,7 @@ function add_it(id: string, index: Index, integer_value: bool, num: count, str:
|
||||||
|
|
||||||
# If this filter has a predicate, run the predicate and skip this
|
# If this filter has a predicate, run the predicate and skip this
|
||||||
# index if the predicate return false.
|
# index if the predicate return false.
|
||||||
if ( filter?$pred && ! filter$pred(index) )
|
if ( filter?$pred && ! filter$pred(index,str) )
|
||||||
next;
|
next;
|
||||||
|
|
||||||
if ( index?$host )
|
if ( index?$host )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue