A Discrete-Event Network Simulator
API
ns3::PbbMessageIpv4 Class Reference

Concrete IPv4 specific PbbMessage. More...

#include "packetbb.h"

+ Inheritance diagram for ns3::PbbMessageIpv4:
+ Collaboration diagram for ns3::PbbMessageIpv4:

Public Member Functions

 PbbMessageIpv4 ()
 
- Public Member Functions inherited from ns3::PbbMessage
 PbbMessage ()
 
virtual ~PbbMessage ()
 
Ptr< PbbAddressBlockAddressBlockBack ()
 
const Ptr< PbbAddressBlockAddressBlockBack () const
 
AddressBlockIterator AddressBlockBegin ()
 
ConstAddressBlockIterator AddressBlockBegin () const
 
void AddressBlockClear ()
 Removes all address blocks from this message. More...
 
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). More...
 
AddressBlockIterator AddressBlockErase (AddressBlockIterator position)
 Removes the address block at the specified position. More...
 
Ptr< PbbAddressBlockAddressBlockFront ()
 
const Ptr< PbbAddressBlockAddressBlockFront () const
 
void AddressBlockPopBack ()
 Removes an address block from the back of this message. More...
 
void AddressBlockPopFront ()
 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 () const
 
void Deserialize (Buffer::Iterator &start)
 Deserializes a message from the specified buffer. More...
 
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. More...
 
bool HasHopLimit () const
 Tests whether or not this message has a hop limit. More...
 
bool HasOriginatorAddress () const
 Tests whether or not this message has an originator address. More...
 
bool HasSequenceNumber () 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 ()
 
const Ptr< PbbTlvTlvBack () const
 
TlvIterator TlvBegin ()
 
ConstTlvIterator TlvBegin () const
 
void TlvClear ()
 Removes all message TLVs from this block. More...
 
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). More...
 
TlvIterator TlvErase (TlvIterator position)
 Removes the message TLV at the specified position. More...
 
Ptr< PbbTlvTlvFront ()
 
const Ptr< PbbTlvTlvFront () const
 
void TlvPopBack ()
 Removes a message TLV from the back of this message. More...
 
void TlvPopFront ()
 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 () const
 
- Public Member Functions inherited from ns3::SimpleRefCount< PbbMessage >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () const
 Decrement the reference count. More...
 

Protected Member Functions

Ptr< PbbAddressBlockAddressBlockDeserialize (Buffer::Iterator &start) const override
 Deserialize an address block. More...
 
Address DeserializeOriginatorAddress (Buffer::Iterator &start) const override
 Deserialize the originator address. More...
 
PbbAddressLength GetAddressLength () const override
 Returns address length (IPV4 3 or IPV6 15) More...
 
void PrintOriginatorAddress (std::ostream &os) const override
 Print the originator address. More...
 
void SerializeOriginatorAddress (Buffer::Iterator &start) const override
 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 IPv4 specific PbbMessage.

This message will only contain IPv4 addresses.

Definition at line 1126 of file packetbb.h.

Constructor & Destructor Documentation

◆ PbbMessageIpv4()

ns3::PbbMessageIpv4::PbbMessageIpv4 ( )

Definition at line 1709 of file packetbb.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddressBlockDeserialize()

Ptr< PbbAddressBlock > ns3::PbbMessageIpv4::AddressBlockDeserialize ( Buffer::Iterator start) const
overrideprotectedvirtual

Deserialize an address block.

Parameters
startthe buffer iterator start
Returns
the deserialized address block

Implements ns3::PbbMessage.

Definition at line 1750 of file packetbb.cc.

References NS_LOG_FUNCTION, and two-ray-to-three-gpp-ch-calibration::start.

◆ DeserializeOriginatorAddress()

Address ns3::PbbMessageIpv4::DeserializeOriginatorAddress ( Buffer::Iterator start) const
overrideprotectedvirtual

Deserialize the originator address.

Parameters
startthe buffer iterator start
Returns
the deserialized address

Implements ns3::PbbMessage.

Definition at line 1732 of file packetbb.cc.

References ns3::Ipv4Address::Deserialize(), GetAddressLength(), NS_LOG_FUNCTION, and two-ray-to-three-gpp-ch-calibration::start.

+ Here is the call graph for this function:

◆ GetAddressLength()

PbbAddressLength ns3::PbbMessageIpv4::GetAddressLength ( ) const
overrideprotectedvirtual

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 1715 of file packetbb.cc.

References ns3::IPV4, and NS_LOG_FUNCTION.

Referenced by DeserializeOriginatorAddress(), and SerializeOriginatorAddress().

+ Here is the caller graph for this function:

◆ PrintOriginatorAddress()

void ns3::PbbMessageIpv4::PrintOriginatorAddress ( std::ostream &  os) const
overrideprotectedvirtual

Print the originator address.

Parameters
osthe output stream

Implements ns3::PbbMessage.

Definition at line 1743 of file packetbb.cc.

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

+ Here is the call graph for this function:

◆ SerializeOriginatorAddress()

void ns3::PbbMessageIpv4::SerializeOriginatorAddress ( Buffer::Iterator start) const
overrideprotectedvirtual

Serialize the originator address.

Parameters
startthe buffer iterator start

Implements ns3::PbbMessage.

Definition at line 1722 of file packetbb.cc.

References ns3::Ipv4Address::ConvertFrom(), GetAddressLength(), ns3::PbbMessage::GetOriginatorAddress(), NS_LOG_FUNCTION, ns3::Ipv4Address::Serialize(), and two-ray-to-three-gpp-ch-calibration::start.

+ Here is the call graph for this function:

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