A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::PbbMessage Class Referenceabstract

A message within a PbbPacket packet. More...

#include "packetbb.h"

+ Inheritance diagram for ns3::PbbMessage:
+ Collaboration diagram for ns3::PbbMessage:

Public Types

typedef std::list< Ptr< PbbAddressBlock > >::iterator AddressBlockIterator
 PbbAddressBlock iterator.
 
typedef std::list< Ptr< PbbAddressBlock > >::const_iterator ConstAddressBlockIterator
 PbbAddressBlock const iterator.
 
typedef std::list< Ptr< PbbTlv > >::const_iterator ConstTlvIterator
 PbbTlv const iterator.
 
typedef std::list< Ptr< PbbTlv > >::iterator TlvIterator
 PbbTlv iterator.
 

Public Member Functions

 PbbMessage ()
 
virtual ~PbbMessage ()
 
Ptr< PbbAddressBlockAddressBlockBack ()
 
const Ptr< PbbAddressBlockAddressBlockBack () const
 
AddressBlockIterator AddressBlockBegin ()
 
ConstAddressBlockIterator AddressBlockBegin () const
 
void AddressBlockClear ()
 Removes all address blocks from this message.
 
bool AddressBlockEmpty () const
 
AddressBlockIterator AddressBlockEnd ()
 
ConstAddressBlockIterator AddressBlockEnd () const
 
AddressBlockIterator AddressBlockErase (AddressBlockIterator first, AddressBlockIterator last)
 Removes all address blocks from [first, last) (includes first, not includes last).
 
AddressBlockIterator AddressBlockErase (AddressBlockIterator position)
 Removes the address block at the specified position.
 
Ptr< PbbAddressBlockAddressBlockFront ()
 
const Ptr< PbbAddressBlockAddressBlockFront () const
 
void AddressBlockPopBack ()
 Removes an address block from the back of this message.
 
void AddressBlockPopFront ()
 Removes an address block from the front of this message.
 
void AddressBlockPushBack (Ptr< PbbAddressBlock > block)
 Appends an address block to the front of this message.
 
void AddressBlockPushFront (Ptr< PbbAddressBlock > block)
 Prepends an address block to the front of this message.
 
int AddressBlockSize () const
 
void Deserialize (Buffer::Iterator &start)
 Deserializes a message from the specified buffer.
 
uint8_t GetHopCount () const
 
uint8_t GetHopLimit () const
 
Address GetOriginatorAddress () const
 
uint16_t GetSequenceNumber () const
 
uint32_t GetSerializedSize () const
 
uint8_t GetType () const
 
bool HasHopCount () const
 Tests whether or not this message has a hop count.
 
bool HasHopLimit () const
 Tests whether or not this message has a hop limit.
 
bool HasOriginatorAddress () const
 Tests whether or not this message has an originator address.
 
bool HasSequenceNumber () const
 Tests whether or not this message has a sequence number.
 
bool operator!= (const PbbMessage &other) const
 Inequality operator for PbbMessage.
 
bool operator== (const PbbMessage &other) const
 Equality operator for PbbMessage.
 
void Print (std::ostream &os) const
 Pretty-prints the contents of this message.
 
void Print (std::ostream &os, int level) const
 Pretty-prints the contents of this message, with specified indentation.
 
void Serialize (Buffer::Iterator &start) const
 Serializes this message into the specified buffer.
 
void SetHopCount (uint8_t hopcount)
 Sets the current number of hops this message has traveled.
 
void SetHopLimit (uint8_t hoplimit)
 Sets the maximum number of hops this message should travel.
 
void SetOriginatorAddress (Address address)
 Sets the address for the node that created this packet.
 
void SetSequenceNumber (uint16_t seqnum)
 Sets the sequence number of this message.
 
void SetType (uint8_t type)
 Sets the type for this message.
 
Ptr< PbbTlvTlvBack ()
 
const Ptr< PbbTlvTlvBack () const
 
TlvIterator TlvBegin ()
 
