19 namespace nat_binding_cmds {
32 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
38 msg_t req(con.
ctx(), std::ref(*
this));
40 auto& payload = req.get_request().get_payload();
42 payload.flags = (vapi_enum_nat_config_flags)(
44 payload.sw_if_index = m_itf.
value();
56 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
73 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
79 msg_t req(con.
ctx(), std::ref(*
this));
81 auto& payload = req.get_request().get_payload();
83 payload.flags = (vapi_enum_nat_config_flags)(
85 payload.sw_if_index = m_itf.
value();
97 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
114 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
120 msg_t req(con.
ctx(), std::ref(*
this));
122 auto& payload = req.get_request().get_payload();
124 payload.flags = (vapi_enum_nat_config_flags)(
126 payload.sw_if_index = m_itf.
value();
136 std::ostringstream s;
138 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
155 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
161 msg_t req(con.
ctx(), std::ref(*
this));
163 auto& payload = req.get_request().get_payload();
165 payload.flags = (vapi_enum_nat_config_flags)(
167 payload.sw_if_index = m_itf.
value();
177 std::ostringstream s;
179 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
201 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
213 return (
"nat-44-input-binding-dump");
233 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
245 return (
"nat-44-output-binding-dump");
260 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
266 msg_t req(con.
ctx(), std::ref(*
this));
268 auto& payload = req.get_request().get_payload();
270 payload.flags = (vapi_enum_nat_config_flags)(
272 payload.sw_if_index = m_itf.
value();
284 std::ostringstream s;
286 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
303 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
309 msg_t req(con.
ctx(), std::ref(*
this));
311 auto& payload = req.get_request().get_payload();
313 payload.flags = (vapi_enum_nat_config_flags)(
315 payload.sw_if_index = m_itf.
value();
327 std::ostringstream s;
329 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
351 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
363 return (
"nat-66-input-binding-dump");
bind_44_output_cmd(HW::item< bool > &item, const handle_t &itf, const nat_binding::zone_t &zone)
Constructor.
uint32_t value() const
get the value of the handle
A functor class that binds a NAT configuration to an output interface.
Error codes that VPP will return during a HW write.
bool operator==(const dump_output_44_cmd &i) const
Comparison operator - only used for UT.
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
static const zone_t INSIDE
Permit Zone.
A representation of the connection to VPP.
A cmd class that Dumps all the nat_statics.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
std::string to_string() const
convert to string format for debug purposes
A type declaration of an interface handle in VPP.
const std::string & to_string() const
convert to string format for debug purposes
static const rc_t OK
The HW write was successfull.
unbind_44_output_cmd(HW::item< bool > &item, const handle_t &itf, const nat_binding::zone_t &zone)
Constructor.
bool operator==(const unbind_44_output_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const bind_44_output_cmd &i) const
Comparison operator - only used for UT.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
dump_output_44_cmd()
Constructor.
std::string to_string() const
convert to string format for debug purposes
A cmd class that unbinds a NAT configuration from an output interface.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
HW::item< bool > & item()
return the HW item the command updates
vapi::Nat44_interface_add_del_feature msg_t
convenient typedef