Dhcpv4Srv::Dhcpv4Srv(uint16_t server_port, uint16_t client_port,
bool run_multithreaded /* = false */,
const bool use_bcast, const bool direct_response_desired)
- : io_service_(new IOService()), shutdown_(true), alloc_engine_(),
- server_port_(server_port), use_bcast_(use_bcast),
- client_port_(client_port),
+ : io_service_(new IOService()), server_port_(server_port),
+ client_port_(client_port), use_bcast_(use_bcast),
+ shutdown_(true), alloc_engine_(),
network_state_(new NetworkState(NetworkState::DHCPv4)),
cb_control_(new CBControlDHCPv4()),
run_multithreaded_(run_multithreaded) {
bool& drop,
bool sanity_only = false) const;
- /// indicates if shutdown is in progress. Setting it to true will
- /// initiate server shutdown procedure.
- volatile bool shutdown_;
-
/// @brief dummy wrapper around IfaceMgr::receive4
///
/// This method is useful for testing purposes, where its replacement
/// UDP port number on which server listens.
uint16_t server_port_;
- /// Should broadcast be enabled on sockets (if true).
- bool use_bcast_;
-
protected:
/// UDP port number to which server sends responses.
uint16_t client_port_;
+ /// Should broadcast be enabled on sockets (if true).
+ bool use_bcast_;
+
+ /// indicates if shutdown is in progress. Setting it to true will
+ /// initiate server shutdown procedure.
+ volatile bool shutdown_;
+
/// @brief Allocation Engine.
/// Pointer to the allocation engine that we are currently using
/// It must be a pointer, because we will support changing engines
Dhcpv6Srv::Dhcpv6Srv(uint16_t server_port, uint16_t client_port,
bool run_multithreaded /* = false */)
: io_service_(new IOService()), server_port_(server_port),
- client_port_(client_port), serverid_(), shutdown_(true),
- alloc_engine_(), name_change_reqs_(),
+ client_port_(client_port), serverid_(),
+ shutdown_(true), alloc_engine_(),
+ name_change_reqs_(),
network_state_(new NetworkState(NetworkState::DHCPv6)),
cb_control_(new CBControlDHCPv6()),
run_multithreaded_(run_multithreaded) {