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();
75 return ((m_itf == o.m_itf) && (m_l3_itf == o.m_l3_itf));
81 msg_t req(con.
ctx(), std::ref(*
this));
83 auto& payload = req.get_request().get_payload();
85 payload.sw_if_index = m_l3_itf.
value();
86 payload.unnumbered_sw_if_index = m_itf.
value();
115 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
117 auto& payload = m_dump->get_request().get_payload();
118 payload.sw_if_index = ~0;
130 return (
"ip-unnumbered-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
A command class that configures the IP unnumbered.
std::string to_string() const
convert to string format for debug purposes
A cmd class that Dumps all the IP unnumbered interfaces.
bool operator==(const config_cmd &i) const
Comparison operator - only used for UT.
uint32_t value() const
get the value of the handle
std::string to_string() const
convert to string format for debug purposes
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
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
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.
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.
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::Sw_interface_set_unnumbered msg_t
convenient typedef
rc_t issue(connection &con)
Issue the command to VPP/HW.