X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Ftap_interface_cmds.hpp;fp=extras%2Fvom%2Fvom%2Ftap_interface_cmds.hpp;h=5651b7cf193ab64c89996d0e41d2fc5980248c47;hb=9aca7b5ee915b8035fb5b690b7520ab155fcb36e;hp=1c1a3468c9b8a1638fc10b48f103b68f0f922edb;hpb=858151ff84848b3803f37983e4fe8bc450cb45ce;p=vpp.git diff --git a/extras/vom/vom/tap_interface_cmds.hpp b/extras/vom/vom/tap_interface_cmds.hpp index 1c1a3468c9b..5651b7cf193 100644 --- a/extras/vom/vom/tap_interface_cmds.hpp +++ b/extras/vom/vom/tap_interface_cmds.hpp @@ -23,6 +23,7 @@ #include #include +#include namespace VOM { namespace tap_interface_cmds { @@ -30,10 +31,10 @@ namespace tap_interface_cmds { /** * A functor class that creates an interface */ -class create_cmd : public interface::create_cmd +class tap_create_cmd : public interface::create_cmd { public: - create_cmd(HW::item& item, + tap_create_cmd(HW::item& item, const std::string& name, route::prefix_t& prefix, const l2_address_t& l2_address); @@ -55,10 +56,10 @@ private: /** * A functor class that deletes a Tap interface */ -class delete_cmd : public interface::delete_cmd +class tap_delete_cmd : public interface::delete_cmd { public: - delete_cmd(HW::item& item); + tap_delete_cmd(HW::item& item); /** * Issue the command to VPP/HW @@ -73,13 +74,13 @@ public: /** * A cmd class that Dumps all the Vpp Interfaces */ -class dump_cmd : public VOM::dump_cmd +class tap_dump_cmd : public VOM::dump_cmd { public: /** * Default Constructor */ - dump_cmd(); + tap_dump_cmd(); /** * Issue the command to VPP/HW @@ -93,7 +94,76 @@ public: /** * Comparison operator - only used for UT */ - bool operator==(const dump_cmd& i) const; + bool operator==(const tap_dump_cmd& i) const; +}; + +/** + * A functor class that creates an interface + */ +class tapv2_create_cmd : public interface::create_cmd +{ +public: + tapv2_create_cmd(HW::item& item, + const std::string& name, + route::prefix_t& prefix, + const l2_address_t& l2_address); + + /** + * Issue the command to VPP/HW + */ + rc_t issue(connection& con); + /** + * convert to string format for debug purposes + */ + std::string to_string() const; + +private: + route::prefix_t& m_prefix; + const l2_address_t& m_l2_address; +}; + +/** + * A functor class that deletes a Tap interface + */ +class tapv2_delete_cmd : public interface::delete_cmd +{ +public: + tapv2_delete_cmd(HW::item& item); + + /** + * Issue the command to VPP/HW + */ + rc_t issue(connection& con); + /** + * convert to string format for debug purposes + */ + std::string to_string() const; +}; + +/** + * A cmd class that Dumps all the Vpp Interfaces + */ +class tapv2_dump_cmd : public VOM::dump_cmd +{ +public: + /** + * Default Constructor + */ + tapv2_dump_cmd(); + + /** + * 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 tapv2_dump_cmd& i) const; }; }; // namespace tap_interface_cmds