5 #ifndef vnsw_agent_oper_dhcp_options_h_
6 #define vnsw_agent_oper_dhcp_options_h_
8 #include <vnc_cfg_types.h>
11 struct DhcpOptionType;
40 snprintf(len,
sizeof(len),
"%u",
plen_);
41 return prefix_.to_string() +
"/" + std::string(len) +
42 " -> " +
gw_.to_string();
62 for (
unsigned int i = 0; i < host_routes.size(); ++i) {
64 boost::system::error_code ec =
Ip4PrefixParse(host_routes[i].prefix,
66 (
int *)&host_route.
plen_);
67 if (ec || host_route.
plen_ > 32) {
70 host_route.
gw_ = Ip4Address::from_string(host_routes[i].next_hop, ec);
90 #endif // vnsw_agent_oper_dhcp_options_h_
bool are_host_routes_set() const
const std::vector< HostRoute > & host_routes() const
std::string ToString() const
boost::system::error_code Ip4PrefixParse(const string &str, Ip4Address *addr, int *plen)
std::vector< HostRoute > host_routes_
const DhcpOptionsList & dhcp_options() const
bool are_dhcp_options_set() const
virtual ~OperDhcpOptions()
bool operator==(const HostRoute &rhs) const
std::vector< autogen::RouteType > HostOptionsList
bool operator<(const HostRoute &rhs) const
DhcpOptionsList dhcp_options_
OperDhcpOptions(const OperDhcpOptions &options)
boost::asio::ip::address_v4 Ip4Address
void set_host_routes(const HostOptionsList &host_routes)
void update_host_routes(const HostOptionsList &host_routes)
std::vector< autogen::DhcpOptionType > DhcpOptionsList
void set_options(const DhcpOptionsList &options)