A Discrete-Event Network Simulator
API
Public Member Functions | Protected Member Functions | List of all members
ns3::PbbMessageIpv6 Class Reference

Concrete IPv6 specific PbbMessage class. More...

#include "packetbb.h"

+ Inheritance diagram for ns3::PbbMessageIpv6:

Public Member Functions

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

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from ns3::PbbMessage
typedef std::list< Ptr< PbbAddressBlock > >::iterator AddressBlockIterator
 PbbAddressBlock iterator. More...
 
typedef std::list< Ptr< PbbAddressBlock > >::const_iterator ConstAddressBlockIterator
 PbbAddressBlock const iterator. More...
 
typedef std::list< Ptr< PbbTlv > >::const_iterator ConstTlvIterator
 PbbTlv const iterator. More...
 
typedef std::list< Ptr< PbbTlv > >::iterator TlvIterator
 PbbTlv iterator. More...
 
- Static Public Member Functions inherited from ns3::PbbMessage
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. More...
 

Detailed Description

Concrete IPv6 specific PbbMessage class.

This message will only contain IPv6 addresses.

Definition at line 1155 of file packetbb.h.

Constructor & Destructor Documentation

◆ PbbMessageIpv6()

ns3::PbbMessageIpv6::PbbMessageIpv6 ( )

Definition at line 1782 of file packetbb.cc.

References NS_LOG_FUNCTION.

◆ ~PbbMessageIpv6()

ns3::PbbMessageIpv6::~PbbMessageIpv6 ( )
virtual

Definition at line 1787 of file packetbb.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddressBlockDeserialize()

Ptr< PbbAddressBlock > ns3::PbbMessageIpv6::AddressBlockDeserialize ( Buffer::Iterator start) const
protectedvirtual

Deserialize an address block.

Parameters
startthe buffer iterator start
Returns
the deserialized address block

Implements ns3::PbbMessage.

Definition at line 1828 of file packetbb.cc.

References NS_LOG_FUNCTION, and visualizer.core::start().

◆ DeserializeOriginatorAddress()

Address ns3::PbbMessageIpv6::DeserializeOriginatorAddress ( Buffer::Iterator start) const
protectedvirtual

Deserialize the originator address.

Parameters
startthe buffer iterator start
Returns
the deserialized address

Implements ns3::PbbMessage.

Definition at line 1810 of file packetbb.cc.

References ns3::Ipv6Address::Deserialize(), GetAddressLength(), NS_LOG_FUNCTION, and visualizer.core::start().

◆ GetAddressLength()

PbbAddressLength ns3::PbbMessageIpv6::GetAddressLength ( void  ) const
protectedvirtual

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)

Implements ns3::PbbMessage.

Definition at line 1793 of file packetbb.cc.

References ns3::IPV6, and NS_LOG_FUNCTION.

Referenced by DeserializeOriginatorAddress(), and SerializeOriginatorAddress().

◆ PrintOriginatorAddress()

void ns3::PbbMessageIpv6::PrintOriginatorAddress ( std::ostream &  os) const
protectedvirtual

Print the originator address.

Parameters
osthe output stream

Implements ns3::PbbMessage.

Definition at line 1821 of file packetbb.cc.

References ns3::Ipv6Address::ConvertFrom(), ns3::PbbMessage::GetOriginatorAddress(), NS_LOG_FUNCTION, and ns3::Ipv6Address::Print().

◆ SerializeOriginatorAddress()

void ns3::PbbMessageIpv6::SerializeOriginatorAddress ( Buffer::Iterator start) const
protectedvirtual

Serialize the originator address.

Parameters
startthe buffer iterator start

Implements ns3::PbbMessage.

Definition at line 1800 of file packetbb.cc.

References ns3::Ipv6Address::ConvertFrom(), GetAddressLength(), ns3::PbbMessage::GetOriginatorAddress(), NS_LOG_FUNCTION, ns3::Ipv6Address::Serialize(), and visualizer.core::start().


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