X-TraceC++Library
|
A Severity X-Trace metadata option. More...
#include <XtrOption.h>
Public Types | |
enum | Level { EMERG = 0, ALERT = 1, CRITICAL = 2, ERROR = 3, WARNING = 4, NOTICE = 5, INFO = 6, DEBUG = 7, _ALL = 8, _NONE = 255, _UNSET = 254, _DEFAULT = NOTICE } |
The Severity levels. More... | |
Public Member Functions | |
OptionSeverity () | |
OptionSeverity (const u_int8_t *b, size_t *size) | |
OptionSeverity (u_int8_t s) | |
OptionSeverity * | clone () const |
Returns a pointer to a newly allocated Option, of the same subtype as the cloned object. | |
u_int8_t | getType () const |
Returns the type of this option. | |
u_int8_t | getLength () const |
Returns the length of the payload for this option. | |
u_int8_t | getSize () const |
Returns the size of the options when packed. | |
u_int8_t | getSeverity () const |
void | setSeverity (u_int8_t s) |
xtr_result | pack (u_int8_t *dest, size_t *size) const |
Writes the binary packed form of this option to the destination. |
A Severity X-Trace metadata option.
The Severity levels.
These are the same values and names as defined in the syslog RFC (RCF 3164). The values _ALL, _NONE, _ABSENT, and _DEFAULT are not valid to be carried in the X-Trace metadata, and are only defined in this implementation for internal use.
xtr::OptionSeverity::OptionSeverity | ( | ) | [inline] |
Referenced by clone().
xtr::OptionSeverity::OptionSeverity | ( | const u_int8_t * | b, |
size_t * | size | ||
) |
xtr::OptionSeverity::OptionSeverity | ( | u_int8_t | s | ) | [inline] |
OptionSeverity* xtr::OptionSeverity::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a newly allocated Option, of the same subtype as the cloned object.
Implements xtr::Option.
References OptionSeverity().
u_int8_t xtr::OptionSeverity::getLength | ( | ) | const [inline, virtual] |
Returns the length of the payload for this option.
Implements xtr::Option.
u_int8_t xtr::OptionSeverity::getSeverity | ( | ) | const [inline] |
u_int8_t xtr::OptionSeverity::getSize | ( | ) | const [inline, virtual] |
Returns the size of the options when packed.
Implements xtr::Option.
u_int8_t xtr::OptionSeverity::getType | ( | ) | const [inline, virtual] |
xtr_result xtr::OptionSeverity::pack | ( | u_int8_t * | dest, |
size_t * | size | ||
) | const [virtual] |
Writes the binary packed form of this option to the destination.
dest | buffer to write option to |
size | INPUT: maximum safe size to write to dest OUTPUT: actual number of bytes written |
Implements xtr::Option.
void xtr::OptionSeverity::setSeverity | ( | u_int8_t | s | ) | [inline] |