X-TraceC++Library
|
A ChainId X-Trace metadata option. More...
#include <XtrOption.h>
Public Member Functions | |
OptionChainId () | |
Creates an empty chainId option. | |
OptionChainId (const u_int8_t *b, size_t *size) | |
Creates a ChainId option from the array. | |
OptionChainId (u_int16_t _id) | |
OptionChainId * | 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_int16_t | getId () const |
void | setId (u_int16_t _id) |
xtr_result | pack (u_int8_t *dest, size_t *size) const |
Writes the binary packed form of this option to the destination. | |
~OptionChainId () |
A ChainId X-Trace metadata option.
xtr::OptionChainId::OptionChainId | ( | ) | [inline] |
Creates an empty chainId option.
Referenced by clone().
xtr::OptionChainId::OptionChainId | ( | const u_int8_t * | b, |
size_t * | size | ||
) |
Creates a ChainId option from the array.
If the type is wrong, size is set to 0 upon return, and the option will serialize to nothing
xtr::OptionChainId::OptionChainId | ( | u_int16_t | _id | ) | [inline] |
xtr::OptionChainId::~OptionChainId | ( | ) | [inline] |
OptionChainId* xtr::OptionChainId::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a newly allocated Option, of the same subtype as the cloned object.
Implements xtr::Option.
References OptionChainId().
u_int16_t xtr::OptionChainId::getId | ( | ) | const [inline] |
u_int8_t xtr::OptionChainId::getLength | ( | ) | const [inline, virtual] |
Returns the length of the payload for this option.
Implements xtr::Option.
u_int8_t xtr::OptionChainId::getSize | ( | ) | const [inline, virtual] |
Returns the size of the options when packed.
Implements xtr::Option.
u_int8_t xtr::OptionChainId::getType | ( | ) | const [inline, virtual] |
xtr_result xtr::OptionChainId::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::OptionChainId::setId | ( | u_int16_t | _id | ) | [inline] |