2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 00:15:17 +00:00

[2312] Implement pack and unpack.

This commit is contained in:
Marcin Siodelski
2012-11-27 13:43:54 +01:00
parent 0a5970240b
commit 276a08d337
3 changed files with 196 additions and 20 deletions

View File

@@ -91,6 +91,7 @@ public:
/// @brief Read a buffer as integer value.
///
/// @param index buffer index.
/// @tparam integer type of a value being returned.
///
/// @throw isc::OutOfRange if index is out of range.
/// @return read integer value.
@@ -161,17 +162,6 @@ public:
/// @return length of the option
virtual uint16_t len();
/// Check if option is valid.
///
/// @return true, if option is valid.
virtual bool valid();
/// Returns pointer to actual data.
///
/// @return pointer to actual data (or reference to an empty vector
/// if there is no data).
virtual const OptionBuffer& getData() { return (data_); }
/// @brief Sets content of this option from buffer.
///
/// Option will be resized to length of buffer.