|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
20 namespace ip_punt_redirect_cmds {
36 return ((m_rx_itf == o.m_rx_itf) && (m_tx_itf == o.m_tx_itf) &&
37 (m_addr == o.m_addr));
43 msg_t req(
con.ctx(), std::ref(*
this));
45 auto& payload = req.get_request().get_payload();
48 payload.punt.rx_sw_if_index = m_rx_itf.
value();
49 payload.punt.tx_sw_if_index = m_tx_itf.
value();
50 to_api(m_addr, payload.punt.nh);
63 <<
" next-hop:" << m_addr;
82 return ((m_rx_itf == o.m_rx_itf) && (m_tx_itf == o.m_tx_itf) &&
83 (m_addr == o.m_addr));
89 msg_t req(
con.ctx(), std::ref(*
this));
91 auto& payload = req.get_request().get_payload();
94 payload.punt.rx_sw_if_index = m_rx_itf.
value();
95 payload.punt.tx_sw_if_index = m_tx_itf.
value();
96 to_api(m_addr, payload.punt.nh);
109 std::ostringstream s;
112 <<
" next-hop:" << m_addr.to_string();
138 return (
"ip-punt-redirect-dump");
vapi::Ip_punt_redirect_dump msg_t
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.
rc_t issue(connection &con)
Issue the command to VPP/HW.
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
uint32_t value() const
get the value of the handle
A base class for all RPC commands to VPP.
unconfig_cmd(HW::item< bool > &item, const handle_t rx_itf, const handle_t tx_itf, const boost::asio::ip::address &addr)
Constructor.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Ip_punt_redirect_dump > m_dump
The VAPI event registration.
bool operator==(const config_cmd &i) const
Comparison operator - only used for UT.
rc_t issue(connection &con)
Issue the command to VPP/HW.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
std::string to_string() const
convert to string format for debug purposes
A representation of the connection to VPP.
std::string to_string() const
convert to string format for debug purposes
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.
A type declaration of an interface handle in VPP.
manual_print typedef address
std::string to_string() const
convert to string format for debug purposes
bool operator==(const unconfig_cmd &i) const
Comparison operator - only used for UT.
A cmd class that Unconfigs Ip punt redirect.
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
vapi::Ip_punt_redirect msg_t
convenient typedef
config_cmd(HW::item< bool > &item, const handle_t rx_itf, const handle_t tx_itf, const boost::asio::ip::address &addr)
Constructor.
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.
A command class that configures the IP punt_redirect.
A cmd class that Dumps all the IP punt redirect.
std::string to_string() const
convert to string format for debug purposes
Error codes that VPP will return during a HW write.
rc_t issue(connection &con)
Issue the command to VPP/HW.