uint16_t type,
OptionBufferConstIter begin,
OptionBufferConstIter end,
- OpaqueDataTuple::LengthFieldType lenFieldType
- ) {
+ OpaqueDataTuple::LengthFieldType lenFieldType) {
boost::shared_ptr<OptionOpaqueDataTuples>
option(new OptionOpaqueDataTuples(u, type, begin, end, lenFieldType));
OptionBufferConstIter begin,
OptionBufferConstIter end);
- /// @brief Factory to create option with tuple list with explict tuple's length field type.
+ /// @brief Factory to create option with tuple list with explict
+ /// tuple's length field type.
///
/// @param u option universe (V4 or V6).
/// @param type option type.
/// @brief Constructor.
///
- /// This constructor creates an instance of the option using a buffer with
- /// on-wire data. It may throw an exception if the @c unpack method throws.
+ /// This constructor creates an instance of an OpaqueDataTuple option using
+ /// a buffer with on-wire data. This constructor allows to explicitly set
+ /// tuple's length field type.
+ /// It may throw an exception if the @c unpack method throws.
///
/// @param u universe (v4 or v6)
/// @param type option type
private:
/// @brief holds information of explicitly assigned tuple length field.
/// Normally tuple length is evaluated basing on Option's universe.
- /// But there may be cases when e.g. for v4 universe tuple length field is 2 bytes long
- /// (e.g. DHCPv4 SZTP Redirect Option #143 bootstrap-server-list).
- OpaqueDataTuple::LengthFieldType prefLenFieldType = OpaqueDataTuple::LENGTH_EMPTY;
+ /// But there may be cases when e.g. for v4 universe tuple length field
+ /// is 2 bytes long (e.g. DHCPv4 SZTP Redirect Option #143 bootstrap-server-list).
+ OpaqueDataTuple::LengthFieldType prefLenFieldType_ = OpaqueDataTuple::LENGTH_EMPTY;
/// @brief Returns the tuple length field type for the given universe.
///
///
/// @return Tuple length field type for the universe this option belongs to.
OpaqueDataTuple::LengthFieldType getLengthFieldType() const {
- if (prefLenFieldType != OpaqueDataTuple::LENGTH_EMPTY) {
- return (prefLenFieldType);
+ if (prefLenFieldType_ != OpaqueDataTuple::LENGTH_EMPTY) {
+ return (prefLenFieldType_);
}
return (universe_ == Option::V6 ? OpaqueDataTuple::LENGTH_2_BYTES :
OpaqueDataTuple::LENGTH_1_BYTE);