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 ()
 
virtual ~PbbMessageIpv4 ()
 
- 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 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 (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 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 (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[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] 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 IPv4 specific PbbMessage.

This message will only contain IPv4 addresses.

Definition at line 1127 of file packetbb.h.

Constructor & Destructor Documentation

◆ PbbMessageIpv4()

ns3::PbbMessageIpv4::PbbMessageIpv4 ( )

Definition at line 1726 of file packetbb.cc.

References NS_LOG_FUNCTION.

◆ ~PbbMessageIpv4()

ns3::PbbMessageIpv4::~PbbMessageIpv4 ( )
virtual

Definition at line 1731 of file packetbb.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddressBlockDeserialize()

Ptr< PbbAddressBlock > ns3::PbbMessageIpv4::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 1772 of file packetbb.cc.

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

+ Here is the call graph for this function:

◆ DeserializeOriginatorAddress()

Address ns3::PbbMessageIpv4::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 1754 of file packetbb.cc.

References ns3::Ipv4Address::Deserialize(), GetAddressLength(), NS_LOG_FUNCTION, test-ns3::result, and visualizer.core::start().

+ Here is the call graph for this function:

◆ GetAddressLength()

PbbAddressLength ns3::PbbMessageIpv4::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 1737 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
protectedvirtual

Print the originator address.

Parameters
osthe output stream

Implements ns3::PbbMessage.

Definition at line 1765 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
protectedvirtual

Serialize the originator address.

Parameters
startthe buffer iterator start

Implements ns3::PbbMessage.

Definition at line 1744 of file packetbb.cc.

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

+ Here is the call graph for this function:

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