FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
VOM::pipe Class Reference

A Pipe interface. More...

+ Inheritance diagram for VOM::pipe:
+ Collaboration diagram for VOM::pipe:

Public Types

typedef std::pair< handle_t, handle_thandle_pair_t
 
- 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...
 

Public Member Functions

 pipe (uint32_t instance, admin_state_t state)
 Construct a new object matching the desried state. More...
 
 ~pipe ()
 Destructor. More...
 
 pipe (const pipe &o)
 Copy Constructor. More...
 
bool operator== (const pipe &s) const
 comparison operator - for UT More...
 
std::shared_ptr< pipesingular () const
 Return the matching 'singular instance' of the sub-interface. More...
 
std::shared_ptr< interfaceeast ()
 The interface that is the east end of the pipe. More...
 
std::shared_ptr< interfacewest ()
 The interface that is the west end of the pipe. More...
 
virtual std::string to_string (void) const
 convert to string format for debug purposes More...
 
void set_ends (const handle_pair_t &p)
 
- 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...
 
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...
 

Static Public Member Functions

static std::shared_ptr< pipefind (const key_t &k)
 Find a subinterface from its key. 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...
 

Additional Inherited Members

- 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...
 
- 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 Pipe interface.

A pipe is composed for 3 'interfaces'. 1) the 'parent' interface - this is used as the 'key' for the pipe 2) the two 'ends' of the pipe - these are used to RX/TX packets form/to. The ends are retreivable using the east()/west() functions. The east and west end are exactly equivalent, they are merely named differently for logical purposes.

Definition at line 31 of file pipe.hpp.

Member Typedef Documentation

Definition at line 34 of file pipe.hpp.

Constructor & Destructor Documentation

VOM::pipe::pipe ( uint32_t  instance,
admin_state_t  state 
)

Construct a new object matching the desried state.

Definition at line 40 of file pipe.cpp.

VOM::pipe::~pipe ( )

Destructor.

Definition at line 46 of file pipe.cpp.

+ Here is the call graph for this function:

VOM::pipe::pipe ( const pipe o)

Copy Constructor.

Definition at line 52 of file pipe.cpp.

Member Function Documentation

std::shared_ptr< interface > VOM::pipe::east ( )

The interface that is the east end of the pipe.

Definition at line 118 of file pipe.cpp.

+ Here is the call graph for this function:

std::shared_ptr< pipe > VOM::pipe::find ( const key_t k)
static

Find a subinterface from its key.

Definition at line 99 of file pipe.cpp.

bool VOM::pipe::operator== ( const pipe s) const

comparison operator - for UT

void VOM::pipe::set_ends ( const handle_pair_t p)

Definition at line 151 of file pipe.cpp.

+ Here is the call graph for this function:

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

Return the matching 'singular instance' of the sub-interface.

Definition at line 87 of file pipe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

convert to string format for debug purposes

Reimplemented from VOM::interface.

Definition at line 59 of file pipe.cpp.

+ Here is the call graph for this function:

std::shared_ptr< interface > VOM::pipe::west ( )

The interface that is the west end of the pipe.

The east and west end are exactly equivalent, they are merely named differently for logical purposes.

Definition at line 105 of file pipe.cpp.

+ Here is the call graph for this function:


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