]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
updated headers
authorRazvan Becheriu <razvan@isc.org>
Tue, 9 Jul 2019 10:02:27 +0000 (13:02 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 15 Jul 2019 12:33:17 +0000 (15:33 +0300)
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/ctrl_dhcp4_srv.h
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/ctrl_dhcp6_srv.h

index 6d55dff10f82af23cc65c01f1847be07fa0611e3..7f5dc8a2baa1c279e23baab512b813dcd5f86637 100644 (file)
@@ -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());
index 0b2a471fac03182ca63b16eb52541abdc0be7379..9c3e7524953ae5a0f2b901ddeb9095bcc2a14910 100644 (file)
@@ -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.
index d442cf5bfd2b92c9a4a2578579503f3fe19c6f45..f71c77138ce9b9b7040e7c6bdf7a0cd4a998669f 100644 (file)
@@ -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)";
 
index c859115aa657e1a02d008f6e7da9fbdc00870118..9983402b47190a2e570ed4d01fefe07a069ca833 100644 (file)
@@ -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