VOM: deprecate TAP add ip-punt redirect dump
[vpp.git] / extras / vom / vom / tap_interface_cmds.hpp
index 1c1a346..84720fa 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <vapi/interface.api.vapi.hpp>
 #include <vapi/tap.api.vapi.hpp>
+#include <vapi/tapv2.api.vapi.hpp>
 
 namespace VOM {
 namespace tap_interface_cmds {
@@ -30,13 +31,13 @@ namespace tap_interface_cmds {
 /**
  * A functor class that creates an interface
  */
-class create_cmd : public interface::create_cmd<vapi::Tap_connect>
+class tapv2_create_cmd : public interface::create_cmd<vapi::Tap_create_v2>
 {
 public:
-  create_cmd(HW::item<handle_t>& item,
-             const std::string& name,
-             route::prefix_t& prefix,
-             const l2_address_t& l2_address);
+  tapv2_create_cmd(HW::item<handle_t>& item,
+                   const std::string& name,
+                   const route::prefix_t& prefix,
+                   const l2_address_t& l2_address);
 
   /**
    * Issue the command to VPP/HW
@@ -48,17 +49,17 @@ public:
   std::string to_string() const;
 
 private:
-  route::prefix_t& m_prefix;
+  const route::prefix_t& m_prefix;
   const l2_address_t& m_l2_address;
 };
 
 /**
  * A functor class that deletes a Tap interface
  */
-class delete_cmd : public interface::delete_cmd<vapi::Tap_delete>
+class tapv2_delete_cmd : public interface::delete_cmd<vapi::Tap_delete_v2>
 {
 public:
-  delete_cmd(HW::item<handle_t>& item);
+  tapv2_delete_cmd(HW::item<handle_t>& 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<vapi::Sw_interface_tap_dump>
+class tapv2_dump_cmd : public VOM::dump_cmd<vapi::Sw_interface_tap_v2_dump>
 {
 public:
   /**
    * Default Constructor
    */
-  dump_cmd();
+  tapv2_dump_cmd();
 
   /**
    * Issue the command to VPP/HW
@@ -93,7 +94,7 @@ public:
   /**
    * Comparison operator - only used for UT
    */
-  bool operator==(const dump_cmd& i) const;
+  bool operator==(const tapv2_dump_cmd& i) const;
 };
 
 }; // namespace tap_interface_cmds