aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/nat_binding_cmds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/nat_binding_cmds.cpp')
-rw-r--r--src/vpp-api/vom/nat_binding_cmds.cpp43
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