42 , m_l2_address(l2_address)
56 , m_l2_address(o.m_l2_address)
62 std::shared_ptr<bond_interface>
92 bond_interface::mk_create_cmd(std::queue<cmd*>& q)
101 bond_interface::mk_delete_cmd(std::queue<cmd*>& q)
108 std::shared_ptr<bond_interface>
114 std::shared_ptr<interface>
115 bond_interface::singular_i()
const 117 return m_db.find_or_add(
name(), *
this);
141 return (bond_interface::mode_t::ROUND_ROBIN);
144 return (bond_interface::mode_t::ACTIVE_BACKUP);
147 return (bond_interface::mode_t::XOR);
150 return (bond_interface::mode_t::BROADCAST);
153 return (bond_interface::mode_t::LACP);
156 return (bond_interface::mode_t::UNSPECIFIED);
159 bond_interface::mode_t::mode_t(
int v,
const std::string& s)
173 return (bond_interface::lb_t::L2);
176 return (bond_interface::lb_t::L34);
179 return (bond_interface::lb_t::L23);
182 return (bond_interface::lb_t::UNSPECIFIED);
185 bond_interface::lb_t::lb_t(
int v,
const std::string& s)
static const mode_t BROADCAST
Broadcast bond interface mode.
void release()
release/remove an interface form the singular store
A template base class for all enum types.
static std::shared_ptr< interface > find(const handle_t &h)
The the singular instance of the interface in the DB by handle.
HW::item< handle_t > m_hdl
The SW interface handle VPP has asigned to the interface.
A functor class that deletes a Tap interface.
virtual void sweep(void)
Sweep/reap the object if still stale.
static const mode_t XOR
XOR bond interface mode.
void set(const admin_state_t &state)
Set the admin state of the interface.
std::shared_ptr< bond_interface > singular() const
Return the matching 'singular instance' of the BOND interface.
static const lb_t from_numeric_val(uint8_t v)
Convert VPP's value of the bond to a lb.
const handle_t & handle() const
Return VPP's handle to this object.
A bond interface load balance.
Type def of a L2 address as read from VPP.
void set(mode_t mode)
set the mode
static const mode_t LACP
LACP bond interface mode.
static singular_db< key_t, interface > m_db
A map of all interfaces key against the interface's name.
vhost_vring_state_t state
virtual std::string to_string() const
convert to string
const l2_address_t & l2_address() const
Return the L2 Address.
bond_interface(const std::string &name, admin_state_t state, mode_t mode, lb_t lb=lb_t::UNSPECIFIED)
Construct a new object matching the desried state.
static const mode_t UNSPECIFIED
Unspecificed bond interface mode.
A functor class that creates an interface.
static const mode_t ACTIVE_BACKUP
Active-backup bond interface mode.
The admin state of the interface.
A representation of an interface in VPP.
static const lb_t L34
L34 bond interface lb.
A type declaration of an interface handle in VPP.
static const lb_t UNSPECIFIED
Unspecificed bond interface lb.
const std::string & name() const
Return the interface type.
static const lb_t L23
L23 bond interface lb.
The VPP Object Model (VOM) library.
static const mode_t ROUND_ROBIN
Round-Robin bond interface mode.
static std::shared_ptr< bond_interface > find(const handle_t &hdl)
The the singular instance of the bond interface in the DB by handle.
const std::string & to_string() const
convert to string format for debug purposes
static const mode_t from_numeric_val(uint8_t v)
Convert VPP's value of the bond to a mode.
virtual std::string to_string(void) const
convert to string format for debug purposes
static const lb_t L2
L2 bond interface lb.