|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 namespace bond_interface_cmds {
30 , m_l2_address(l2_address)
37 msg_t req(
con.ctx(), std::ref(*
this));
39 auto& payload = req.get_request().get_payload();
42 m_l2_address.
to_bytes(payload.mac_address, 6);
43 payload.use_custom_mac = 1;
46 payload.mode = (vapi_enum_bond_mode)m_mode.
value();
50 payload.lb = (vapi_enum_bond_lb_algo)m_lb.
value();
80 msg_t req(
con.ctx(), std::ref(*
this));
82 auto& payload = req.get_request().get_payload();
128 return (
"bond-itf-dump");
vapi::Sw_interface_bond_dump msg_t
const static l2_address_t ZERO
An all 0's L2 address.
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.
delete_cmd(HW::item< handle_t > &item)
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
uint32_t value() const
get the value of the handle
vl_api_tunnel_mode_t mode
A functor class that deletes a Tap interface.
const static mode_t LACP
LACP bond interface mode.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A bond interface load balance.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Sw_interface_bond_dump > m_dump
The VAPI event registration.
void insert_interface()
add the created interface to the DB
DEFINE_VAPI_MSG_IDS_BOND_API_JSON
const static lb_t UNSPECIFIED
Unspecified bond interface lb.
int value() const
Return the value of the enum - same as integer conversion.
const static mode_t XOR
XOR bond interface mode.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A representation of the connection to VPP.
A functor class that creates an interface.
rc_t wait()
Wait for the issue of the command to complete.
std::string to_string() const
convert to string format for debug purposes
create_cmd(HW::item< handle_t > &item, const std::string &name, const bond_interface::mode_t &mode, const bond_interface::lb_t &lb, const l2_address_t &l2_address)
A representation of an interface in VPP.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
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
A cmd class that Dumps all the Vpp Interfaces.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
vapi::Bond_create msg_t
convenient typedef
rc_t rc() const
Get the HW return code.
Type def of a L2 address as read from VPP.
T & data()
Return the data read/written.
void remove_interface()
remove the deleted interface from the DB
dump_cmd()
Default Constructor.
Error codes that VPP will return during a HW write.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.