FD.io VPP  v21.01.1
Vector Packet Processing
VOM::interface_cmds::set_mac_cmd Class Reference

A command class that changes the MAC address on an interface. More...

+ Inheritance diagram for VOM::interface_cmds::set_mac_cmd:
+ Collaboration diagram for VOM::interface_cmds::set_mac_cmd:

Public Member Functions

 set_mac_cmd (HW::item< l2_address_t > &item, const HW::item< handle_t > &h)
 Constructor taking the HW::item to update and the handle of the interface. More...
 
rc_t issue (connection &con)
 Issue the command to VPP/HW. More...
 
std::string to_string () const
 convert to string format for debug purposes More...
 
bool operator== (const set_mac_cmd &i) const
 Comparison operator - only used for UT. More...
 
- Public Member Functions inherited from VOM::rpc_cmd< HW::item< l2_address_t >, vapi::Sw_interface_set_mac_address >
 rpc_cmd (HW::item< l2_address_t > &item)
 Constructor taking the HW item that will be updated by the command. More...
 
virtual ~rpc_cmd ()
 Desructor. More...
 
HW::item< l2_address_t > & item ()
 return the HW item the command updates More...
 
const HW::item< l2_address_t > & item () const
 return the const HW item the command updates More...
 
void fulfill (const HW::item< l2_address_t > &d)
 Fulfill the commands promise. More...
 
rc_t wait ()
 Wait on the commands promise. More...
 
virtual void succeeded ()
 Called by the HW Command Q when it is disabled to indicate the command can be considered successful without issuing it to HW. More...
 
virtual vapi_error_e operator() (vapi::Sw_interface_set_mac_address &reply)
 call operator used as a callback by VAPI when the reply is available More...
 
virtual void retire (connection &con)
 Retire/cancel a long running command. More...
 
- Public Member Functions inherited from VOM::cmd
 cmd ()
 Default constructor. More...
 
virtual ~cmd ()
 Virtual destructor. More...
 

Additional Inherited Members

- Public Types inherited from VOM::rpc_cmd< HW::item< l2_address_t >, vapi::Sw_interface_set_mac_address >
typedef vapi::Sw_interface_set_mac_address msg_t
 convenient typedef More...
 
- Protected Attributes inherited from VOM::rpc_cmd< HW::item< l2_address_t >, vapi::Sw_interface_set_mac_address >
HW::item< l2_address_t > & m_hw_item
 A reference to an object's HW::item that the command will update. More...
 
std::promise< HW::item< l2_address_t > > m_promise
 The promise that implements the synchronous issue. More...
 

Detailed Description

A command class that changes the MAC address on an interface.

Definition at line 334 of file interface_cmds.hpp.

Constructor & Destructor Documentation

◆ set_mac_cmd()

VOM::interface_cmds::set_mac_cmd::set_mac_cmd ( HW::item< l2_address_t > &  item,
const HW::item< handle_t > &  h 
)

Constructor taking the HW::item to update and the handle of the interface.

Definition at line 377 of file interface_cmds.cpp.

Member Function Documentation

◆ issue()

rc_t VOM::interface_cmds::set_mac_cmd::issue ( connection con)
virtual

Issue the command to VPP/HW.

Implements VOM::cmd.

Definition at line 391 of file interface_cmds.cpp.

+ Here is the call graph for this function:

◆ operator==()

bool VOM::interface_cmds::set_mac_cmd::operator== ( const set_mac_cmd i) const

Comparison operator - only used for UT.

Definition at line 385 of file interface_cmds.cpp.

◆ to_string()

std::string VOM::interface_cmds::set_mac_cmd::to_string ( void  ) const
virtual

convert to string format for debug purposes

Implements VOM::cmd.

Definition at line 406 of file interface_cmds.cpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: