X-TraceC++Library
Public Member Functions
xtr::OptionNop Class Reference

A No-op option for X-Trace, serialized to a single '0' byte. More...

#include <XtrOption.h>

Inheritance diagram for xtr::OptionNop:
xtr::Option

Public Member Functions

 OptionNop ()
 OptionNop (const u_int8_t *b, size_t *size)
OptionNopclone () 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.

Detailed Description

A No-op option for X-Trace, serialized to a single '0' byte.

This option can be used as a space filler or for testing.


Constructor & Destructor Documentation

xtr::OptionNop::OptionNop ( ) [inline]

Referenced by clone().

xtr::OptionNop::OptionNop ( const u_int8_t *  b,
size_t *  size 
)

Member Function Documentation

OptionNop* xtr::OptionNop::clone ( ) const [inline, virtual]

Returns a pointer to a newly allocated Option, of the same subtype as the cloned object.

Implements xtr::Option.

References OptionNop().

u_int8_t xtr::OptionNop::getLength ( ) const [inline, virtual]

Returns the length of the payload for this option.

Implements xtr::Option.

u_int8_t xtr::OptionNop::getSize ( ) const [inline, virtual]

Returns the size of the options when packed.

Implements xtr::Option.

u_int8_t xtr::OptionNop::getType ( ) const [inline, virtual]

Returns the type of this option.

Implements xtr::Option.

References xtr::Option::NOP.

xtr_result xtr::OptionNop::pack ( u_int8_t *  dest,
size_t *  size 
) const [virtual]

Writes the binary packed form of this option to the destination.

Parameters:
destbuffer to write option to
sizeINPUT: maximum safe size to write to dest
OUTPUT: actual number of bytes written
Returns:
XTR_SUCCESS if enough space, XTR_FAIL otherwise

Implements xtr::Option.


The documentation for this class was generated from the following file: