VOM: support for pipes
[vpp.git] / extras / vom / vom / interface_cmds.hpp
index 7a0040d..b646e4e 100644 (file)
@@ -86,30 +86,6 @@ public:
   std::string to_string() const;
 };
 
-/**
-* A command class to create TAP interfaces in VPP
-*/
-class tap_create_cmd : public interface::create_cmd<vapi::Tap_connect>
-{
-public:
-  /**
-   * Constructor taking the HW::item to update
-   * and the name of the interface to create
-   */
-  tap_create_cmd(HW::item<handle_t>& item, const std::string& name);
-  ~tap_create_cmd() = default;
-
-  /**
-   * Issue the command to VPP/HW
-   */
-  rc_t issue(connection& con);
-
-  /**
- * convert to string format for debug purposes
- */
-  std::string to_string() const;
-};
-
 /**
  * A functor class that creates an interface
  */
@@ -178,27 +154,6 @@ public:
   std::string to_string() const;
 };
 
-/**
-* A command class to delete TAP interfaces in VPP
-*/
-class tap_delete_cmd : public interface::delete_cmd<vapi::Tap_delete>
-{
-public:
-  /**
-   * Constructor taking the HW::item to update
-   */
-  tap_delete_cmd(HW::item<handle_t>& 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 functor class that deletes a Vhost interface
  */
@@ -222,7 +177,7 @@ public:
  * A command class to set tag on interfaces
  */
 class set_tag
-  : public rpc_cmd<HW::item<handle_t>, rc_t, vapi::Sw_interface_tag_add_del>
+  : public rpc_cmd<HW::item<handle_t>, vapi::Sw_interface_tag_add_del>
 {
 public:
   /**
@@ -256,7 +211,6 @@ private:
  * A cmd class that changes the admin state
  */
 class state_change_cmd : public rpc_cmd<HW::item<interface::admin_state_t>,
-                                        rc_t,
                                         vapi::Sw_interface_set_flags>
 {
 public:
@@ -291,9 +245,8 @@ private:
 /**
  * A command class that binds an interface to an L3 table
  */
-class set_table_cmd : public rpc_cmd<HW::item<route::table_id_t>,
-                                     rc_t,
-                                     vapi::Sw_interface_set_table>
+class set_table_cmd
+  : public rpc_cmd<HW::item<route::table_id_t>, vapi::Sw_interface_set_table>
 {
 public:
   /**
@@ -334,9 +287,8 @@ private:
 /**
  * A command class that changes the MAC address on an interface
  */
-class set_mac_cmd : public rpc_cmd<HW::item<l2_address_t>,
-                                   rc_t,
-                                   vapi::Sw_interface_set_mac_address>
+class set_mac_cmd
+  : public rpc_cmd<HW::item<l2_address_t>, vapi::Sw_interface_set_mac_address>
 {
 public:
   /**
@@ -372,7 +324,6 @@ private:
  */
 class collect_detail_stats_change_cmd
   : public rpc_cmd<HW::item<interface::stats_type_t>,
-                   rc_t,
                    vapi::Collect_detailed_interface_stats>
 {
 public:
@@ -519,9 +470,7 @@ private:
  * A command class represents our desire to recieve interface stats
  */
 class stats_disable_cmd
-  : public rpc_cmd<HW::item<bool>,
-                   rc_t,
-                   vapi::Want_per_interface_combined_stats>
+  : public rpc_cmd<HW::item<bool>, vapi::Want_per_interface_combined_stats>
 {
 public:
   /**
@@ -603,6 +552,32 @@ public:
    */
   bool operator==(const vhost_dump_cmd& i) const;
 };
+
+/**
+ * A cmd class that Dumps all the Vpp interfaces
+ */
+class af_packet_dump_cmd : public VOM::dump_cmd<vapi::Af_packet_dump>
+{
+public:
+  /**
+   * Default Constructor
+   */
+  af_packet_dump_cmd() = default;
+
+  /**
+   * 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 af_packet_dump_cmd& i) const;
+};
 };
 };
 /*