|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 namespace interface_span_cmds {
28 , m_itf_from(itf_from)
36 return ((m_itf_from == o.m_itf_from) && (m_itf_to == o.m_itf_to) &&
37 (m_state == o.m_state));
43 msg_t req(
con.ctx(), std::ref(*
this));
45 auto& payload = req.get_request().get_payload();
47 payload.sw_if_index_from = m_itf_from.
value();
48 payload.sw_if_index_to = m_itf_to.
value();
49 payload.state = (vapi_enum_span_state)m_state.
value();
71 , m_itf_from(itf_from)
78 return ((m_itf_from == o.m_itf_from) && (m_itf_to == o.m_itf_to));
84 msg_t req(
con.ctx(), std::ref(*
this));
86 auto& payload = req.get_request().get_payload();
88 payload.sw_if_index_from = m_itf_from.
value();
89 payload.sw_if_index_to = m_itf_to.
value();
103 std::ostringstream s;
105 <<
" itf-from:" << m_itf_from.
to_string()
124 auto& payload =
m_dump->get_request().get_payload();
137 return (
"interface-span-dump");
unconfig_cmd(HW::item< bool > &item, const handle_t &itf_from, const handle_t &itf_to)
Constructor.
A command class that configures the interface span.
rc_t issue(connection &con)
Issue the command to VPP/HW.
vapi::Sw_interface_span_dump msg_t
DEFINE_VAPI_MSG_IDS_SPAN_API_JSON
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.
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.
vl_api_dhcp_client_state_t state
config_cmd(HW::item< bool > &item, const handle_t &itf_from, const handle_t &itf_to, const interface_span::state_t &state)
Constructor.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Sw_interface_span_dump > m_dump
The VAPI event registration.
A cmd class that Unconfigs interface span.
The state of the interface - rx/tx or both to be mirrored.
int value() const
Return the value of the enum - same as integer conversion.
A cmd class that Dumps all the interface spans.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
bool operator==(const config_cmd &i) const
Comparison operator - only used for UT.
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.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
vapi::Sw_interface_span_enable_disable msg_t
convenient typedef
const 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
@ SPAN_STATE_API_DISABLED
Error codes that VPP will return during a HW write.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const unconfig_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.