base/frameworks/input/readers/ascii.bro

InputAscii

Interface for the ascii input reader.

The defaults are set to match Bro’s ASCII output.

Namespace:InputAscii
Source File:/scripts/base/frameworks/input/readers/ascii.bro

Summary

Redefinable Options

InputAscii::empty_field: string &redef String to use for empty fields.
InputAscii::fail_on_file_problem: bool &redef Fail on file read problems.
InputAscii::fail_on_invalid_lines: bool &redef Fail on invalid lines.
InputAscii::separator: string &redef Separator between fields.
InputAscii::set_separator: string &redef Separator between set and vector elements.
InputAscii::unset_field: string &redef String to use for an unset &optional field.

Detailed Interface

Redefinable Options

InputAscii::empty_field
Type:string
Attributes:&redef
Default:"(empty)"

String to use for empty fields.

InputAscii::fail_on_file_problem
Type:bool
Attributes:&redef
Default:F

Fail on file read problems. If set to true, the ascii input reader will fail when encountering any problems while reading a file different from invalid lines. Examples of such problems are permission problems, or missing files. When set to false, these problems will be ignored. This has an especially big effect for the REREAD mode, which will seamlessly recover from read errors when a file is only temporarily inaccessible. For MANUAL or STREAM files, errors will most likely still be fatal since no automatic re-reading of the file is attempted. Individual readers can use a different value using the $config table. fail_on_file_problem = T was the default behavior until Bro 2.6.

InputAscii::fail_on_invalid_lines
Type:bool
Attributes:&redef
Default:F

Fail on invalid lines. If set to false, the ascii input reader will jump over invalid lines, reporting warnings in reporter.log. If set to true, errors in input lines will be handled as fatal errors for the reader thread; reading will abort immediately and an error will be logged to reporter.log. Individual readers can use a different value using the $config table. fail_on_invalid_lines = T was the default behavior until Bro 2.6.

InputAscii::separator
Type:string
Attributes:&redef
Default:"\x09"

Separator between fields. Please note that the separator has to be exactly one character long.

InputAscii::set_separator
Type:string
Attributes:&redef
Default:","

Separator between set and vector elements. Please note that the separator has to be exactly one character long.

InputAscii::unset_field
Type:string
Attributes:&redef
Default:"-"

String to use for an unset &optional field.

Copyright 2016, The Bro Project. Last updated on December 19, 2018. Created using Sphinx 1.8.2.