From: Razvan Becheriu Date: Tue, 9 Jul 2019 10:02:27 +0000 (+0300) Subject: updated headers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4c91eddb0668fdc99fde4b89458b4506e5cd117;p=thirdparty%2Fkea.git updated headers --- diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc index 6d55dff10f..7f5dc8a2ba 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc @@ -604,7 +604,7 @@ ControlledDhcpv4Srv::processCommand(const string& command, } isc::data::ConstElementPtr -ControlledDhcpv4Srv::processConfig(isc::data::ConstElementPtr config) { +ControlledDhcpv4Srv::processConfig(ConstElementPtr config) { LOG_DEBUG(dhcp4_logger, DBG_DHCP4_COMMAND, DHCP4_CONFIG_RECEIVED) .arg(config->str()); diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.h b/src/bin/dhcp4/ctrl_dhcp4_srv.h index 0b2a471fac..9c3e752495 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.h +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.h @@ -33,7 +33,7 @@ public: uint16_t client_port = 0); /// @brief Destructor. - ~ControlledDhcpv4Srv(); + virtual ~ControlledDhcpv4Srv(); /// @brief Initializes the server. /// @@ -43,12 +43,12 @@ public: /// This method may throw if initialization fails. void init(const std::string& config_file); - /// @brief Loads specific config file + /// @brief Loads specific configuration file /// /// This utility method is called whenever we know a filename of the config /// and need to load it. It calls config-set command once the content of /// the file has been loaded and verified to be a sane JSON configuration. - /// config-set handler will process the config file (load it as current + /// config-set handler will process the config file (apply it as current /// configuration). /// /// @param file_name name of the file to be loaded @@ -73,11 +73,18 @@ public: /// in them. /// /// Currently supported commands are: - /// - config-reload - /// - config-test /// - shutdown /// - libreload + /// - config-reload + /// - config-set + /// - config-get + /// - config-test + /// - dhcp-disable + /// - dhcp-enable + /// - version-get + /// - build-report /// - leases-reclaim + /// - config-write /// ... /// /// @note It never throws. @@ -121,7 +128,6 @@ public: return (server_); } - private: /// @brief Callback that will be called from iface_mgr when data /// is received over control socket. @@ -249,7 +255,6 @@ private: commandDhcpEnableHandler(const std::string& command, isc::data::ConstElementPtr args); - /// @Brief handler for processing 'version-get' command /// /// This handler processes version-get command, which returns @@ -379,7 +384,7 @@ private: /// @brief Static pointer to the sole instance of the DHCP server. /// /// This is required for config and command handlers to gain access to - /// the server + /// the server. Some of them need to be static methods. static ControlledDhcpv4Srv* server_; /// @brief IOService object, used for all ASIO operations. diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index d442cf5bfd..f71c77138c 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -541,7 +541,7 @@ ControlledDhcpv6Srv::commandLeasesReclaimHandler(const string&, } isc::data::ConstElementPtr -ControlledDhcpv6Srv::processCommand(string& command, +ControlledDhcpv6Srv::processCommand(const string& command, ConstElementPtr args) { string txt = args ? args->str() : "(none)"; diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.h b/src/bin/dhcp6/ctrl_dhcp6_srv.h index c859115aa6..9983402b47 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.h +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.h @@ -65,7 +65,7 @@ public: /// @brief Initiates shutdown procedure for the whole DHCPv6 server. void shutdown(); - /// @brief command processor + /// @brief Command processor /// /// This method is uniform for all config backends. It processes received /// command (as a string + JSON arguments). Internally, it's just a @@ -73,11 +73,18 @@ public: /// in them. /// /// Currently supported commands are: + /// - shutdown + /// - libreload /// - config-reload + /// - config-set + /// - config-get /// - config-test + /// - dhcp-disable + /// - dhcp-enable + /// - version-get + /// - build-report /// - leases-reclaim - /// - libreload - /// - shutdown + /// - config-write /// ... /// /// @note It never throws. @@ -89,7 +96,7 @@ public: static isc::data::ConstElementPtr processCommand(const std::string& command, isc::data::ConstElementPtr args); - /// @brief configuration processor + /// @brief Configuration processor /// /// This is a method for handling incoming configuration updates. /// This method should be called by all configuration backends when the @@ -114,7 +121,7 @@ public: isc::data::ConstElementPtr checkConfig(isc::data::ConstElementPtr new_config); - /// @brief returns pointer to the sole instance of Dhcpv6Srv + /// @brief Returns pointer to the sole instance of Dhcpv6Srv /// /// @return server instance (may return NULL, if called before server is spawned) static ControlledDhcpv6Srv* getInstance() { @@ -122,7 +129,6 @@ public: } private: - /// @brief Callback that will be called from iface_mgr when data /// is received over control socket. /// @@ -131,7 +137,7 @@ private: /// (that was sent from some yet unspecified sender). static void sessionReader(void); - /// @brief handler for processing 'shutdown' command + /// @brief Handler for processing 'shutdown' command /// /// This handler processes shutdown command, which initializes shutdown /// procedure. @@ -143,7 +149,7 @@ private: commandShutdownHandler(const std::string& command, isc::data::ConstElementPtr args); - /// @brief handler for processing 'libreload' command + /// @brief Handler for processing 'libreload' command /// /// This handler processes libreload command, which unloads all hook /// libraries and reloads them. @@ -156,7 +162,7 @@ private: commandLibReloadHandler(const std::string& command, isc::data::ConstElementPtr args); - /// @brief handler for processing 'config-reload' command + /// @brief Handler for processing 'config-reload' command /// /// This handler processes config-reload command, which processes /// configuration specified in args parameter. @@ -311,7 +317,6 @@ private: const bool remove_lease, const uint16_t max_unwarned_cycles); - /// @brief Deletes reclaimed leases and reschedules the timer. /// /// This is a wrapper method for @c AllocEngine::deleteExpiredReclaimed6. @@ -336,6 +341,7 @@ private: /// /// If the maximum number of retries has been exhausted an error is logged /// and the server shuts down. + /// /// @param db_reconnect_ctl pointer to the ReconnectCtl containing the /// configured reconnect parameters /// @@ -357,6 +363,8 @@ private: /// /// @param db_reconnect_ctl pointer to the ReconnectCtl containing the /// configured reconnect parameters + /// + /// @return false if reconnect is not configured, true otherwise bool dbLostCallback(db::ReconnectCtlPtr db_reconnect_ctl); /// @brief Callback invoked periodically to fetch configuration updates