7#ifndef OPTION_CLASSLESS_STATIC_ROUTE_H
8#define OPTION_CLASSLESS_STATIC_ROUTE_H
39 bool convenient_notation =
false);
70 std::string
toText(
int indent = 0)
const override;
76 uint16_t
len()
const override;
80 std::vector<StaticRouteTuple> static_routes_;
87 bool convenient_notation_;
95 static std::vector<uint8_t> encodeDestinationDescriptor(
const StaticRouteTuple& route);
107 static uint8_t calcSignificantOctets(
const uint8_t& mask_width);
139 void parseConfigData(
const std::string& config_txt);
Represents DHCPv4 Classless Static Route Option (code 121).
std::string toText(int indent=0) const override
Returns string representation of the option.
OptionPtr clone() const override
Copies this option and returns a pointer to the copy.
void pack(util::OutputBuffer &buf, bool check=true) const override
Writes option in wire-format to a buffer.
void unpack(OptionBufferConstIter begin, OptionBufferConstIter end) override
Parses option from the received buffer.
OptionClasslessStaticRoute(OptionBufferConstIter begin, OptionBufferConstIter end, bool convenient_notation=false)
Constructor of the Option from data in the buffer.
uint16_t len() const override
Returns length of the complete option (data length + DHCPv4 option header)
void check() const
A protected method used for option correctness.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
std::tuple< asiolink::IOAddress, uint8_t, asiolink::IOAddress > StaticRouteTuple
Defines a tuple of Subnet number, Subnet mask width and IPv4 router address.
OptionBuffer::const_iterator OptionBufferConstIter
const_iterator for walking over OptionBuffer
boost::shared_ptr< OptionClasslessStaticRoute > OptionClasslessStaticRoutePtr
A shared pointer to the OptionClasslessStaticRoute object.
boost::shared_ptr< Option > OptionPtr
Defines the logger used by the top-level component of kea-lfc.