1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Add missing member functions to ICMP extension classes

This commit is contained in:
Matias Fontanini
2015-12-14 20:22:50 -08:00
parent 187e7b1ca3
commit 6e026fcb66
3 changed files with 88 additions and 1 deletions

View File

@@ -25,6 +25,11 @@ public:
*/
typedef std::vector<uint8_t> serialization_type;
/**
* \brief Default constructor
*/
ICMPExtension();
/**
* \brief Constructs an ICMP extension from a buffer
*
@@ -33,6 +38,27 @@ public:
*/
ICMPExtension(const uint8_t* buffer, uint32_t total_sz);
/**
* \brief Setter for the extension class field
*
* \param value The new extension class field value
*/
void extension_class(uint8_t value);
/**
* \brief Setter for the extension sub-type field
*
* \param value The new extension sub-type field value
*/
void extension_type(uint8_t value);
/**
* \brief Setter for the payload field
*
* \param value The new payload field value
*/
void payload(const payload_type& value);
/**
* \brief Getter for the extension class field
*
@@ -116,7 +142,14 @@ public:
ICMPExtensionsStructure(const uint8_t* buffer, uint32_t total_sz);
/**
* \brief Setter for the checksum field
* \brief Setter for the version field
*
* \param value The new version field value
*/
void version(small_uint<4> value);
/**
* \brief Setter for the reserved field
*
* \param value The new reserved field value
*/