AFI
Advanced Forwarding Interface
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AftDataLabel Class Reference

Data class for MPLS labels. More...

#include <AftData.h>

Inheritance diagram for AftDataLabel:
AftData

Public Types

typedef std::shared_ptr
< AftDataLabel
Ptr
 Pointer type for all AftData MPLS labels.
 

Public Member Functions

 AftDataLabel (uint32_t newLabel, bool newBoS, uint8_t newExp, uint8_t newTtl, bool newTtl_propagate, uint8_t newControl_word, bool newControl_word_insert)
 Constructor for MPLS data labels. More...
 
const uint32_t label () const
 
const bool bottom_of_stack () const
 
const uint8_t exp () const
 
const uint8_t ttl () const
 
const bool ttl_propagate () const
 
const bool control_word_insert () const
 
const uint8_t control_word () const
 
virtual uint32_t append (AftDataBytes &aData)
 Append contents of data object to AftDataBytes vector. More...
 
virtual const std::string dataClass () const
 
virtual std::ostream & description (std::ostream &os) const
 Append a description of the data to an output stream. More...
 
- Public Member Functions inherited from AftData
 AftData (uint32_t newBitLength)
 Base constructor for data objects. More...
 
const uint32_t bitLength () const
 
const uint32_t byteLength () const
 
bool operator== (const AftData &aData) const
 Comparator for data. More...
 
virtual int compare (const AftData &aData) const
 Compare data. More...
 

Static Public Member Functions

static AftDataLabel::Ptr create (uint32_t newLabel, bool newBoS, uint8_t newExp, uint8_t newTtl, bool newTtl_propagate)
 Factory constructor for MPLS data labels. More...
 
static AftDataLabel::Ptr create (uint32_t newLabel, bool newBoS, uint8_t newExp, uint8_t newTtl, bool newTtl_propagate, uint8_t newControl_word, bool newControl_word_insert)
 Factory constructor for MPLS data labels. More...
 

Protected Attributes

uint32_t _label
 MPLS label value (20 bits)
 
bool _bottom_of_stack
 True if label is on bottom of stack.
 
uint8_t _exp
 EXP value.
 
uint8_t _ttl
 Time-To-Live value.
 
bool _ttl_propagate
 True if we're propogating TTLs.
 
uint8_t _control_word
 Control word value.
 
bool _control_word_insert
 True if we have to insert a control word.
 
- Protected Attributes inherited from AftData
uint32_t _bitLength
 Size of encapsulated data in bits.
 

Additional Inherited Members

- Protected Member Functions inherited from AftData
void setBitLength (uint32_t newBitLength)
 Set the bitlength of the data. More...
 

Detailed Description

Data class for MPLS labels.

Constructor & Destructor Documentation

AftDataLabel::AftDataLabel ( uint32_t  newLabel,
bool  newBoS,
uint8_t  newExp,
uint8_t  newTtl,
bool  newTtl_propagate,
uint8_t  newControl_word,
bool  newControl_word_insert 
)
inline

Constructor for MPLS data labels.

Parameters
[in]newLabelValue of the 20-bit MPLS label
[in]newBoSTrue if the label is the bottom of the stack
[in]newExpSet to the value of Exp to use
[in]newTtlTime-To-Live value
[in]newTtl_propagateTrue if we're propogating TTLs
[in]newControl_wordControl word value
[in]newControl_word_insertTrue if we have to insert a control word

Member Function Documentation

virtual uint32_t AftDataLabel::append ( AftDataBytes newData)
inlinevirtual

Append contents of data object to AftDataBytes vector.

Parameters
[in]dataReference to AftDataBytes vector to append to

Reimplemented from AftData.

const bool AftDataLabel::bottom_of_stack ( ) const
inline
Returns
Returns true if this label is on the bottom of the stack
const uint8_t AftDataLabel::control_word ( ) const
inline
Returns
returns the value of the control word for the label
const bool AftDataLabel::control_word_insert ( ) const
inline
Returns
Returns true if we're inserting a control word
static AftDataLabel::Ptr AftDataLabel::create ( uint32_t  newLabel,
bool  newBoS,
uint8_t  newExp,
uint8_t  newTtl,
bool  newTtl_propagate 
)
inlinestatic

Factory constructor for MPLS data labels.

Parameters
[in]newLabelValue of the 20-bit MPLS label
[in]newBoSTrue if the label is the bottom of the stack
[in]newExpSet to the value of Exp to use
[in]newTtlTime-To-Live value
[in]newTtl_propagateTrue if we're propogating TTLs
static AftDataLabel::Ptr AftDataLabel::create ( uint32_t  newLabel,
bool  newBoS,
uint8_t  newExp,
uint8_t  newTtl,
bool  newTtl_propagate,
uint8_t  newControl_word,
bool  newControl_word_insert 
)
inlinestatic

Factory constructor for MPLS data labels.

Parameters
[in]newLabelValue of the 20-bit MPLS label
[in]newBoSTrue if the label is the bottom of the stack
[in]newExpSet to the value of Exp to use
[in]newTtlTime-To-Live value
[in]newTtl_propagateTrue if we're propogating TTLs
[in]newControl_wordControl word value
[in]newControl_word_insertTrue if we have to insert a control word
virtual const std::string AftDataLabel::dataClass ( ) const
inlinevirtual
Returns
String description of data type

Reimplemented from AftData.

virtual std::ostream& AftDataLabel::description ( std::ostream &  os) const
inlinevirtual

Append a description of the data to an output stream.

Parameters
[in]osReference to output stream to append description to
Returns
Reference to output stream with text description of data appended

Reimplemented from AftData.

const uint8_t AftDataLabel::exp ( ) const
inline
Returns
Returns the Exp value
const uint32_t AftDataLabel::label ( ) const
inline
Returns
Returns the label used by the data instance
const uint8_t AftDataLabel::ttl ( ) const
inline
Returns
Returns the TTL
const bool AftDataLabel::ttl_propagate ( ) const
inline
Returns
Returns true if we're propogating TTLs

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