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();
57 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
74 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
80 msg_t req(con.
ctx(), std::ref(*
this));
82 auto& payload = req.get_request().get_payload();
85 payload.sw_if_index = m_itf.
value();
99 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
116 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
122 msg_t req(con.
ctx(), std::ref(*
this));
124 auto& payload = req.get_request().get_payload();
127 payload.sw_if_index = m_itf.
value();
139 std::ostringstream s;
141 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
158 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
164 msg_t req(con.
ctx(), std::ref(*
this));
166 auto& payload = req.get_request().get_payload();
169 payload.sw_if_index = m_itf.
value();
181 std::ostringstream s;
183 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
205 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
217 return (
"nat-44-input-binding-dump");
237 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
249 return (
"nat-44-output-binding-dump");
264 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
270 msg_t req(con.
ctx(), std::ref(*
this));
272 auto& payload = req.get_request().get_payload();
275 payload.sw_if_index = m_itf.
value();
287 std::ostringstream s;
289 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
306 return ((m_itf == other.m_itf) && (m_zone == other.m_zone));
312 msg_t req(con.
ctx(), std::ref(*
this));
314 auto& payload = req.get_request().get_payload();
317 payload.sw_if_index = m_itf.
value();
329 std::ostringstream s;
331 <<
" itf:" << m_itf <<
" " << m_zone.
to_string();
353 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
365 return (
"nat-66-input-binding-dump");
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
bind_44_output_cmd(HW::item< bool > &item, const handle_t &itf, const nat_binding::zone_t &zone)
Constructor.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const unbind_44_output_cmd &i) const
Comparison operator - only used for UT.
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.
std::string to_string() const
convert to string format for debug purposes
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.
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.
HW::item< bool > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A type declaration of an interface handle in VPP.
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.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
bool operator==(const dump_output_44_cmd &i) const
Comparison operator - only used for UT.
The VPP Object Model (VOM) library.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
vapi::Nat44_interface_add_del_feature msg_t
convenient typedef
dump_output_44_cmd()
Constructor.
const std::string & to_string() const
convert to string format for debug purposes
A cmd class that unbinds a NAT configuration from an output interface.
bool operator==(const bind_44_output_cmd &i) const
Comparison operator - only used for UT.
rc_t wait()
Wait on the commands promise.