X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fip_punt_redirect_cmds.hpp;h=22e2a62a23c553f6bfee912fec329d7a3781d1b0;hp=d7408af97ecdd78dbc57afae85fb060a13c7c990;hb=8e1cc46b2bba1ade546d611cdf7b6e48c97d90a1;hpb=b6a47953973f7c94239c394b649100e91bdb2152 diff --git a/extras/vom/vom/ip_punt_redirect_cmds.hpp b/extras/vom/vom/ip_punt_redirect_cmds.hpp index d7408af97ec..22e2a62a23c 100644 --- a/extras/vom/vom/ip_punt_redirect_cmds.hpp +++ b/extras/vom/vom/ip_punt_redirect_cmds.hpp @@ -16,6 +16,7 @@ #ifndef __VOM_IP_PUNT_REDIRECT_CMDS_H__ #define __VOM_IP_PUNT_REDIRECT_CMDS_H__ +#include "vom/dump_cmd.hpp" #include "vom/ip_punt_redirect.hpp" #include "vom/rpc_cmd.hpp" @@ -34,8 +35,8 @@ public: * Constructor */ config_cmd(HW::item& item, - const handle_t& rx_itf, - const handle_t& tx_itf, + const handle_t rx_itf, + const handle_t tx_itf, const boost::asio::ip::address& addr); /** @@ -56,11 +57,11 @@ private: /** * Reference to the interface from which traffic is coming */ - const handle_t& m_rx_itf; + const handle_t m_rx_itf; /** * Reference to the interface where traffic will be redirected */ - const handle_t& m_tx_itf; + const handle_t m_tx_itf; /** * Reference to nexh hop ip address @@ -78,8 +79,8 @@ public: * Constructor */ unconfig_cmd(HW::item& item, - const handle_t& rx_itf, - const handle_t& tx_itf, + const handle_t rx_itf, + const handle_t tx_itf, const boost::asio::ip::address& addr); /** @@ -100,11 +101,11 @@ private: /** * Reference to the interface from which traffic is coming */ - const handle_t& m_rx_itf; + const handle_t m_rx_itf; /** * Reference to the interface where traffic will be redirected */ - const handle_t& m_tx_itf; + const handle_t m_tx_itf; /** * Reference to nexh hop ip address @@ -112,6 +113,38 @@ private: const boost::asio::ip::address& m_addr; }; +/** + * A cmd class that Dumps all the IP punt redirect + */ +class dump_cmd : public VOM::dump_cmd +{ +public: + /** + * Constructor + */ + 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 dump_cmd& i) const; + +private: + /** + * HW reutrn code + */ + HW::item item; +}; + }; // namespace ip_punt_redirect_cmds }; // namespace VOM