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.

Namespace:Version
Imports:base/frameworks/reporter, base/utils/strings.bro
Source File:/scripts/base/misc/version.bro

Summary

Constants

Version::info: Version::VersionDescription VersionDescription record pertaining to the currently running version of Bro.
Version::number: count version number of the currently running version of Bro as a numeric representation.

Types

Version::VersionDescription: record A type exactly describing a Bro version

Functions

Version::at_least: function Test if the current running version of Bro is greater or equal to the given version string.
Version::parse: function Parse a given version string.

Detailed Interface

Constants

Version::info
Type:Version::VersionDescription
Default:
{
   version_number=20500
   major=2
   minor=5
   patch=0
   commit=0
   beta=F
   debug=F
   version_string="2.5-369"
}

VersionDescription record pertaining to the currently running version of Bro.

Version::number
Type:count
Default:20500

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
Type:function (version_string: string) : bool

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
Type:function (version_string: string) : Version::VersionDescription

Parse a given version string.

Version_string:Bro version string.
Returns:VersionDescription record.

Copyright 2016, The Bro Project. Last updated on December 13, 2017. Created using Sphinx 1.5.2.