mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Merge remote-tracking branch 'origin/master' into topic/robin/dynamic-plugins-2.3
Conflicts: aux/bro-aux aux/broccoli
This commit is contained in:
commit
aeb8e71e8c
10 changed files with 106 additions and 15 deletions
20
CHANGES
20
CHANGES
|
@ -1,4 +1,24 @@
|
||||||
|
|
||||||
|
2.3-12 | 2014-07-10 19:17:37 -0500
|
||||||
|
|
||||||
|
* Include yield of vectors in Broxygen's type descriptions.
|
||||||
|
Addresses BIT-1217. (Jon Siwek)
|
||||||
|
|
||||||
|
2.3-11 | 2014-07-10 14:49:27 -0700
|
||||||
|
|
||||||
|
* Fixing DataSeries output. It was using a now illegal value as its
|
||||||
|
default compression level. (Robin Sommer)
|
||||||
|
|
||||||
|
2.3-7 | 2014-06-26 17:35:18 -0700
|
||||||
|
|
||||||
|
* Extending "make test-all" to include aux/bro-aux. (Robin Sommer)
|
||||||
|
|
||||||
|
2.3-6 | 2014-06-26 17:24:10 -0700
|
||||||
|
|
||||||
|
* DataSeries compilation issue fixed. (mlaterman)
|
||||||
|
|
||||||
|
* Fix a reference counting bug in ListVal ctor. (Jon Siwek)
|
||||||
|
|
||||||
2.3-3 | 2014-06-26 15:41:04 -0500
|
2.3-3 | 2014-06-26 15:41:04 -0500
|
||||||
|
|
||||||
* Support tilde expansion when Bro tries to find its own path. (Jon
|
* Support tilde expansion when Bro tries to find its own path. (Jon
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -55,6 +55,7 @@ test:
|
||||||
test-all: test
|
test-all: test
|
||||||
test -d aux/broctl && ( cd aux/broctl && make test )
|
test -d aux/broctl && ( cd aux/broctl && make test )
|
||||||
test -d aux/btest && ( cd aux/btest && make test )
|
test -d aux/btest && ( cd aux/btest && make test )
|
||||||
|
test -d aux/bro-aux && ( cd aux/bro-aux && make test )
|
||||||
|
|
||||||
configured:
|
configured:
|
||||||
@test -d $(BUILD) || ( echo "Error: No build/ directory found. Did you run configure?" && exit 1 )
|
@test -d $(BUILD) || ( echo "Error: No build/ directory found. Did you run configure?" && exit 1 )
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.3-3
|
2.3-12
|
||||||
|
|
|
@ -8,9 +8,9 @@ export {
|
||||||
## 'none' -- No compression.
|
## 'none' -- No compression.
|
||||||
## 'lzf' -- LZF compression (very quick, but leads to larger output files).
|
## 'lzf' -- LZF compression (very quick, but leads to larger output files).
|
||||||
## 'lzo' -- LZO compression (very fast decompression times).
|
## 'lzo' -- LZO compression (very fast decompression times).
|
||||||
## 'gz' -- GZIP compression (slower than LZF, but also produces smaller output).
|
## 'zlib' -- GZIP compression (slower than LZF, but also produces smaller output).
|
||||||
## 'bz2' -- BZIP2 compression (slower than GZIP, but also produces smaller output).
|
## 'bz2' -- BZIP2 compression (slower than GZIP, but also produces smaller output).
|
||||||
const compression = "gz" &redef;
|
const compression = "zlib" &redef;
|
||||||
|
|
||||||
## The extent buffer size.
|
## The extent buffer size.
|
||||||
## Larger values here lead to better compression and more efficient writes,
|
## Larger values here lead to better compression and more efficient writes,
|
||||||
|
|
14
src/Type.cc
14
src/Type.cc
|
@ -1745,7 +1745,17 @@ void VectorType::Describe(ODesc* d) const
|
||||||
yield_type->Describe(d);
|
yield_type->Describe(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
BroType* base_type(TypeTag tag)
|
void VectorType::DescribeReST(ODesc* d, bool roles_only) const
|
||||||
|
{
|
||||||
|
d->Add(fmt(":bro:type:`%s` of ", type_name(Tag())));
|
||||||
|
|
||||||
|
if ( yield_type->GetName().empty() )
|
||||||
|
yield_type->DescribeReST(d, roles_only);
|
||||||
|
else
|
||||||
|
d->Add(fmt(":bro:type:`%s`", yield_type->GetName().c_str()));
|
||||||
|
}
|
||||||
|
|
||||||
|
BroType* base_type_no_ref(TypeTag tag)
|
||||||
{
|
{
|
||||||
static BroType* base_types[NUM_TYPES];
|
static BroType* base_types[NUM_TYPES];
|
||||||
|
|
||||||
|
@ -1761,7 +1771,7 @@ BroType* base_type(TypeTag tag)
|
||||||
base_types[t]->SetLocationInfo(&l);
|
base_types[t]->SetLocationInfo(&l);
|
||||||
}
|
}
|
||||||
|
|
||||||
return base_types[t]->Ref();
|
return base_types[t];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -607,6 +607,7 @@ public:
|
||||||
bool IsUnspecifiedVector() const;
|
bool IsUnspecifiedVector() const;
|
||||||
|
|
||||||
void Describe(ODesc* d) const;
|
void Describe(ODesc* d) const;
|
||||||
|
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
VectorType() { yield_type = 0; }
|
VectorType() { yield_type = 0; }
|
||||||
|
@ -625,8 +626,14 @@ extern OpaqueType* topk_type;
|
||||||
extern OpaqueType* bloomfilter_type;
|
extern OpaqueType* bloomfilter_type;
|
||||||
extern OpaqueType* x509_opaque_type;
|
extern OpaqueType* x509_opaque_type;
|
||||||
|
|
||||||
|
// Returns the Bro basic (non-parameterized) type with the given type.
|
||||||
|
// The reference count of the type is not increased.
|
||||||
|
BroType* base_type_no_ref(TypeTag tag);
|
||||||
|
|
||||||
// Returns the BRO basic (non-parameterized) type with the given type.
|
// Returns the BRO basic (non-parameterized) type with the given type.
|
||||||
extern BroType* base_type(TypeTag tag);
|
// The caller assumes responsibility for a reference to the type.
|
||||||
|
inline BroType* base_type(TypeTag tag)
|
||||||
|
{ return base_type_no_ref(tag)->Ref(); }
|
||||||
|
|
||||||
// Returns the BRO basic error type.
|
// Returns the BRO basic error type.
|
||||||
inline BroType* error_type() { return base_type(TYPE_ERROR); }
|
inline BroType* error_type() { return base_type(TYPE_ERROR); }
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ bool PatternVal::DoUnserialize(UnserialInfo* info)
|
||||||
}
|
}
|
||||||
|
|
||||||
ListVal::ListVal(TypeTag t)
|
ListVal::ListVal(TypeTag t)
|
||||||
: Val(new TypeList(t == TYPE_ANY ? 0 : base_type(t)))
|
: Val(new TypeList(t == TYPE_ANY ? 0 : base_type_no_ref(t)))
|
||||||
{
|
{
|
||||||
tag = t;
|
tag = t;
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ DataSeries::DataSeries(WriterFrontend* frontend) : WriterBackend(frontend)
|
||||||
threading::formatter::Ascii::SeparatorInfo sep_info;
|
threading::formatter::Ascii::SeparatorInfo sep_info;
|
||||||
ascii = new threading::formatter::Ascii(this, sep_info);
|
ascii = new threading::formatter::Ascii(this, sep_info);
|
||||||
|
|
||||||
compress_type = Extent::compress_none;
|
compress_type = Extent::compress_mode_none;
|
||||||
log_file = 0;
|
log_file = 0;
|
||||||
log_output = 0;
|
log_output = 0;
|
||||||
}
|
}
|
||||||
|
@ -343,25 +343,25 @@ bool DataSeries::DoInit(const WriterInfo& info, int num_fields, const threading:
|
||||||
compress_type = Extent::compress_all;
|
compress_type = Extent::compress_all;
|
||||||
|
|
||||||
if( ds_compression == "lzf" )
|
if( ds_compression == "lzf" )
|
||||||
compress_type = Extent::compress_lzf;
|
compress_type = Extent::compress_mode_lzf;
|
||||||
|
|
||||||
else if( ds_compression == "lzo" )
|
else if( ds_compression == "lzo" )
|
||||||
compress_type = Extent::compress_lzo;
|
compress_type = Extent::compress_mode_lzo;
|
||||||
|
|
||||||
else if( ds_compression == "gz" )
|
else if( ds_compression == "zlib" )
|
||||||
compress_type = Extent::compress_gz;
|
compress_type = Extent::compress_mode_zlib;
|
||||||
|
|
||||||
else if( ds_compression == "bz2" )
|
else if( ds_compression == "bz2" )
|
||||||
compress_type = Extent::compress_bz2;
|
compress_type = Extent::compress_mode_bz2;
|
||||||
|
|
||||||
else if( ds_compression == "none" )
|
else if( ds_compression == "none" )
|
||||||
compress_type = Extent::compress_none;
|
compress_type = Extent::compress_mode_none;
|
||||||
|
|
||||||
else if( ds_compression == "any" )
|
else if( ds_compression == "any" )
|
||||||
compress_type = Extent::compress_all;
|
compress_type = Extent::compress_all;
|
||||||
|
|
||||||
else
|
else
|
||||||
Warning(Fmt("%s is not a valid compression type. Valid types are: 'lzf', 'lzo', 'gz', 'bz2', 'none', 'any'. Defaulting to 'any'", ds_compression.c_str()));
|
Warning(Fmt("%s is not a valid compression type. Valid types are: 'lzf', 'lzo', 'zlib', 'bz2', 'none', 'any'. Defaulting to 'any'", ds_compression.c_str()));
|
||||||
|
|
||||||
log_type = log_types.registerTypePtr(schema);
|
log_type = log_types.registerTypePtr(schema);
|
||||||
log_series.setType(log_type);
|
log_series.setType(log_type);
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
.. bro:id:: test_vector0
|
||||||
|
|
||||||
|
:Type: :bro:type:`vector` of :bro:type:`string`
|
||||||
|
:Default:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
[]
|
||||||
|
|
||||||
|
Yield type is documented/cross-referenced for primitize types.
|
||||||
|
|
||||||
|
.. bro:id:: test_vector1
|
||||||
|
|
||||||
|
:Type: :bro:type:`vector` of :bro:type:`TestRecord`
|
||||||
|
:Default:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
[]
|
||||||
|
|
||||||
|
Yield type is documented/cross-referenced for composite types.
|
||||||
|
|
||||||
|
.. bro:id:: test_vector2
|
||||||
|
|
||||||
|
:Type: :bro:type:`vector` of :bro:type:`vector` of :bro:type:`TestRecord`
|
||||||
|
:Default:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
[]
|
||||||
|
|
||||||
|
Just showing an even fancier yield type.
|
||||||
|
|
20
testing/btest/doc/broxygen/vectors.bro
Normal file
20
testing/btest/doc/broxygen/vectors.bro
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# @TEST-EXEC: bro -b -X broxygen.config %INPUT
|
||||||
|
# @TEST-EXEC: btest-diff autogen-reST-vectors.rst
|
||||||
|
|
||||||
|
@TEST-START-FILE broxygen.config
|
||||||
|
identifier test_vector* autogen-reST-vectors.rst
|
||||||
|
@TEST-END-FILE
|
||||||
|
|
||||||
|
type TestRecord: record {
|
||||||
|
field1: bool;
|
||||||
|
field2: count;
|
||||||
|
};
|
||||||
|
|
||||||
|
## Yield type is documented/cross-referenced for primitize types.
|
||||||
|
global test_vector0: vector of string;
|
||||||
|
|
||||||
|
## Yield type is documented/cross-referenced for composite types.
|
||||||
|
global test_vector1: vector of TestRecord;
|
||||||
|
|
||||||
|
## Just showing an even fancier yield type.
|
||||||
|
global test_vector2: vector of vector of TestRecord;
|
Loading…
Add table
Add a link
Reference in a new issue