X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvom%2Ftap_interface.cpp;h=1f85ca115078e6ae7a99868511a81838ef35b29e;hb=c58408c0f2db122c5185413ef35fe330551afc2d;hp=d776c486c72b65c780c3af40e23a31b18faaa5f4;hpb=812ed39f9da336310e815c361ab5a9f118657d94;p=vpp.git diff --git a/src/vpp-api/vom/tap_interface.cpp b/src/vpp-api/vom/tap_interface.cpp index d776c486c72..1f85ca11507 100644 --- a/src/vpp-api/vom/tap_interface.cpp +++ b/src/vpp-api/vom/tap_interface.cpp @@ -14,7 +14,7 @@ */ #include "vom/tap_interface.hpp" -#include "vom/cmd.hpp" +#include "vom/tap_interface_cmds.hpp" #include @@ -43,16 +43,6 @@ tap_interface::tap_interface(const std::string& name, { } -tap_interface::tap_interface(const handle_t& hdl, - const std::string& name, - admin_state_t state, - route::prefix_t prefix) - : interface(hdl, l2_address_t::ZERO, name, type_t::TAP, state) - , m_prefix(prefix) - , m_l2_address(l2_address_t::ZERO) -{ -} - tap_interface::~tap_interface() { sweep(); @@ -69,7 +59,8 @@ tap_interface::tap_interface(const tap_interface& o) std::queue& tap_interface::mk_create_cmd(std::queue& q) { - q.push(new create_cmd(m_hdl, name(), m_prefix, m_l2_address)); + q.push( + new tap_interface_cmds::create_cmd(m_hdl, name(), m_prefix, m_l2_address)); return (q); } @@ -77,7 +68,7 @@ tap_interface::mk_create_cmd(std::queue& q) std::queue& tap_interface::mk_delete_cmd(std::queue& q) { - q.push(new delete_cmd(m_hdl)); + q.push(new tap_interface_cmds::delete_cmd(m_hdl)); return (q); } @@ -98,9 +89,10 @@ void tap_interface::event_handler::handle_populate(const client_db::key_t& key) { /* - * dump VPP current states - */ - std::shared_ptr cmd(new tap_interface::dump_cmd()); + * dump VPP current states + */ + std::shared_ptr cmd = + std::make_shared(); HW::enqueue(cmd); HW::write(); @@ -116,10 +108,10 @@ tap_interface::event_handler::handle_populate(const client_db::key_t& key) VOM_LOG(log_level_t::DEBUG) << "tap-dump: " << itf.to_string(); /* - * Write each of the discovered interfaces into the OM, - * but disable the HW Command q whilst we do, so that no - * commands are sent to VPP - */ + * Write each of the discovered interfaces into the OM, + * but disable the HW Command q whilst we do, so that no + * commands are sent to VPP + */ OM::commit(key, itf); } } @@ -145,10 +137,11 @@ tap_interface::event_handler::order() const void tap_interface::event_handler::show(std::ostream& os) { - m_db.dump(os); -} + // dumped by the interface handler } +}; // namespace VOM + /* * fd.io coding-style-patch-verification: ON *