ConstTlvIterator TlvBegin () const
 
void TlvClear ()
 Removes all message TLVs from this block.
 
bool TlvEmpty () const
 
TlvIterator TlvEnd ()
 
ConstTlvIterator TlvEnd () const
 
TlvIterator TlvErase (TlvIterator first, TlvIterator last)
 Removes all message TLVs from [first, last) (includes first, not includes last).
 
TlvIterator TlvErase (TlvIterator position)
 Removes the message TLV at the specified position.
 
Ptr< PbbTlvTlvFront ()
 
const Ptr< PbbTlvTlvFront () const
 
void TlvPopBack ()
 Removes a message TLV from the back of this message.
 
void TlvPopFront ()
 Removes a message TLV from the front of this message.
 
void TlvPushBack (Ptr< PbbTlv > tlv)
 Appends a message TLV to the back of this message.
 
void TlvPushFront (Ptr< PbbTlv > tlv)
 Prepends a message TLV to the front of this message.
 
int TlvSize () const
 
- Public Member Functions inherited from ns3::SimpleRefCount< PbbMessage >
 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.
 

Static Public Member Functions

static Ptr< PbbMessageDeserializeMessage (Buffer::Iterator &start)
 Deserializes a message, returning the correct object depending on whether it is an IPv4 message or an IPv6 message.
 

Protected Member Functions

virtual Ptr< PbbAddressBlockAddressBlockDeserialize (Buffer::Iterator &start) const =0
 Deserialize an address block.
 
virtual Address DeserializeOriginatorAddress (Buffer::Iterator &start) const =0
 Deserialize the originator address.
 
virtual PbbAddressLength GetAddressLength () const =0
 Returns address length (IPV4 3 or IPV6 15)
 
virtual void PrintOriginatorAddress (std::ostream &os) const =0
 Print the originator address.
 
virtual void SerializeOriginatorAddress (Buffer::Iterator &start) const =0
 Serialize the originator address.
 

Private Attributes

std::list< Ptr< PbbAddressBlock > > m_addressBlockList
 PbbAddressBlock container.
 
PbbAddressLength m_addrSize
 the address size
 
bool m_hasHopCount
 Hop count present.
 
bool m_hasHopLimit
 Hop limit present.
 
bool m_hasOriginatorAddress
 Originator address present.
 
bool m_hasSequenceNumber
 Sequence number present.
 
uint8_t m_hopCount
 Hop count.
 
uint8_t m_hopLimit
 Hop limit.
 
Address m_originatorAddress
 originator address
 
uint16_t m_sequenceNumber
 Sequence number.
 
PbbTlvBlock m_tlvList
 PbbTlvBlock.
 
uint8_t m_type
 the type for this message
 

Detailed Description

A message within a PbbPacket packet.

There may be any number of messages in one packet packet. This is a pure virtual base class, when creating a message, you should instantiate either PbbMessageIpv4 or PbbMessageIpv6.

Definition at line 696 of file packetbb.h.

Member Typedef Documentation

◆ AddressBlockIterator

PbbAddressBlock iterator.

Definition at line 704 of file packetbb.h.

◆ ConstAddressBlockIterator

typedef std::list<Ptr<PbbAddressBlock>>::const_iterator ns3::PbbMessage::ConstAddressBlockIterator

PbbAddressBlock const iterator.

Definition at line 706 of file packetbb.h.

◆ ConstTlvIterator

typedef std::list<Ptr<PbbTlv>>::const_iterator ns3::PbbMessage::ConstTlvIterator

PbbTlv const iterator.

Definition at line 702 of file packetbb.h.

◆ TlvIterator

typedef std::list<Ptr<PbbTlv>>::iterator ns3::PbbMessage::TlvIterator

PbbTlv iterator.

Definition at line 700 of file packetbb.h.

Constructor & Destructor Documentation

◆ PbbMessage()

ns3::PbbMessage::PbbMessage ( )

◆ ~PbbMessage()

