A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::PbbAddressTlv Class Reference

An Address TLV. More...

#include "packetbb.h"

+ Inheritance diagram for ns3::PbbAddressTlv:
+ Collaboration diagram for ns3::PbbAddressTlv:

Public Member Functions

uint8_t GetIndexStart () const
 
uint8_t GetIndexStop () const
 
bool HasIndexStart () const
 Tests whether or not this address TLV has a start index.
 
bool HasIndexStop () const
 Tests whether or not this address TLV has a stop index.
 
bool IsMultivalue () const
 Tests whether or not this address TLV is "multivalue".
 
void SetIndexStart (uint8_t index)
 Sets the index of the first address in the associated address block that this address TLV applies to.
 
void SetIndexStop (uint8_t index)
 Sets the index of the last address in the associated address block that this address TLV applies to.
 
void SetMultivalue (bool isMultivalue)
 Sets whether or not this address TLV is "multivalue".
 
- Public Member Functions inherited from ns3::PbbTlv
 PbbTlv ()
 
virtual ~PbbTlv ()
 
void Deserialize (Buffer::Iterator &start)
 Deserializes a TLV from the specified buffer.
 
uint32_t GetSerializedSize () const
 
uint8_t GetType () const
 
uint8_t GetTypeExt () const
 
Buffer GetValue () const
 
bool HasTypeExt () const
 Tests whether or not this TLV has a type extension.
 
bool HasValue () const
 Tests whether or not this TLV has a value.
 
bool operator!= (const PbbTlv &other) const
 Inequality operator for PbbTlv.
 
bool operator== (const PbbTlv &other) const
 Equality operator for PbbTlv.
 
void Print (std::ostream &os) const
 Pretty-prints the contents of this TLV.
 
void Print (std::ostream &os, int level) const
 Pretty-prints the contents of this TLV, with specified indentation.
 
void Serialize (Buffer::Iterator &start) const
 Serializes this TLV into the specified buffer.
 
void SetType (uint8_t type)
 Sets the type of this TLV.
 
void SetTypeExt (uint8_t type)
 Sets the type extension of this TLV.
 
void SetValue (Buffer start)
 Sets the value of this message to the specified buffer.
 
void SetValue (const uint8_t *buffer, uint32_t size)
 Sets the value of this message to a buffer with the specified data.
 
- Public Member Functions inherited from ns3::SimpleRefCount< PbbTlv >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::PbbTlv
uint8_t GetIndexStart () const
 Get the starting point index.
 
uint8_t GetIndexStop () const
 Get the stop point index.
 
bool HasIndexStart () const
 Checks if there is a starting index.
 
bool HasIndexStop () const
 Checks if there is a stop index.
 
bool IsMultivalue () const
 Check the multivalue parameter.
 
void SetIndexStart (uint8_t index)
 Set an index as starting point.
 
void SetIndexStop (uint8_t index)
 Set an index as stop point.
 
void SetMultivalue (bool isMultivalue)
 Set the multivalue parameter.
 

Detailed Description

An Address TLV.

Definition at line 1853 of file packetbb.h.

Member Function Documentation

◆ GetIndexStart()

uint8_t ns3::PbbAddressTlv::GetIndexStart ( ) const
Returns
the first (inclusive) index of the address in the corresponding address block that this TLV applies to.

Calling this while HasIndexStart is False is undefined. Make sure you check it first. This will be checked by an assert in debug builds.

Definition at line 2992 of file packetbb.cc.

References ns3::PbbTlv::GetIndexStart(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetIndexStop()

uint8_t ns3::PbbAddressTlv::GetIndexStop ( ) const
Returns
the last (inclusive) index of the address in the corresponding PbbAddressBlock that this TLV applies to.

Calling this while HasIndexStop is False is undefined. Make sure you check it first. This will be checked by an assert in debug builds.

Definition at line 3013 of file packetbb.cc.

References ns3::PbbTlv::GetIndexStop(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ HasIndexStart()

bool ns3::PbbAddressTlv::HasIndexStart ( ) const

Tests whether or not this address TLV has a start index.

Returns
true if this address TLV has a start index, false otherwise.

This should be called before calling GetIndexStart to make sure there actually is one.

Definition at line 2999 of file packetbb.cc.

References ns3::PbbTlv::HasIndexStart(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ HasIndexStop()

bool ns3::PbbAddressTlv::HasIndexStop ( ) const

Tests whether or not this address TLV has a stop index.

Returns
true if this address TLV has a stop index, false otherwise.

This should be called before calling GetIndexStop to make sure there actually is one.

Definition at line 3020 of file packetbb.cc.

References ns3::PbbTlv::HasIndexStop(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ IsMultivalue()

bool ns3::PbbAddressTlv::IsMultivalue ( ) const

Tests whether or not this address TLV is "multivalue".

Returns
whether this address TLV is multivalue or not.

Definition at line 3034 of file packetbb.cc.

References ns3::PbbTlv::IsMultivalue(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetIndexStart()

void ns3::PbbAddressTlv::SetIndexStart ( uint8_t index)

Sets the index of the first address in the associated address block that this address TLV applies to.

Parameters
indexthe index of the first address.

Definition at line 2985 of file packetbb.cc.

References NS_LOG_FUNCTION, and ns3::PbbTlv::SetIndexStart().

+ Here is the call graph for this function:

◆ SetIndexStop()

void ns3::PbbAddressTlv::SetIndexStop ( uint8_t index)

Sets the index of the last address in the associated address block that this address TLV applies to.

Parameters
indexthe index of the last address.

Definition at line 3006 of file packetbb.cc.

References NS_LOG_FUNCTION, and ns3::PbbTlv::SetIndexStop().

+ Here is the call graph for this function:

◆ SetMultivalue()

void ns3::PbbAddressTlv::SetMultivalue ( bool isMultivalue)

Sets whether or not this address TLV is "multivalue".

Parameters
isMultivaluewhether or not this address TLV should be multivalue.

If true, this means the value associated with this TLV should be divided evenly into (GetIndexStop() - GetIndexStart() + 1) values. Otherwise, the value is one single value that applies to each address in the range.

Definition at line 3027 of file packetbb.cc.

References NS_LOG_FUNCTION, and ns3::PbbTlv::SetMultivalue().

+ Here is the call graph for this function:

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