23 : m_itf(itf.singular())
43 bond_enslave.sw_if_index = m_itf->handle().value();
45 bond_enslave.is_long_timeout = (m_rate ==
rate_t::SLOW) ? 1 : 0;
53 s << m_itf->to_string() <<
" mode:" << m_mode.
to_string()
62 return (m_itf->handle() < itf.m_itf->handle());
80 return m_itf->handle();
86 return ((m_itf == b.m_itf) && (m_mode == b.m_mode) && (m_rate == b.m_rate));
96 return (bond_member::mode_t::ACTIVE);
98 return (bond_member::mode_t::PASSIVE);
101 bond_member::mode_t::mode_t(
int v,
const std::string& s)
113 return (bond_member::rate_t::FAST);
115 return (bond_member::rate_t::SLOW);
118 bond_member::rate_t::rate_t(
int v,
const std::string& s)
bool operator==(const bond_member &i) const
equality operator
static const rate_t SLOW
SLOW member interface rate.
bond_member(const interface &itf, mode_t mode, rate_t rate)
Construct a new object matching the desried state.
A template base class for all enum types.
void to_vpp(vapi_payload_bond_enslave &bond_enslave) const
convert to VPP
void bond_enslave(vlib_main_t *vm, bond_enslave_args_t *args)
bool operator<(const bond_member &mem_itf) const
less-than operator
static const rate_t FAST
Fast member interface rate.
static const mode_t ACTIVE
Active member interface mode.
std::string to_string(void) const
convert to string
static const mode_t PASSIVE
Passive member interface mode.
vl_api_tunnel_mode_t mode
static const mode_t from_numeric_val(uint8_t v)
Convert VPP's value of the bond to a mode.
static const rate_t from_numeric_val(uint8_t v)
Convert VPP's value of the bond to a mode.
A representation of an interface in VPP.
A type declaration of an interface handle in VPP.
const std::string & to_string() const
convert to string format for debug purposes
const handle_t hdl(void) const
Get the interface handle.
void set(mode_t mode)
set the mode
The VPP Object Model (VOM) library.