|
X-TraceC++Library
|
This class can represent any option, and is used when we don't have a specific class for an option. More...
#include <XtrOption.h>
Public Member Functions | |
| OptionAny () | |
| OptionAny (const u_int8_t *b, size_t *size) | |
| OptionAny (u_int8_t type, u_int8_t length, const u_int8_t *p) | |
| xtr_result | initFromBytes (const u_int8_t *b, size_t *size) |
| OptionAny * | 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. | |
| xtr_result | pack (u_int8_t *dest, size_t *size) const |
| Writes the binary packed form of this option to the destination. | |
| xtr_result | setType (u_int8_t _type) |
| xtr_result | setLength (u_int8_t _length) |
| u_int8_t * | getPayload () |
This class can represent any option, and is used when we don't have a specific class for an option.
A Nop option is created by the default constructor
| xtr::OptionAny::OptionAny | ( | ) | [inline] |
Referenced by clone().
| xtr::OptionAny::OptionAny | ( | const u_int8_t * | b, |
| size_t * | size | ||
| ) |
| xtr::OptionAny::OptionAny | ( | u_int8_t | type, |
| u_int8_t | length, | ||
| const u_int8_t * | p | ||
| ) |
| OptionAny* xtr::OptionAny::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a newly allocated Option, of the same subtype as the cloned object.
Implements xtr::Option.
References OptionAny().
| u_int8_t xtr::OptionAny::getLength | ( | ) | const [inline, virtual] |
| u_int8_t* xtr::OptionAny::getPayload | ( | ) | [inline] |
| u_int8_t xtr::OptionAny::getSize | ( | ) | const [inline, virtual] |
Returns the size of the options when packed.
Implements xtr::Option.
References getLength(), getType(), and xtr::Option::NOP.
| u_int8_t xtr::OptionAny::getType | ( | ) | const [inline, virtual] |
| xtr_result xtr::OptionAny::initFromBytes | ( | const u_int8_t * | b, |
| size_t * | size | ||
| ) |
| xtr_result xtr::OptionAny::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.
| xtr_result xtr::OptionAny::setLength | ( | u_int8_t | _length | ) |
| xtr_result xtr::OptionAny::setType | ( | u_int8_t | _type | ) |
1.7.5.1