diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2017-11-03 04:39:05 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-11-06 17:44:21 +0000 |
commit | 9ef1c0adbf9399c55deeede3cf629dd4e8c20304 (patch) | |
tree | 0eeed8f869eee35a48797b6b837c16222a627e46 /src/vpp-api/vom/nat_binding_cmds.cpp | |
parent | addb55b9e0533c5f720b1cc1bdeeb4bbd0e6bf2a (diff) |
VOM reshuffle
split the VOM into two halves; a top/front-end and a bottom/backend.
Only the backend includes the auto-generated VAPI.
This serves two purposes:
1 - improves ompile times for VOM, since the VAPI is included
only in the backend.
2 - does not expose VAPI to users of VOM
Change-Id: I17b93aeaef10c0eba8612016d9034aca5628d9f7
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/nat_binding_cmds.cpp')
-rw-r--r-- | src/vpp-api/vom/nat_binding_cmds.cpp | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/vpp-api/vom/nat_binding_cmds.cpp b/src/vpp-api/vom/nat_binding_cmds.cpp index 38630c13c42..106ec5edac9 100644 --- a/src/vpp-api/vom/nat_binding_cmds.cpp +++ b/src/vpp-api/vom/nat_binding_cmds.cpp @@ -13,12 +13,13 @@ * limitations under the License. */ -#include "vom/nat_binding.hpp" +#include "vom/nat_binding_cmds.hpp" namespace VOM { -nat_binding::bind_44_input_cmd::bind_44_input_cmd(HW::item<bool>& item, - const handle_t& itf, - const zone_t& zone) +namespace nat_binding_cmds { +bind_44_input_cmd::bind_44_input_cmd(HW::item<bool>& item, + const handle_t& itf, + const nat_binding::zone_t& zone) : rpc_cmd(item) , m_itf(itf) , m_zone(zone) @@ -26,19 +27,19 @@ nat_binding::bind_44_input_cmd::bind_44_input_cmd(HW::item<bool>& item, } bool -nat_binding::bind_44_input_cmd::operator==(const bind_44_input_cmd& other) const +bind_44_input_cmd::operator==(const bind_44_input_cmd& other) const { return ((m_itf == other.m_itf) && (m_zone == other.m_zone)); } rc_t -nat_binding::bind_44_input_cmd::issue(connection& con) +bind_44_input_cmd::issue(connection& con) { msg_t req(con.ctx(), std::ref(*this)); auto& payload = req.get_request().get_payload(); payload.is_add = 1; - payload.is_inside = (zone_t::INSIDE == m_zone ? 1 : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -49,7 +50,7 @@ nat_binding::bind_44_input_cmd::issue(connection& con) } std::string -nat_binding::bind_44_input_cmd::to_string() const +bind_44_input_cmd::to_string() const { std::ostringstream s; s << "nat-44-input-binding-create: " << m_hw_item.to_string() @@ -58,9 +59,9 @@ nat_binding::bind_44_input_cmd::to_string() const return (s.str()); } -nat_binding::unbind_44_input_cmd::unbind_44_input_cmd(HW::item<bool>& item, - const handle_t& itf, - const zone_t& zone) +unbind_44_input_cmd::unbind_44_input_cmd(HW::item<bool>& item, + const handle_t& itf, + const nat_binding::zone_t& zone) : rpc_cmd(item) , m_itf(itf) , m_zone(zone) @@ -68,20 +69,19 @@ nat_binding::unbind_44_input_cmd::unbind_44_input_cmd(HW::item<bool>& item, } bool -nat_binding::unbind_44_input_cmd::operator==( - const unbind_44_input_cmd& other) const +unbind_44_input_cmd::operator==(const unbind_44_input_cmd& other) const { return ((m_itf == other.m_itf) && (m_zone == other.m_zone)); } rc_t -nat_binding::unbind_44_input_cmd::issue(connection& con) +unbind_44_input_cmd::issue(connection& con) { msg_t req(con.ctx(), std::ref(*this)); auto& payload = req.get_request().get_payload(); payload.is_add = 0; - payload.is_inside = (zone_t::INSIDE == m_zone ? 1 : 0); + payload.is_inside = (nat_binding::zone_t::INSIDE == m_zone ? 1 : 0); payload.sw_if_index = m_itf.value(); VAPI_CALL(req.execute()); @@ -92,7 +92,7 @@ nat_binding::unbind_44_input_cmd::issue(connection& con) } std::string -nat_binding::unbind_44_input_cmd::to_string() const +unbind_44_input_cmd::to_string() const { std::ostringstream s; s << "nat-44-input-binding-create: " << m_hw_item.to_string() @@ -101,22 +101,22 @@ nat_binding::unbind_44_input_cmd::to_string() const return (s.str()); } -nat_binding::dump_44_cmd::dump_44_cmd() +dump_44_cmd::dump_44_cmd() { } -nat_binding::dump_44_cmd::dump_44_cmd(const dump_44_cmd& d) +dump_44_cmd::dump_44_cmd(const dump_44_cmd& d) { } bool -nat_binding::dump_44_cmd::operator==(const dump_44_cmd& other) const +dump_44_cmd::operator==(const dump_44_cmd& other) const { return (true); } rc_t -nat_binding::dump_44_cmd::issue(connection& con) +dump_44_cmd::issue(connection& con) { m_dump.reset(new msg_t(con.ctx(), std::ref(*this))); @@ -128,11 +128,12 @@ nat_binding::dump_44_cmd::issue(connection& con) } std::string -nat_binding::dump_44_cmd::to_string() const +dump_44_cmd::to_string() const { return ("nat-binding-dump"); } } +} /* * fd.io coding-style-patch-verification: ON |