FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
VOM::bond_interface Class Reference

A bond-interface. More...

+ Inheritance diagram for VOM::bond_interface:
+ Collaboration diagram for VOM::bond_interface:

Data Structures

struct  lb_t
 A bond interface load balance. More...
 
struct  mode_t
 A bond interface mode. More...
 

Public Member Functions

 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. More...
 
 bond_interface (const std::string &name, admin_state_t state, const l2_address_t &l2_address, mode_t mode, lb_t lb=lb_t::UNSPECIFIED)
 
 ~bond_interface ()
 
 bond_interface (const bond_interface &o)
 
std::shared_ptr< bond_interfacesingular () const
 Return the matching 'singular instance' of the BOND interface. More...
 
void set (mode_t mode)
 set the mode More...
 
void set (lb_t lb)
 set the lb More...
 
virtual std::string to_string () const
 convert to string More...
 
- Public Member Functions inherited from VOM::interface
 interface (const std::string &name, type_t type, admin_state_t state, const std::string &tag="")
 Construct a new object matching the desried state. More...
 
 interface (const std::string &name, type_t type, admin_state_t state, const route_domain &rd, const std::string &tag="")
 Construct a new object matching the desried state mapped to a specific route_domain. More...
 
virtual ~interface ()
 Destructor. More...
 
 interface (const interface &o)
 Copy Constructor. More...
 
std::shared_ptr< interfacesingular () const
 Return the matching'singular' of the interface. More...
 
const handle_thandle () const
 Return VPP's handle to this object. More...
 
const type_ttype () const
 Return the interface type. More...
 
const std::string & name () const
 Return the interface type. More...
 
const key_tkey () const
 Return the interface type. More...
 
const l2_address_tl2_address () const
 Return the L2 Address. More...
 
void set (const admin_state_t &state)
 Set the admin state of the interface. More...
 
void set (const l2_address_t &addr)
 Set the L2 Address. More...
 
void set (const oper_state_t &state)
 Set the operational state of the interface, as reported by VPP. More...
 
void set (const std::string &tag)
 Set the tag to the interface. More...
 
const stats_tget_stats (void) const
 Get the interface stats. More...
 
virtual bool operator== (const interface &i) const
 Comparison operator - only used for UT. More...
 
void enable_stats (stat_listener *el, const stats_type_t &st=stats_type_t::NORMAL)
 Enable stats for this interface. More...
 
void disable_stats ()
 Disable stats for this interface. More...
 

Static Public Member Functions

static std::shared_ptr< bond_interfacefind (const handle_t &hdl)
 The the singular instance of the bond interface in the DB by handle. More...
 
- Static Public Member Functions inherited from VOM::interface
static const_iterator_t cbegin ()
 
static const_iterator_t cend ()
 
static std::shared_ptr< interfacefind (const handle_t &h)
 The the singular instance of the interface in the DB by handle. More...
 
static std::shared_ptr< interfacefind (const key_t &k)
 The the singular instance of the interface in the DB by key. More...
 
static void dump (std::ostream &os)
 Dump all interfaces into the stream provided. More...
 
static void enable_events (interface::event_listener &el)
 Enable the reception of events of all interfaces. More...
 
static void disable_events ()
 disable the reception of events of all interfaces More...
 

Protected Member Functions

void set (handle_t &handle)
 set the handle More...
 
- Protected Member Functions inherited from VOM::interface
void set (const handle_t &handle)
 Set the handle of an interface object. More...
 
void release ()
 release/remove an interface form the singular store More...
 
virtual void sweep (void)
 Sweep/reap the object if still stale. More...
 
- Protected Member Functions inherited from VOM::object_base
 object_base ()=default
 Constructable by derived classes only. More...
 
virtual ~object_base ()=default
 Destructor. More...
 

Friends

class interface_factory
 
class OM
 

Additional Inherited Members

- Public Types inherited from VOM::interface
typedef std::string key_t
 The key for interface's key. More...
 
typedef singular_db< const std::string, interface >::const_iterator const_iterator_t
 The iterator type. More...
 
- Static Protected Member Functions inherited from VOM::interface
static void add (const key_t &name, const HW::item< handle_t > &item)
 Add an interface to the DB keyed on handle. More...
 
static void remove (const HW::item< handle_t > &item)
 remove an interface from the DB keyed on handle More...
 
- Protected Attributes inherited from VOM::interface
HW::item< handle_tm_hdl
 The SW interface handle VPP has asigned to the interface. More...
 
- Static Protected Attributes inherited from VOM::interface
static singular_db< key_t, interfacem_db
 A map of all interfaces key against the interface's name. More...
 

Detailed Description

A bond-interface.

e.g. a bond interface

Definition at line 25 of file bond_interface.hpp.

Constructor & Destructor Documentation

◆ bond_interface() [1/3]

VOM::bond_interface::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.

Definition at line 25 of file bond_interface.cpp.

◆ bond_interface() [2/3]

VOM::bond_interface::bond_interface ( const std::string &  name,
admin_state_t  state,
const l2_address_t l2_address,
mode_t  mode,
lb_t  lb = lb_t::UNSPECIFIED 
)

Definition at line 36 of file bond_interface.cpp.

◆ ~bond_interface()

VOM::bond_interface::~bond_interface ( )

Definition at line 48 of file bond_interface.cpp.

+ Here is the call graph for this function:

◆ bond_interface() [3/3]

VOM::bond_interface::bond_interface ( const bond_interface o)

Definition at line 54 of file bond_interface.cpp.

Member Function Documentation

◆ find()

std::shared_ptr< bond_interface > VOM::bond_interface::find ( const handle_t hdl)
static

The the singular instance of the bond interface in the DB by handle.

Definition at line 63 of file bond_interface.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set() [1/3]

void VOM::bond_interface::set ( bond_interface::mode_t  mode)

set the mode

Definition at line 69 of file bond_interface.cpp.

◆ set() [2/3]

void VOM::bond_interface::set ( bond_interface::lb_t  lb)

set the lb

Definition at line 75 of file bond_interface.cpp.

◆ set() [3/3]

void VOM::bond_interface::set ( handle_t handle)
protected

set the handle

Definition at line 121 of file bond_interface.cpp.

+ Here is the call graph for this function:

◆ singular()

std::shared_ptr< bond_interface > VOM::bond_interface::singular ( ) const

Return the matching 'singular instance' of the BOND interface.

Definition at line 109 of file bond_interface.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ to_string()

std::string VOM::bond_interface::to_string ( void  ) const
virtual

convert to string

Reimplemented from VOM::interface.

Definition at line 81 of file bond_interface.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ interface_factory

friend class interface_factory
friend

Definition at line 148 of file bond_interface.hpp.

◆ OM

friend class OM
friend

Definition at line 185 of file bond_interface.hpp.


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