X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fdhcp_client_cmds.hpp;fp=extras%2Fvom%2Fvom%2Fdhcp_config_cmds.hpp;h=e7db38f4e3bc7fad1d3d47bd16b44a86eb2ec8d5;hb=daff1784037376f4a5caec2f5975f9b5fc23d5a4;hp=726ff992577fd120f97f9aeeb3979fc7e6ffeddd;hpb=0e969ac8431c80ff4bca5f6985876b1c584eefcd;p=vpp.git diff --git a/extras/vom/vom/dhcp_config_cmds.hpp b/extras/vom/vom/dhcp_client_cmds.hpp similarity index 79% rename from extras/vom/vom/dhcp_config_cmds.hpp rename to extras/vom/vom/dhcp_client_cmds.hpp index 726ff992577..e7db38f4e3b 100644 --- a/extras/vom/vom/dhcp_config_cmds.hpp +++ b/extras/vom/vom/dhcp_client_cmds.hpp @@ -13,17 +13,18 @@ * limitations under the License. */ -#ifndef __VOM_DHCP_CONFIG_CMDS_H__ -#define __VOM_DHCP_CONFIG_CMDS_H__ +#ifndef __VOM_DHCP_CLIENT_CMDS_H__ +#define __VOM_DHCP_CLIENT_CMDS_H__ -#include "vom/dhcp_config.hpp" +#include "vom/dhcp_client.hpp" +#include "vom/dump_cmd.hpp" #include "vom/event_cmd.hpp" #include #include namespace VOM { -namespace dhcp_config_cmds { +namespace dhcp_client_cmds { /** * A command class that binds the DHCP config to the interface @@ -125,7 +126,8 @@ public: /** * Constructor */ - events_cmd(dhcp_config::event_listener& el); + events_cmd(dhcp_client::event_listener& el); + ~events_cmd(); /** * Issue the command to VPP/HW - subscribe to DHCP events @@ -156,11 +158,45 @@ private: /** * The listner of this command */ - dhcp_config::event_listener& m_listener; -}; + dhcp_client::event_listener& m_listener; }; + +/** + * A cmd class that Dumps all the DHCP clients + */ +class dump_cmd : public VOM::dump_cmd +{ +public: + /** + * Constructor + */ + dump_cmd(); + dump_cmd(const dump_cmd& d); + + /** + * Issue the command to VPP/HW + */ + rc_t issue(connection& con); + /** + * convert to string format for debug purposes + */ + std::string to_string() const; + + /** + * Comparison operator - only used for UT + */ + bool operator==(const dump_cmd& i) const; + +private: + /** + * HW reutrn code + */ + HW::item item; }; +}; // namespace dhcp_client_cmds +}; // namespace VOM + /* * fd.io coding-style-patch-verification: ON *