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();
43 payload.sw_if_index = m_itf.
value();
55 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
72 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
78 msg_t req(con.
ctx(), std::ref(*
this));
80 auto& payload = req.get_request().get_payload();
83 payload.sw_if_index = m_itf.
value();
95 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
112 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
118 msg_t req(con.
ctx(), std::ref(*
this));
120 auto& payload = req.get_request().get_payload();
123 payload.sw_if_index = m_itf.
value();
133 std::ostringstream s;
135 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
152 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
158 msg_t req(con.
ctx(), std::ref(*
this));
160 auto& payload = req.get_request().get_payload();
163 payload.sw_if_index = m_itf.
value();
173 std::ostringstream s;
175 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
197 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
209 return (
"nat-44-input-binding-dump");
229 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
241 return (
"nat-44-output-binding-dump");
256 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
262 msg_t req(con.
ctx(), std::ref(*
this));
264 auto& payload = req.get_request().get_payload();
267 payload.sw_if_index = m_itf.
value();
279 std::ostringstream s;
281 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
298 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
304 msg_t req(con.
ctx(), std::ref(*
this));
306 auto& payload = req.get_request().get_payload();
309 payload.sw_if_index = m_itf.
value();
321 std::ostringstream s;
323 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
345 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
357 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