base/misc/version.bro
-
Version
Provide information about the currently running Bro version.
The most convenient way to access this are the Version::number
and Version::info constants.
Detailed Interface
Constants
-
Version::info
-
{
version_number=20600
major=2
minor=6
patch=0
commit=27
beta=F
debug=F
version_string="2.6-27"
}
VersionDescription record pertaining to the currently running version of Bro.
-
Version::number
-
version number of the currently running version of Bro as a numeric representation.
The format of the number is ABBCC with A being the major version,
bb being the minor version (2 digits) and CC being the patchlevel (2 digits).
As an example, Bro 2.4.1 results in the number 20401
Types
-
Version::VersionDescription
Type: | record
- version_number:
count
Number representing the version which can be used for easy comparison.
The format of the number is ABBCC with A being the major version,
bb being the minor version (2 digits) and CC being the patchlevel (2 digits).
As an example, Bro 2.4.1 results in the number 20401.
- major:
count
Major version number (e.g. 2 for 2.5)
- minor:
count
Minor version number (e.g. 5 for 2.5)
- patch:
count
Patch version number (e.g. 0 for 2.5 or 1 for 2.4.1)
- commit:
count
Commit number for development versions, e.g. 12 for 2.4-12. 0 for non-development versions
- beta:
bool
If set to true, the version is a beta build of Bro
- debug:
bool
If set to true, the version is a debug build
- version_string:
string
String representation of this version
|
A type exactly describing a Bro version
Functions
-
Version::at_least
-
Test if the current running version of Bro is greater or equal to the given version
string.
Version_string: | Version to check against the current running version. |
Returns: | True if running version greater or equal to the given version. |
-
Version::parse
-
Parse a given version string.
Version_string: | Bro version string. |
Returns: | VersionDescription record. |