|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
19 #include <vapi/vpe.api.vapi.hpp>
22 namespace sub_interface_cmds {
37 return ((
m_name == other.
m_name) && (m_parent == other.m_parent) &&
38 (m_vlan == other.m_vlan));
44 msg_t req(
con.ctx(), std::ref(*
this));
46 auto& payload = req.get_request().get_payload();
47 payload.sw_if_index = m_parent.
value();
48 payload.vlan_id = m_vlan;
66 <<
" vlan:" << m_vlan;
84 msg_t req(
con.ctx(), std::ref(*
this));
86 auto& payload = req.get_request().get_payload();
101 std::ostringstream s;
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.
delete_cmd(HW::item< handle_t > &item)
Constructor.
uint32_t value() const
get the value of the handle
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
create_cmd(HW::item< handle_t > &item, const std::string &name, const handle_t &parent, uint16_t vlan)
Cstrunctor taking the reference to the parent and the sub-interface's VLAN.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
std::string to_string() const
convert to string format for debug purposes
void insert_interface()
add the created interface to the DB
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A representation of the connection to VPP.
std::string to_string() const
convert to string format for debug purposes
A functor class that creates an interface.
A representation of an interface in VPP.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
A type declaration of an interface handle in VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
vapi::Create_vlan_subif msg_t
convenient typedef
rc_t rc() const
Get the HW return code.
T & data()
Return the data read/written.
void remove_interface()
remove the deleted interface from the DB
A cmd class that Delete an interface.
rc_t issue(connection &con)
Issue the command to VPP/HW.
const std::string & m_name
The name of the interface to be created.
Error codes that VPP will return during a HW write.