|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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((uint8_t*)&payload.prefix.address.af,
48 (uint8_t*)&payload.prefix.address,
49 (uint8_t*)&payload.prefix.len);
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((uint8_t*)&payload.prefix.address.af,
92 (uint8_t*)&payload.prefix.address,
93 (uint8_t*)&payload.prefix.len);
106 std::ostringstream s;
134 auto& payload =
m_dump->get_request().get_payload();
135 payload.sw_if_index = m_itf.
value();
148 return (
"L3-binding-dump");
vapi::Ip_address_dump msg_t
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t wait()
Wait on the commands promise.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
The VPP Object Model (VOM) library.
bool operator==(const dump_v4_cmd &i) const
Comparison operator - only used for UT.
const static rc_t OK
The HW write was successfull.
uint32_t value() const
get the value of the handle
unbind_cmd(HW::item< bool > &item, const handle_t &itf, const route::prefix_t &pfx)
Constructor.
A base class for all RPC commands to VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A functor class that binds the L3 config to the interface.
A cmd class that Dumps all the IPv4 L3 configs.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Ip_address_dump > m_dump
The VAPI event registration.
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.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
bool operator==(const bind_cmd &i) const
Comparison operator - only used for UT.
A representation of the connection to VPP.
rc_t wait()
Wait for the issue of the command to complete.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
dump_v4_cmd(const handle_t &itf)
Constructor.
A type declaration of an interface handle in VPP.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
vapi::Sw_interface_add_del_address msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
void to_vpp(uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
Convert the prefix into VPP API parameters.
DEFINE_VAPI_MSG_IDS_IP_API_JSON
std::string to_string() const
convert to string format for debug purposes
Error codes that VPP will return during a HW write.
bind_cmd(HW::item< bool > &item, const handle_t &itf, const route::prefix_t &pfx)
Constructor.
A cmd class that Unbinds L3 Config from an interface.