mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Iteration over vectors.
This commit is contained in:
parent
7d583b6b78
commit
c453c228cb
3 changed files with 27 additions and 4 deletions
|
@ -0,0 +1,3 @@
|
|||
1.2.0.0/18
|
||||
2.3.0.0/18
|
||||
3.4.0.0/18
|
12
testing/btest/doc/manual/data_struct_vector_iter.bro
Normal file
12
testing/btest/doc/manual/data_struct_vector_iter.bro
Normal file
|
@ -0,0 +1,12 @@
|
|||
# @TEST-EXEC: bro %INPUT
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
local addr_vector: vector of addr = vector( 1.2.3.4, 2.3.4.5, 3.4.5.6);
|
||||
|
||||
for (i in addr_vector)
|
||||
{
|
||||
print mask_addr(addr_vector[i], 18);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue