Convert more redef-able constants to runtime options

This commit is contained in:
Daniel Thayer 2018-08-27 19:38:47 -05:00
parent fd1a23ea66
commit 9bfc01b705
11 changed files with 14 additions and 14 deletions

View file

@ -9,7 +9,7 @@ export {
## The default max size for extracted files (they won't exceed this ## The default max size for extracted files (they won't exceed this
## number of bytes). A value of zero means unlimited. ## number of bytes). A value of zero means unlimited.
const default_limit = 0 &redef; option default_limit = 0;
redef record Files::Info += { redef record Files::Info += {
## Local filename of extracted file. ## Local filename of extracted file.

View file

@ -24,10 +24,10 @@ export {
}; };
## The default input reader used. Defaults to `READER_ASCII`. ## The default input reader used. Defaults to `READER_ASCII`.
const default_reader = READER_ASCII &redef; option default_reader = READER_ASCII;
## The default reader mode used. Defaults to `MANUAL`. ## The default reader mode used. Defaults to `MANUAL`.
const default_mode = MANUAL &redef; option default_mode = MANUAL;
## Separator between fields. ## Separator between fields.
## Please note that the separator has to be exactly one character long. ## Please note that the separator has to be exactly one character long.

View file

@ -7,7 +7,7 @@ module NetControl;
export { export {
## The default priority that is used when creating rules. ## The default priority that is used when creating rules.
const default_priority: int = +0 &redef; option default_priority: int = +0;
## The default priority that is used when using the high-level functions to ## The default priority that is used when using the high-level functions to
## push whitelist entries to the backends (:bro:see:`NetControl::whitelist_address` and ## push whitelist entries to the backends (:bro:see:`NetControl::whitelist_address` and

View file

@ -53,7 +53,7 @@ export {
## utilizing the *identifier* field in :bro:type:`Notice::Info` records. ## utilizing the *identifier* field in :bro:type:`Notice::Info` records.
## Set this to "0secs" to completely disable automated notice ## Set this to "0secs" to completely disable automated notice
## suppression. ## suppression.
const default_suppression_interval = 1hrs &redef; option default_suppression_interval = 1hrs;
## The record type that is used for representing and logging notices. ## The record type that is used for representing and logging notices.
type Info: record { type Info: record {

View file

@ -383,12 +383,12 @@ type connection: record {
## Default amount of time a file can be inactive before the file analysis ## Default amount of time a file can be inactive before the file analysis
## gives up and discards any internal state related to the file. ## gives up and discards any internal state related to the file.
const default_file_timeout_interval: interval = 2 mins &redef; option default_file_timeout_interval: interval = 2 mins;
## Default amount of bytes that file analysis will buffer in order to use ## Default amount of bytes that file analysis will buffer in order to use
## for mime type matching. File analyzers attached at the time of mime type ## for mime type matching. File analyzers attached at the time of mime type
## matching or later, will receive a copy of this buffer. ## matching or later, will receive a copy of this buffer.
const default_file_bof_buffer_size: count = 4096 &redef; option default_file_bof_buffer_size: count = 4096;
## A file that Bro is analyzing. This is Bro's type for describing the basic ## A file that Bro is analyzing. This is Bro's type for describing the basic
## internal metadata collected about a "file", which is essentially just a ## internal metadata collected about a "file", which is essentially just a

View file

@ -22,7 +22,7 @@ export {
## If this variable is set to ``T``, then all contents of all ## If this variable is set to ``T``, then all contents of all
## connections will be extracted. ## connections will be extracted.
const default_extract = F &redef; option default_extract = F;
} }
redef record connection += { redef record connection += {

View file

@ -8,7 +8,7 @@ export {
## This setting changes if passwords used in FTP sessions are ## This setting changes if passwords used in FTP sessions are
## captured or not. ## captured or not.
const default_capture_password = F &redef; option default_capture_password = F;
## The expected endpoints of an FTP data channel. ## The expected endpoints of an FTP data channel.
type ExpectedDataChannel: record { type ExpectedDataChannel: record {

View file

@ -19,7 +19,7 @@ export {
## This setting changes if passwords used in Basic-Auth are captured or ## This setting changes if passwords used in Basic-Auth are captured or
## not. ## not.
const default_capture_password = F &redef; option default_capture_password = F;
## The record type which contains the fields of the HTTP log. ## The record type which contains the fields of the HTTP log.
type Info: record { type Info: record {

View file

@ -7,7 +7,7 @@ export {
redef enum Log::ID += { LOG }; redef enum Log::ID += { LOG };
## Whether passwords are captured or not. ## Whether passwords are captured or not.
const default_capture_password = F &redef; option default_capture_password = F;
## The record type which contains the fields of the SOCKS log. ## The record type which contains the fields of the SOCKS log.
type Info: record { type Info: record {

View file

@ -7,10 +7,10 @@ module ActiveHTTP;
export { export {
## The default timeout for HTTP requests. ## The default timeout for HTTP requests.
const default_max_time = 1min &redef; option default_max_time = 1min;
## The default HTTP method/verb to use for requests. ## The default HTTP method/verb to use for requests.
const default_method = "GET" &redef; option default_method = "GET";
type Response: record { type Response: record {
## Numeric response code from the server. ## Numeric response code from the server.

View file

@ -7,7 +7,7 @@ module Dir;
export { export {
## The default interval this module checks for files in directories when ## The default interval this module checks for files in directories when
## using the :bro:see:`Dir::monitor` function. ## using the :bro:see:`Dir::monitor` function.
const polling_interval = 30sec &redef; option polling_interval = 30sec;
## Register a directory to monitor with a callback that is called ## Register a directory to monitor with a callback that is called
## every time a previously unseen file is seen. If a file is deleted ## every time a previously unseen file is seen. If a file is deleted