X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Froute_cmds.hpp;h=3c43208f120253af282f90a695bf85dca1f14469;hb=097fa66b986f06281f603767d321ab13ab6c88c3;hp=6db7b5894eff68671899a3843cf5e64e21269c8b;hpb=39baa32186fd3e4b20d9f58afbbfe7b8daebed62;p=vpp.git diff --git a/extras/vom/vom/route_cmds.hpp b/extras/vom/vom/route_cmds.hpp index 6db7b5894ef..3c43208f120 100644 --- a/extras/vom/vom/route_cmds.hpp +++ b/extras/vom/vom/route_cmds.hpp @@ -18,7 +18,7 @@ #include "vom/dump_cmd.hpp" #include "vom/route.hpp" -#include "vom/rpc_cmd.hpp" +#include "vom/srpc_cmd.hpp" #include @@ -29,16 +29,16 @@ namespace ip_route_cmds { /** * A command class that creates or updates the route */ -class update_cmd : public rpc_cmd, vapi::Ip_add_del_route> +class update_cmd : public srpc_cmd { public: /** * Constructor */ - update_cmd(HW::item& item, + update_cmd(HW::item& item, table_id_t id, const prefix_t& prefix, - const path& path); + const path_list_t& pl); /** * Issue the command to VPP/HW @@ -58,22 +58,19 @@ public: private: route::table_id_t m_id; prefix_t m_prefix; - const path m_path; + const path_list_t& m_pl; }; /** * A cmd class that deletes a route */ -class delete_cmd : public rpc_cmd, vapi::Ip_add_del_route> +class delete_cmd : public rpc_cmd, vapi::Ip_route_add_del> { public: /** * Constructor */ - delete_cmd(HW::item& item, - table_id_t id, - const prefix_t& prefix, - const path& path); + delete_cmd(HW::item& item, table_id_t id, const prefix_t& prefix); /** * Issue the command to VPP/HW @@ -93,20 +90,19 @@ public: private: route::table_id_t m_id; prefix_t m_prefix; - const path m_path; }; /** - * A cmd class that Dumps ipv4 fib + * A cmd class that Dumps ip fib routes */ -class dump_v4_cmd : public VOM::dump_cmd +class dump_cmd : public VOM::dump_cmd { public: /** * Constructor */ - dump_v4_cmd(); - dump_v4_cmd(const dump_cmd& d); + dump_cmd(route::table_id_t id, const l3_proto_t& proto); + dump_cmd(const dump_cmd& d); /** * Issue the command to VPP/HW @@ -120,46 +116,15 @@ public: /** * Comparison operator - only used for UT */ - bool operator==(const dump_v4_cmd& i) const; - -private: - /** - * HW reutrn code - */ - HW::item item; -}; - -/** - * A cmd class that Dumps ipv6 fib - */ -class dump_v6_cmd : public VOM::dump_cmd -{ -public: - /** - * Constructor - */ - dump_v6_cmd(); - dump_v6_cmd(const dump_cmd& d); - - /** - * 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_v6_cmd& i) const; + bool operator==(const dump_cmd& i) const; private: /** * HW reutrn code */ HW::item item; + route::table_id_t m_id; + const l3_proto_t& m_proto; }; }; // namespace ip_route_cmds