7#ifndef OPTION_VENDOR_CLASS_H
8#define OPTION_VENDOR_CLASS_H
15#include <boost/shared_ptr.hpp>
127 return (tuples_.size());
140 bool hasTuple(
const std::string& tuple_str)
const;
143 virtual uint16_t
len()
const;
149 virtual std::string
toText(
int indent = 0)
const;
183 uint16_t getMinimalLength()
const {
Represents a single instance of the opaque data preceded by length.
This class encapsulates DHCPv6 Vendor Class and DHCPv4 V-I Vendor Class options.
virtual std::string toText(int indent=0) const
Returns text representation of the option.
virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end)
Parses buffer holding an option.
OptionVendorClass(Option::Universe u, const uint32_t vendor_id)
Constructor.
OptionPtr clone() const
Copies this option and returns a pointer to the copy.
virtual void pack(isc::util::OutputBuffer &buf, bool check=true) const
Renders option into the buffer in the wire format.
virtual uint16_t len() const
Returns the full length of the option, including option header.
uint32_t getVendorId() const
Returns enterprise id.
void setTuple(const size_t at, const OpaqueDataTuple &tuple)
Replaces tuple at the specified index with a new tuple.
OpaqueDataTuple getTuple(const size_t at) const
Returns opaque data tuple at the specified position.
const TuplesCollection & getTuples() const
Returns collection of opaque data tuples carried in the option.
void addTuple(const OpaqueDataTuple &tuple)
Adds a new opaque data tuple to the option.
size_t getTuplesNum() const
Returns the number of opaque data tuples added to the option.
bool hasTuple(const std::string &tuple_str) const
Checks if the Vendor Class holds the opaque data tuple with the specified string.
std::vector< OpaqueDataTuple > TuplesCollection
Collection of opaque data tuples carried by the option.
Universe
defines option universe DHCPv4 or DHCPv6
Universe getUniverse() const
returns option universe (V4 or V6)
void check() const
A protected method used for option correctness.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
OptionBuffer::const_iterator OptionBufferConstIter
const_iterator for walking over OptionBuffer
boost::shared_ptr< OptionVendorClass > OptionVendorClassPtr
Defines a pointer to the OptionVendorClass.
boost::shared_ptr< Option > OptionPtr
Defines the logger used by the top-level component of kea-lfc.