ip: Protocol Independent IP Neighbors
[vpp.git] / extras / vom / vom / neighbour_cmds.hpp
index 388dbf1..024a021 100644 (file)
 #define __VOM_NEIGHBOUR_CMDS_H__
 
 #include "vom/dump_cmd.hpp"
+#include "vom/srpc_cmd.hpp"
 #include "neighbour.hpp"
 
-#include <vapi/ip.api.vapi.hpp>
+#include <vapi/ip_neighbor.api.vapi.hpp>
 
 namespace VOM {
 namespace neighbour_cmds {
@@ -27,17 +28,17 @@ namespace neighbour_cmds {
 /**
  * A command class that creates or updates the bridge domain ARP Entry
  */
-class create_cmd : public rpc_cmd<HW::item<bool>,
-                                  vapi::Ip_neighbor_add_del>
+class create_cmd : public srpc_cmd<vapi::Ip_neighbor_add_del>
 {
 public:
   /**
    * Constructor
    */
-  create_cmd(HW::item<bool>& item,
+  create_cmd(HW::item<handle_t>& item,
              handle_t itf,
              const mac_address_t& mac,
-             const boost::asio::ip::address& ip_addr);
+             const boost::asio::ip::address& ip_addr,
+             const neighbour::flags_t &flags);
 
   /**
    * Issue the command to VPP/HW
@@ -58,22 +59,23 @@ private:
   handle_t m_itf;
   mac_address_t m_mac;
   boost::asio::ip::address m_ip_addr;
+  const neighbour::flags_t &m_flags;
 };
 
 /**
  * A cmd class that deletes a bridge domain ARP entry
  */
-class delete_cmd : public rpc_cmd<HW::item<bool>,
-                                  vapi::Ip_neighbor_add_del>
+class delete_cmd : public srpc_cmd<vapi::Ip_neighbor_add_del>
 {
 public:
   /**
    * Constructor
    */
-  delete_cmd(HW::item<bool>& item,
+  delete_cmd(HW::item<handle_t>& item,
              handle_t itf,
              const mac_address_t& mac,
-             const boost::asio::ip::address& ip_addr);
+             const boost::asio::ip::address& ip_addr,
+             const neighbour::flags_t &flags);
 
   /**
    * Issue the command to VPP/HW
@@ -94,6 +96,7 @@ private:
   handle_t m_itf;
   mac_address_t m_mac;
   boost::asio::ip::address m_ip_addr;
+  const neighbour::flags_t &m_flags;
 };
 
 /**