21 namespace l3_binding_cmds {
34 return ((m_itf == other.m_itf) && (m_pfx == other.m_pfx));
40 msg_t req(con.
ctx(), std::ref(*
this));
42 auto& payload = req.get_request().get_payload();
43 payload.sw_if_index = m_itf.
value();
47 m_pfx.
to_vpp(&payload.is_ipv6, payload.address, &payload.address_length);
78 return ((m_itf == other.m_itf) && (m_pfx == other.m_pfx));
84 msg_t req(con.
ctx(), std::ref(*
this));
86 auto& payload = req.get_request().get_payload();
87 payload.sw_if_index = m_itf.
value();
91 m_pfx.
to_vpp(&payload.is_ipv6, payload.address, &payload.address_length);
104 std::ostringstream s;
132 auto& payload =
m_dump->get_request().get_payload();
133 payload.sw_if_index = m_itf.
value();
146 return (
"L3-binding-dump");
rc_t issue(connection &con)
Issue the command to VPP/HW.
static const rc_t NOOP
The HW write/update action was/has not been attempted.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
A functor class that binds the L3 config to the interface.
bool operator==(const dump_v4_cmd &i) const
Comparison operator - only used for UT.
uint32_t value() const
get the value of the handle
Error codes that VPP will return during a HW write.
vapi::Ip_address_dump msg_t
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
bind_cmd(HW::item< bool > &item, const handle_t &itf, const route::prefix_t &pfx)
Constructor.
A representation of the connection to VPP.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const unbind_cmd &i) const
Comparison operator - only used for UT.
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.
void to_vpp(uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
Convert the prefix into VPP API parameters.
std::string to_string() const
convert to string format for debug purposes
dump_v4_cmd(const handle_t &itf)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that Unbinds L3 Config from an interface.
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
DEFINE_VAPI_MSG_IDS_IP_API_JSON
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t wait()
Wait for the issue of the command to complete.
A cmd class that Dumps all the IPv4 L3 configs.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
bool operator==(const bind_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.
std::unique_ptr< vapi::Ip_address_dump > m_dump
The VAPI event registration.
vapi::Sw_interface_add_del_address msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes
unbind_cmd(HW::item< bool > &item, const handle_t &itf, const route::prefix_t &pfx)
Constructor.
rc_t wait()
Wait on the commands promise.