Class that represents an ICMP extension object.
More...
#include <icmp_extension.h>
|
| ICMPExtension () |
| Default constructor.
|
|
| ICMPExtension (uint8_t ext_class, uint8_t ext_type) |
| Constructor taking class and type.
|
|
| ICMPExtension (const uint8_t *buffer, uint32_t total_sz) |
| Constructs an ICMP extension from a buffer.
|
|
void | extension_class (uint8_t value) |
| Setter for the extension class field.
|
|
void | extension_type (uint8_t value) |
| Setter for the extension sub-type field.
|
|
void | payload (const payload_type &value) |
| Setter for the payload field.
|
|
uint8_t | extension_class () const |
| Getter for the extension class field.
|
|
uint8_t | extension_type () const |
| Getter for the extension sub-type field.
|
|
const payload_type & | payload () const |
| Getter for the extension payload field.
|
|
uint32_t | size () const |
| Gets the size of this ICMP extension.
|
|
void | serialize (uint8_t *buffer, uint32_t buffer_size) const |
| Serializes this extension into a buffer.
|
|
serialization_type | serialize () const |
| Serializes this extension object.
|
|
Class that represents an ICMP extension object.
◆ payload_type
The type used to store the payload
◆ serialization_type
The type that will be returned when serializing an extensions structure object
◆ ICMPExtension() [1/2]
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 |
◆ ICMPExtension() [2/2]
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 |
◆ extension_class() [1/2]
uint8_t Tins::ICMPExtension::extension_class |
( |
| ) |
const |
|
inline |
Getter for the extension class field.
- Returns
- The extension class field value
◆ extension_class() [2/2]
void Tins::ICMPExtension::extension_class |
( |
uint8_t | value | ) |
|
Setter for the extension class field.
- Parameters
-
value | The new extension class field value |
◆ extension_type() [1/2]
uint8_t Tins::ICMPExtension::extension_type |
( |
| ) |
const |
|
inline |
Getter for the extension sub-type field.
- Returns
- The extension sub-type field value
◆ extension_type() [2/2]
void Tins::ICMPExtension::extension_type |
( |
uint8_t | value | ) |
|
Setter for the extension sub-type field.
- Parameters
-
value | The new extension sub-type field value |
◆ payload() [1/2]
Getter for the extension payload field.
- Returns
- The extension payload field value
◆ payload() [2/2]
void Tins::ICMPExtension::payload |
( |
const payload_type & | value | ) |
|
Setter for the payload field.
- Parameters
-
value | The new payload field value |
◆ serialize() [1/2]
Serializes this extension object.
- Returns
- The serialized extension
◆ serialize() [2/2]
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 |
◆ size()
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:
- /builddir/build/BUILD/libtins-4.5-build/libtins-4.5/include/tins/icmp_extension.h
- /builddir/build/BUILD/libtins-4.5-build/libtins-4.5/src/icmp_extension.cpp