ns3::PbbMessage::~PbbMessage ( )
virtual

Definition at line 1024 of file packetbb.cc.

References AddressBlockClear(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddressBlockBack() [1/2]

Ptr< PbbAddressBlock > ns3::PbbMessage::AddressBlockBack ( )
Returns
a smart pointer to the last address block in this message.

Definition at line 1323 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockBack() [2/2]

const Ptr< PbbAddressBlock > ns3::PbbMessage::AddressBlockBack ( ) const
Returns
a const smart pointer to the last address block in this message.

Definition at line 1330 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockBegin() [1/2]

PbbMessage::AddressBlockIterator ns3::PbbMessage::AddressBlockBegin ( )
Returns
an iterator to the first address block in this message.

Definition at line 1267 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

Referenced by AddressBlockClear(), GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ AddressBlockBegin() [2/2]

PbbMessage::ConstAddressBlockIterator ns3::PbbMessage::AddressBlockBegin ( ) const
Returns
a const iterator to the first address block in this message.

Definition at line 1274 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockClear()

void ns3::PbbMessage::AddressBlockClear ( )

Removes all address blocks from this message.

Definition at line 1380 of file packetbb.cc.

References AddressBlockBegin(), AddressBlockEnd(), m_addressBlockList, and NS_LOG_FUNCTION.

Referenced by ~PbbMessage().

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

◆ AddressBlockDeserialize()

virtual Ptr< PbbAddressBlock > ns3::PbbMessage::AddressBlockDeserialize ( Buffer::Iterator & start) const
protectedpure virtual

Deserialize an address block.

Parameters
startthe buffer iterator start
Returns
the deserialized address block

Implemented in ns3::PbbMessageIpv4, and ns3::PbbMessageIpv6.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ AddressBlockEmpty()

bool ns3::PbbMessage::AddressBlockEmpty ( ) const
Returns
true if there are no address blocks in this message, false otherwise.

Definition at line 1302 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockEnd() [1/2]

PbbMessage::AddressBlockIterator ns3::PbbMessage::AddressBlockEnd ( )
Returns
an iterator to the past-the-end address block element in this message.

Definition at line 1281 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

Referenced by AddressBlockClear(), GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ AddressBlockEnd() [2/2]

PbbMessage::ConstAddressBlockIterator ns3::PbbMessage::AddressBlockEnd ( ) const
Returns
a const iterator to the past-the-end address block element in this message.

Definition at line 1288 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockErase() [1/2]

Removes all address blocks from [first, last) (includes first, not includes last).

Parameters
firstan Iterator pointing to the first address block to erase (inclusive).
lastan Iterator pointing to the element past the last address block to erase.
Returns
an iterator pointing to the next address block in the message.

Definition at line 1372 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockErase() [2/2]

PbbMessage::AddressBlockIterator ns3::PbbMessage::AddressBlockErase ( PbbMessage::AddressBlockIterator position)

Removes the address block at the specified position.

Parameters
positionan Iterator pointing to the address block to erase.
Returns
an iterator pointing to the next address block in the message.

Definition at line 1365 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockFront() [1/2]

Ptr< PbbAddressBlock > ns3::PbbMessage::AddressBlockFront ( )
Returns
a smart pointer to the first address block in this message.

Definition at line 1309 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockFront() [2/2]

const Ptr< PbbAddressBlock > ns3::PbbMessage::AddressBlockFront ( ) const
Returns
a const smart pointer to the first address block in this message.

Definition at line 1316 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockPopBack()

void ns3::PbbMessage::AddressBlockPopBack ( )

Removes an address block from the back of this message.

Definition at line 1358 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockPopFront()

void ns3::PbbMessage::AddressBlockPopFront ( )

Removes an address block from the front of this message.

Definition at line 1344 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockPushBack()

void ns3::PbbMessage::AddressBlockPushBack ( Ptr< PbbAddressBlock > block)

Appends an address block to the front of this message.

Parameters
blocka smart pointer to the address block to append.

Definition at line 1351 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ AddressBlockPushFront()

void ns3::PbbMessage::AddressBlockPushFront ( Ptr< PbbAddressBlock > block)

Prepends an address block to the front of this message.

Parameters
blocka smart pointer to the address block to prepend.

Definition at line 1337 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

◆ AddressBlockSize()

int ns3::PbbMessage::AddressBlockSize ( ) const
Returns
the number of address blocks in this message.

Definition at line 1295 of file packetbb.cc.

References m_addressBlockList, and NS_LOG_FUNCTION.

Referenced by operator==().

+ Here is the caller graph for this function:

◆ Deserialize()

void ns3::PbbMessage::Deserialize ( Buffer::Iterator & start)

Deserializes a message from the specified buffer.

Parameters
starta reference to the point in a buffer to begin deserializing.

Users should not need to call this. Blocks will be deserialized by their containing packet.

Definition at line 1515 of file packetbb.cc.

References AddressBlockDeserialize(), AddressBlockPushBack(), ns3::PbbTlvBlock::Deserialize(), DeserializeOriginatorAddress(), m_tlvList, MHAS_HOP_COUNT, MHAS_HOP_LIMIT, MHAS_ORIG, MHAS_SEQ_NUM, NS_LOG_FUNCTION, SetHopCount(), SetHopLimit(), SetOriginatorAddress(), SetSequenceNumber(), and SetType().

+ Here is the call graph for this function:

◆ DeserializeMessage()

Ptr< PbbMessage > ns3::PbbMessage::DeserializeMessage ( Buffer::Iterator & start)
static

Deserializes a message, returning the correct object depending on whether it is an IPv4 message or an IPv6 message.

Parameters
starta reference to the point in a buffer to begin deserializing.
Returns
A pointer to the deserialized message, or 0 on error.

Users should not need to call this. Blocks will be deserialized by their containing packet.

Definition at line 1483 of file packetbb.cc.

References ns3::Create(), ns3::IPV4, ns3::IPV6, and NS_LOG_FUNCTION.

Referenced by ns3::PbbPacket::Deserialize().

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

◆ DeserializeOriginatorAddress()

virtual Address ns3::PbbMessage::DeserializeOriginatorAddress ( Buffer::Iterator & start) const
protectedpure virtual

Deserialize the originator address.

Parameters
startthe buffer iterator start
Returns
the deserialized address

Implemented in ns3::PbbMessageIpv4, and ns3::PbbMessageIpv6.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ GetAddressLength()

PbbAddressLength ns3::PbbMessage::GetAddressLength ( ) const
protectedpure virtual

Returns address length (IPV4 3 or IPV6 15)

Returns message size in bytes - 1 IPv4 = 4 - 1 = 3, IPv6 = 16 - 1 = 15

Returns
Address length (IPV4 3 or IPV6 15)

Implemented in ns3::PbbMessageIpv4, and ns3::PbbMessageIpv6.

Definition at line 1045 of file packetbb.cc.

References m_addrSize, and NS_LOG_FUNCTION.

Referenced by GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ GetHopCount()

uint8_t ns3::PbbMessage::GetHopCount ( ) const
Returns
the current number of hops this message has traveled.

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

Definition at line 1106 of file packetbb.cc.

References HasHopCount(), m_hopCount, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by operator==(), Print(), and Serialize().

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

◆ GetHopLimit()

uint8_t ns3::PbbMessage::GetHopLimit ( ) const
Returns
the maximum number of hops this message should travel.

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

Definition at line 1083 of file packetbb.cc.

References HasHopLimit(), m_hopLimit, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by operator==(), Print(), and Serialize().

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

◆ GetOriginatorAddress()

Address ns3::PbbMessage::GetOriginatorAddress ( ) const
Returns
the address of the node that created this packet.

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

Definition at line 1060 of file packetbb.cc.

References HasOriginatorAddress(), m_originatorAddress, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by operator==(), ns3::PbbMessageIpv4::PrintOriginatorAddress(), ns3::PbbMessageIpv6::PrintOriginatorAddress(), ns3::PbbMessageIpv4::SerializeOriginatorAddress(), and ns3::PbbMessageIpv6::SerializeOriginatorAddress().

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

◆ GetSequenceNumber()

uint16_t ns3::PbbMessage::GetSequenceNumber ( ) const
Returns
the sequence number of this message.

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

Definition at line 1129 of file packetbb.cc.

References HasSequenceNumber(), m_sequenceNumber, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by operator==(), Print(), and Serialize().

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

◆ GetSerializedSize()

uint32_t ns3::PbbMessage::GetSerializedSize ( ) const
Returns
The size (in bytes) needed to serialize this message.

Definition at line 1391 of file packetbb.cc.

References AddressBlockBegin(), AddressBlockEnd(), GetAddressLength(), ns3::PbbTlvBlock::GetSerializedSize(), HasHopCount(), HasHopLimit(), HasOriginatorAddress(), HasSequenceNumber(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetType()

uint8_t ns3::PbbMessage::GetType ( ) const
Returns
the type assigned to this packet

Definition at line 1038 of file packetbb.cc.

References m_type, and NS_LOG_FUNCTION.

Referenced by operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ HasHopCount()

bool ns3::PbbMessage::HasHopCount ( ) const

Tests whether or not this message has a hop count.

Returns
true if this message has a hop limit, false otherwise.

Definition at line 1114 of file packetbb.cc.

References m_hasHopCount, and NS_LOG_FUNCTION.

Referenced by GetHopCount(), GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ HasHopLimit()

bool ns3::PbbMessage::HasHopLimit ( ) const

Tests whether or not this message has a hop limit.

Returns
true if this message has a hop limit, false otherwise.

If this is set, messages should not hop further than this limit.

Definition at line 1091 of file packetbb.cc.

References m_hasHopLimit, and NS_LOG_FUNCTION.

Referenced by GetHopLimit(), GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ HasOriginatorAddress()

bool ns3::PbbMessage::HasOriginatorAddress ( ) const

Tests whether or not this message has an originator address.

Returns
true if this message has an originator address, false otherwise.

Definition at line 1068 of file packetbb.cc.

References m_hasOriginatorAddress, and NS_LOG_FUNCTION.

Referenced by GetOriginatorAddress(), GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ HasSequenceNumber()

bool ns3::PbbMessage::HasSequenceNumber ( ) const

Tests whether or not this message has a sequence number.

Returns
true if this message has a sequence number, false otherwise.

Definition at line 1137 of file packetbb.cc.

References m_hasSequenceNumber, and NS_LOG_FUNCTION.

Referenced by GetSequenceNumber(), GetSerializedSize(), operator==(), Print(), and Serialize().

+ Here is the caller graph for this function:

◆ operator!=()

bool ns3::PbbMessage::operator!= ( const PbbMessage & other) const

Inequality operator for PbbMessage.

Parameters
otherPbbMessage to compare to this one
Returns
true if PbbMessages are not equal

Definition at line 1699 of file packetbb.cc.

◆ operator==()

bool ns3::PbbMessage::operator== ( const PbbMessage & other) const

Equality operator for PbbMessage.

Parameters
otherPbbMessage to compare to this one
Returns
true if PbbMessages are equal

Definition at line 1610 of file packetbb.cc.

References AddressBlockBegin(), AddressBlockEnd(), AddressBlockSize(), GetAddressLength(), GetHopCount(), GetHopLimit(), GetOriginatorAddress(), GetSequenceNumber(), GetType(), HasHopCount(), HasHopLimit(), HasOriginatorAddress(), HasSequenceNumber(), and m_tlvList.

+ Here is the call graph for this function:

◆ Print() [1/2]

void ns3::PbbMessage::Print ( std::ostream & os) const

Pretty-prints the contents of this message.

Parameters
osa stream object to print to.

Definition at line 1557 of file packetbb.cc.

References NS_LOG_FUNCTION, and Print().

Referenced by Print().

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

◆ Print() [2/2]

void ns3::PbbMessage::Print ( std::ostream & os,
int level ) const

Pretty-prints the contents of this message, with specified indentation.

Parameters
osa stream object to print to.
levellevel of indentation.

This probably never needs to be called by users. This is used when recursively printing sub-objects.

Definition at line 1564 of file packetbb.cc.

References AddressBlockBegin(), AddressBlockEnd(), GetAddressLength(), GetHopCount(), GetHopLimit(), GetSequenceNumber(), GetType(), HasHopCount(), HasHopLimit(), HasOriginatorAddress(), HasSequenceNumber(), m_tlvList, NS_LOG_FUNCTION, ns3::PbbTlvBlock::Print(), and PrintOriginatorAddress().

+ Here is the call graph for this function:

◆ PrintOriginatorAddress()

virtual void ns3::PbbMessage::PrintOriginatorAddress ( std::ostream & os) const
protectedpure virtual

Print the originator address.

Parameters
osthe output stream

Implemented in ns3::PbbMessageIpv4, and ns3::PbbMessageIpv6.

Referenced by Print().

+ Here is the caller graph for this function:

◆ Serialize()

void ns3::PbbMessage::Serialize ( Buffer::Iterator & start) const

Serializes this message into the specified buffer.

Parameters
starta reference to the point in a buffer to begin serializing.

Users should not need to call this. Blocks will be deserialized by their containing packet.

Definition at line 1428 of file packetbb.cc.

References AddressBlockBegin(), AddressBlockEnd(), GetAddressLength(), ns3::Buffer::Iterator::GetDistanceFrom(), GetHopCount(), GetHopLimit(), GetSequenceNumber(), GetType(), HasHopCount(), HasHopLimit(), HasOriginatorAddress(), HasSequenceNumber(), m_tlvList, MHAS_HOP_COUNT, MHAS_HOP_LIMIT, MHAS_ORIG, MHAS_SEQ_NUM, ns3::Buffer::Iterator::Next(), NS_LOG_FUNCTION, ns3::PbbTlvBlock::Serialize(), SerializeOriginatorAddress(), ns3::Buffer::Iterator::WriteHtonU16(), and ns3::Buffer::Iterator::WriteU8().

+ Here is the call graph for this function:

◆ SerializeOriginatorAddress()

virtual void ns3::PbbMessage::SerializeOriginatorAddress ( Buffer::Iterator & start) const
protectedpure virtual

Serialize the originator address.

Parameters
startthe buffer iterator start

Implemented in ns3::PbbMessageIpv4, and ns3::PbbMessageIpv6.

Referenced by Serialize().

+ Here is the caller graph for this function:

◆ SetHopCount()

void ns3::PbbMessage::SetHopCount ( uint8_t hopcount)

Sets the current number of hops this message has traveled.

Parameters
hopcountthe current number of hops

Definition at line 1098 of file packetbb.cc.

References m_hasHopCount, m_hopCount, and NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ SetHopLimit()

void ns3::PbbMessage::SetHopLimit ( uint8_t hoplimit)

Sets the maximum number of hops this message should travel.

Parameters
hoplimitthe limit to set

Definition at line 1075 of file packetbb.cc.

References m_hasHopLimit, m_hopLimit, and NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ SetOriginatorAddress()

void ns3::PbbMessage::SetOriginatorAddress ( Address address)

Sets the address for the node that created this packet.

Parameters
addressthe originator address.

Definition at line 1052 of file packetbb.cc.

References m_hasOriginatorAddress, m_originatorAddress, and NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ SetSequenceNumber()

void ns3::PbbMessage::SetSequenceNumber ( uint16_t seqnum)

Sets the sequence number of this message.

Parameters
seqnumthe sequence number to set.

Definition at line 1121 of file packetbb.cc.

References m_hasSequenceNumber, m_sequenceNumber, and NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ SetType()

void ns3::PbbMessage::SetType ( uint8_t type)

Sets the type for this message.

Parameters
typethe type to set.

Definition at line 1031 of file packetbb.cc.

References m_type, and NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ TlvBack() [1/2]

Ptr< PbbTlv > ns3::PbbMessage::TlvBack ( )
Returns
a smart pointer to the last message TLV in this message.

Definition at line 1202 of file packetbb.cc.

References ns3::PbbTlvBlock::Back(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvBack() [2/2]

const Ptr< PbbTlv > ns3::PbbMessage::TlvBack ( ) const
Returns
a const smart pointer to the last message TLV in this message.

Definition at line 1209 of file packetbb.cc.

References ns3::PbbTlvBlock::Back(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvBegin() [1/2]

PbbMessage::TlvIterator ns3::PbbMessage::TlvBegin ( )
Returns
an iterator to the first message TLV in this message.

Definition at line 1146 of file packetbb.cc.

References ns3::PbbTlvBlock::Begin(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvBegin() [2/2]

PbbMessage::ConstTlvIterator ns3::PbbMessage::TlvBegin ( ) const
Returns
a const iterator to the first message TLV in this message.

Definition at line 1153 of file packetbb.cc.

References ns3::PbbTlvBlock::Begin(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvClear()

void ns3::PbbMessage::TlvClear ( )

Removes all message TLVs from this block.

Definition at line 1258 of file packetbb.cc.

References ns3::PbbTlvBlock::Clear(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvEmpty()

bool ns3::PbbMessage::TlvEmpty ( ) const
Returns
true if there are no message TLVs in this message, false otherwise.

Definition at line 1181 of file packetbb.cc.

References ns3::PbbTlvBlock::Empty(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvEnd() [1/2]

PbbMessage::TlvIterator ns3::PbbMessage::TlvEnd ( )
Returns
an iterator to the past-the-end message TLV element in this message.

Definition at line 1160 of file packetbb.cc.

References ns3::PbbTlvBlock::End(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvEnd() [2/2]

PbbMessage::ConstTlvIterator ns3::PbbMessage::TlvEnd ( ) const
Returns
a const iterator to the past-the-end message TLV element in this message.

Definition at line 1167 of file packetbb.cc.

References ns3::PbbTlvBlock::End(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvErase() [1/2]

PbbMessage::TlvIterator ns3::PbbMessage::TlvErase ( PbbMessage::TlvIterator first,
PbbMessage::TlvIterator last )

Removes all message TLVs from [first, last) (includes first, not includes last).

Parameters
firstan Iterator pointing to the first message TLV to erase (inclusive).
lastan Iterator pointing to the element past the last message TLV to erase.
Returns
an iterator pointing to the next message TLV in the message.

Definition at line 1251 of file packetbb.cc.

References ns3::PbbTlvBlock::Erase(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvErase() [2/2]

PbbMessage::TlvIterator ns3::PbbMessage::TlvErase ( PbbMessage::TlvIterator position)

Removes the message TLV at the specified position.

Parameters
positionan Iterator pointing to the message TLV to erase.
Returns
an iterator pointing to the next TLV in the block.

Definition at line 1244 of file packetbb.cc.

References ns3::PbbTlvBlock::Erase(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvFront() [1/2]

Ptr< PbbTlv > ns3::PbbMessage::TlvFront ( )
Returns
a smart pointer to the first message TLV in this message.

Definition at line 1188 of file packetbb.cc.

References ns3::PbbTlvBlock::Front(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvFront() [2/2]

const Ptr< PbbTlv > ns3::PbbMessage::TlvFront ( ) const
Returns
a const smart pointer to the first message TLV in this message.

Definition at line 1195 of file packetbb.cc.

References ns3::PbbTlvBlock::Front(), m_tlvList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TlvPopBack()

void ns3::PbbMessage::TlvPopBack ( )

Removes a message TLV from the back of this message.

Definition at line 1237 of file packetbb.cc.

References m_tlvList, NS_LOG_FUNCTION, and ns3::PbbTlvBlock::PopBack().

+ Here is the call graph for this function:

◆ TlvPopFront()

void ns3::PbbMessage::TlvPopFront ( )

Removes a message TLV from the front of this message.

Definition at line 1223 of file packetbb.cc.

References m_tlvList, NS_LOG_FUNCTION, and ns3::PbbTlvBlock::PopFront().

+ Here is the call graph for this function:

◆ TlvPushBack()

void ns3::PbbMessage::TlvPushBack ( Ptr< PbbTlv > tlv)

Appends a message TLV to the back of this message.

Parameters
tlva smart pointer to the message TLV to append.

Definition at line 1230 of file packetbb.cc.

References m_tlvList, NS_LOG_FUNCTION, and ns3::PbbTlvBlock::PushBack().

+ Here is the call graph for this function:

◆ TlvPushFront()

void ns3::PbbMessage::TlvPushFront ( Ptr< PbbTlv > tlv)

Prepends a message TLV to the front of this message.

Parameters
tlva smart pointer to the message TLV to prepend.

Definition at line 1216 of file packetbb.cc.

References m_tlvList, NS_LOG_FUNCTION, and ns3::PbbTlvBlock::PushFront().

+ Here is the call graph for this function:

◆ TlvSize()

int ns3::PbbMessage::TlvSize ( ) const
Returns
the number of message TLVs in this message.

Definition at line 1174 of file packetbb.cc.

References m_tlvList, NS_LOG_FUNCTION, and ns3::PbbTlvBlock::Size().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_addressBlockList

◆ m_addrSize

PbbAddressLength ns3::PbbMessage::m_addrSize
private

the address size

Definition at line 1107 of file packetbb.h.

Referenced by PbbMessage(), and GetAddressLength().

◆ m_hasHopCount

bool ns3::PbbMessage::m_hasHopCount
private

Hop count present.

Definition at line 1115 of file packetbb.h.

Referenced by PbbMessage(), HasHopCount(), and SetHopCount().

◆ m_hasHopLimit

bool ns3::PbbMessage::m_hasHopLimit
private

Hop limit present.

Definition at line 1112 of file packetbb.h.

Referenced by PbbMessage(), HasHopLimit(), and SetHopLimit().

◆ m_hasOriginatorAddress

bool ns3::PbbMessage::m_hasOriginatorAddress
private

Originator address present.

Definition at line 1109 of file packetbb.h.

Referenced by PbbMessage(), HasOriginatorAddress(), and SetOriginatorAddress().

◆ m_hasSequenceNumber

bool ns3::PbbMessage::m_hasSequenceNumber
private

Sequence number present.

Definition at line 1118 of file packetbb.h.

Referenced by PbbMessage(), HasSequenceNumber(), and SetSequenceNumber().

◆ m_hopCount

uint8_t ns3::PbbMessage::m_hopCount
private

Hop count.

Definition at line 1116 of file packetbb.h.

Referenced by GetHopCount(), and SetHopCount().

◆ m_hopLimit

uint8_t ns3::PbbMessage::m_hopLimit
private

Hop limit.

Definition at line 1113 of file packetbb.h.

Referenced by GetHopLimit(), and SetHopLimit().

◆ m_originatorAddress

Address ns3::PbbMessage::m_originatorAddress
private

originator address

Definition at line 1110 of file packetbb.h.

Referenced by GetOriginatorAddress(), and SetOriginatorAddress().

◆ m_sequenceNumber

uint16_t ns3::PbbMessage::m_sequenceNumber
private

Sequence number.

Definition at line 1119 of file packetbb.h.

Referenced by GetSequenceNumber(), and SetSequenceNumber().

◆ m_tlvList

◆ m_type

uint8_t ns3::PbbMessage::m_type
private

the type for this message

Definition at line 1106 of file packetbb.h.

Referenced by GetType(), and SetType().


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