18 #include <vapi/vpe.api.vapi.hpp> 21 namespace ip_unnumbered_cmds {
35 return ((m_itf == o.m_itf) && (m_l3_itf == o.m_l3_itf));
41 msg_t req(con.
ctx(), std::ref(*
this));
43 auto& payload = req.get_request().get_payload();
45 payload.sw_if_index = m_l3_itf.
value();
46 payload.unnumbered_sw_if_index = m_itf.
value();
77 return ((m_itf == o.m_itf) && (m_l3_itf == o.m_l3_itf));
83 msg_t req(con.
ctx(), std::ref(*
this));
85 auto& payload = req.get_request().get_payload();
87 payload.sw_if_index = m_l3_itf.
value();
88 payload.unnumbered_sw_if_index = m_itf.
value();
101 std::ostringstream s;
static const rc_t NOOP
The HW write/update action was/has not been attempted.
A command class that configures the IP unnumbered.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const config_cmd &i) const
Comparison operator - only used for UT.
uint32_t value() const
get the value of the handle
config_cmd(HW::item< bool > &item, const handle_t &itf, const handle_t &l3_itf)
Constructor.
Error codes that VPP will return during a HW write.
A cmd class that Unconfigs L3 Config from an interface.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
unconfig_cmd(HW::item< bool > &item, const handle_t &itf, const handle_t &l3_itf)
Constructor.
A representation of the connection to VPP.
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.
bool operator==(const unconfig_cmd &i) const
Comparison operator - only used for UT.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
vapi::Sw_interface_set_unnumbered msg_t
convenient typedef
rc_t wait()
Wait on the commands promise.