Class that represents an ICMP extension object.
More...
#include <icmp_extension.h>
Class that represents an ICMP extension object.
The type used to store the payload
The type that will be returned when serializing an extensions structure object
Tins::ICMPExtension::ICMPExtension |
( |
uint8_t |
ext_class, |
|
|
uint8_t |
ext_type |
|
) |
| |
Constructor taking class and type.
- Parameters
-
ext_class | The extension class |
ext_type | The extension sub-type |
Tins::ICMPExtension::ICMPExtension |
( |
const uint8_t * |
buffer, |
|
|
uint32_t |
total_sz |
|
) |
| |
Constructs an ICMP extension from a buffer.
- Parameters
-
buffer | The input buffer |
total_sz | The input buffer size |
void Tins::ICMPExtension::extension_class |
( |
uint8_t |
value | ) |
|
Setter for the extension class field.
- Parameters
-
value | The new extension class field value |
uint8_t Tins::ICMPExtension::extension_class |
( |
| ) |
const |
|
inline |
Getter for the extension class field.
- Returns
- The extension class field value
void Tins::ICMPExtension::extension_type |
( |
uint8_t |
value | ) |
|
Setter for the extension sub-type field.
- Parameters
-
value | The new extension sub-type field value |
uint8_t Tins::ICMPExtension::extension_type |
( |
| ) |
const |
|
inline |
Getter for the extension sub-type field.
- Returns
- The extension sub-type field value
void Tins::ICMPExtension::payload |
( |
const payload_type & |
value | ) |
|
Setter for the payload field.
- Parameters
-
value | The new payload field value |
Getter for the extension payload field.
- Returns
- The extension payload field value
void Tins::ICMPExtension::serialize |
( |
uint8_t * |
buffer, |
|
|
uint32_t |
buffer_size |
|
) |
| const |
Serializes this extension into a buffer.
- Parameters
-
buffer | The output buffer in which to store the serialization |
buffer_size | The size of the output buffer |
Serializes this extension object.
- Returns
- The serialized extension
uint32_t Tins::ICMPExtension::size |
( |
| ) |
const |
Gets the size of this ICMP extension.
This returns the basic header size + the payload size
- Returns
- The size of this extension
The documentation for this class was generated from the following files:
- /home/matias/Projects/libtins/code/include/tins/icmp_extension.h
- /home/matias/Projects/libtins/code/src/icmp_extension.cpp