FD.io VPP
v18.10-34-gcce845e
Vector Packet Processing
|
A Sub-interface. More...
Public Member Functions | |
sub_interface (const interface &parent, admin_state_t state, vlan_id_t vlan) | |
Construct a new object matching the desried state. More... | |
sub_interface (const interface &parent, admin_state_t state, const route_domain &rd, vlan_id_t vlan) | |
Construct a new object matching the desried state. More... | |
~sub_interface () | |
Destructor. More... | |
sub_interface (const sub_interface &o) | |
Copy Constructor. More... | |
bool | operator== (const sub_interface &s) const |
comparison operator - for UT More... | |
std::shared_ptr< sub_interface > | singular () const |
Return the matching 'singular instance' of the sub-interface. 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< interface > | singular () const |
Return the matching'singular' of the interface. More... | |
virtual std::string | to_string (void) const |
convert to string format for debug purposes More... | |
const handle_t & | handle () const |
Return VPP's handle to this object. More... | |
const type_t & | type () const |
Return the interface type. More... | |
const std::string & | name () const |
Return the interface type. More... | |
const key_t & | key () const |
Return the interface type. More... | |
const l2_address_t & | l2_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< sub_interface > | find (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< interface > | find (const handle_t &h) |
The the singular instance of the interface in the DB by handle. More... | |
static std::shared_ptr< interface > | find (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 | |
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... | |
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_t > | m_hdl |
The SW interface handle VPP has asigned to the interface. More... | |
Static Protected Attributes inherited from VOM::interface | |
static singular_db< key_t, interface > | m_db |
A map of all interfaces key against the interface's name. More... | |
A Sub-interface.
e.g. a VLAN sub-interface on an Ethernet interface
Definition at line 25 of file sub_interface.hpp.
VOM::sub_interface::sub_interface | ( | const interface & | parent, |
admin_state_t | state, | ||
vlan_id_t | vlan | ||
) |
Construct a new object matching the desried state.
Definition at line 23 of file sub_interface.cpp.
VOM::sub_interface::sub_interface | ( | const interface & | parent, |
admin_state_t | state, | ||
const route_domain & | rd, | ||
vlan_id_t | vlan | ||
) |
Construct a new object matching the desried state.
Definition at line 35 of file sub_interface.cpp.
VOM::sub_interface::~sub_interface | ( | ) |
Destructor.
Definition at line 45 of file sub_interface.cpp.
VOM::sub_interface::sub_interface | ( | const sub_interface & | o | ) |
Copy Constructor.
Definition at line 51 of file sub_interface.cpp.
|
static |
Find a subinterface from its key.
Definition at line 101 of file sub_interface.cpp.
bool VOM::sub_interface::operator== | ( | const sub_interface & | s | ) | const |
comparison operator - for UT
Definition at line 59 of file sub_interface.cpp.
std::shared_ptr< sub_interface > VOM::sub_interface::singular | ( | ) | const |
Return the matching 'singular instance' of the sub-interface.
Definition at line 89 of file sub_interface.cpp.