A Discrete-Event Network Simulator
API
ns3::Buffer::Iterator Class Reference

iterator in a Buffer instance More...

#include "buffer.h"

Public Member Functions

 Iterator ()
 
uint16_t CalculateIpChecksum (uint16_t size)
 Calculate the checksum. More...
 
uint16_t CalculateIpChecksum (uint16_t size, uint32_t initialChecksum)
 Calculate the checksum. More...
 
uint32_t GetDistanceFrom (Iterator const &o) const
 
uint32_t GetRemainingSize (void) const
 
uint32_t GetSize (void) const
 
bool IsEnd (void) const
 
bool IsStart (void) const
 
void Next (void)
 go forward by one byte More...
 
void Next (uint32_t delta)
 
uint8_t PeekU8 (void)
 
void Prev (void)
 go backward by one byte More...
 
void Prev (uint32_t delta)
 
void Read (uint8_t *buffer, uint32_t size)
 
void Read (Iterator start, uint32_t size)
 
uint16_t ReadLsbtohU16 (void)
 
uint32_t ReadLsbtohU32 (void)
 
uint64_t ReadLsbtohU64 (void)
 
uint16_t ReadNtohU16 (void)
 
uint32_t ReadNtohU32 (void)
 
uint64_t ReadNtohU64 (void)
 
uint16_t ReadU16 (void)
 
uint32_t ReadU32 (void)
 
uint64_t ReadU64 (void)
 
uint8_t ReadU8 (void)
 
void Write (uint8_t const *buffer, uint32_t size)
 
void Write (Iterator start, Iterator end)
 
void WriteHtolsbU16 (uint16_t data)
 
void WriteHtolsbU32 (uint32_t data)
 
void WriteHtolsbU64 (uint64_t data)
 
void WriteHtonU16 (uint16_t data)
 
void WriteHtonU32 (uint32_t data)
 
void WriteHtonU64 (uint64_t data)
 
void WriteU16 (uint16_t data)
 
void WriteU32 (uint32_t data)
 
void WriteU64 (uint64_t data)
 
void WriteU8 (uint8_t data)
 
void WriteU8 (uint8_t data, uint32_t len)
 

Private Member Functions

 Iterator (Buffer const *buffer)
 Constructor - initializes the iterator to point to the buffer start. More...
 
 Iterator (Buffer const *buffer, bool dummy)
 Constructor - initializes the iterator to point to the buffer end. More...
 
bool Check (uint32_t i) const
 Checks that the buffer position is not in the "virtual zero area". More...
 
bool CheckNoZero (uint32_t start, uint32_t end) const
 Checks that the [start, end) is not in the "virtual zero area". More...
 
void Construct (const Buffer *buffer)
 Initializes the iterator values. More...
 
std::string GetReadErrorMessage (void) const
 Returns an appropriate message indicating a read error. More...
 
std::string GetWriteErrorMessage (void) const
 Returns an appropriate message indicating a write error. More...
 
uint16_t SlowReadNtohU16 (void)
 
uint32_t SlowReadNtohU32 (void)
 

Private Attributes

uint32_t m_current
 offset in virtual bytes from the start of the data buffer to the current position represented by this iterator. More...
 
uint8_t * m_data
 a pointer to the underlying byte buffer. More...
 
uint32_t m_dataEnd
 offset in virtual bytes from the start of the data buffer to the end of the data which can be read by this iterator More...
 
uint32_t m_dataStart
 offset in virtual bytes from the start of the data buffer to the start of the data which can be read by this iterator More...
 
uint32_t m_zeroEnd
 offset in virtual bytes from the start of the data buffer to the end of the "virtual zero area". More...
 
uint32_t m_zeroStart
 offset in virtual bytes from the start of the data buffer to the start of the "virtual zero area". More...
 

Friends

class Buffer
 Friend class. More...
 

Detailed Description

iterator in a Buffer instance

Definition at line 98 of file buffer.h.

Constructor & Destructor Documentation

ns3::Buffer::Iterator::Iterator ( )
inline

Definition at line 814 of file buffer.h.

ns3::Buffer::Iterator::Iterator ( Buffer const *  buffer)
inlineprivate

Constructor - initializes the iterator to point to the buffer start.

Parameters
bufferthe buffer this iterator refers to

Definition at line 823 of file buffer.h.

References Construct(), m_current, and m_dataStart.

+ Here is the call graph for this function:

ns3::Buffer::Iterator::Iterator ( Buffer const *  buffer,
bool  dummy 
)
inlineprivate

Constructor - initializes the iterator to point to the buffer end.

Parameters
bufferthe buffer this iterator refers to
dummynot used param

Definition at line 828 of file buffer.h.

References Construct(), m_current, and m_dataEnd.

+ Here is the call graph for this function:

Member Function Documentation

uint16_t ns3::Buffer::Iterator::CalculateIpChecksum ( uint16_t  size,
uint32_t  initialChecksum 
)

Calculate the checksum.

Parameters
sizesize of the buffer.
initialChecksuminitial value
Returns
checksum

Definition at line 1143 of file buffer.cc.

References NS_LOG_FUNCTION.

bool ns3::Buffer::Iterator::Check ( uint32_t  i) const
private

Checks that the buffer position is not in the "virtual zero area".

Parameters
ibuffer position
Returns
true if not in the "virtual zero area".

Definition at line 828 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by WriteU8().

+ Here is the caller graph for this function:

bool ns3::Buffer::Iterator::CheckNoZero ( uint32_t  start,
uint32_t  end 
) const
private

Checks that the [start, end) is not in the "virtual zero area".

Parameters
startstart buffer position
endend buffer position
Returns
true if [start, end) is not in the "virtual zero area".

Definition at line 815 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by WriteHtonU16(), WriteHtonU32(), and WriteU8().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::Construct ( const Buffer buffer)
inlineprivate

Initializes the iterator values.

Parameters
bufferthe buffer this iterator refers to

Definition at line 835 of file buffer.h.

References m_data, ns3::Buffer::Data::m_data, ns3::Buffer::m_data, m_dataEnd, m_dataStart, ns3::Buffer::m_end, ns3::Buffer::m_start, ns3::Buffer::m_zeroAreaEnd, ns3::Buffer::m_zeroAreaStart, m_zeroEnd, and m_zeroStart.

Referenced by Iterator().

+ Here is the caller graph for this function:

uint32_t ns3::Buffer::Iterator::GetDistanceFrom ( Iterator const &  o) const
Parameters
othe second iterator
Returns
number of bytes included between the two iterators

This method works only if the two iterators point to the same underlying buffer. Debug builds ensure this with an assert.

Definition at line 786 of file buffer.cc.

References m_current, m_data, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::AmpduSubframeHeader::Deserialize(), ns3::AmsduSubframeHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::CtrlBAckRequestHeader::Deserialize(), ns3::WifiInformationElementVector::Deserialize(), ns3::dsdvq::DsdvqHeader::Deserialize(), ns3::QKDCommandHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::aodv::TypeHeader::Deserialize(), ns3::aodvq::TypeHeader::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::ManagementMessageType::Deserialize(), ns3::UanHeaderRcData::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::WifiMacHeader::Deserialize(), ns3::QKDDelimiterHeader::Deserialize(), ns3::UanHeaderCommon::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::MgtAssocRequestHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodvq::RreqHeader::Deserialize(), ns3::PbbTlvBlock::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::GenericMacHeader::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::QKDHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::WifiInformationElement::Deserialize(), ns3::RngRsp::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::MgtReassocRequestHeader::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::BandwidthRequestHeader::Deserialize(), ns3::PbbAddressTlvBlock::Deserialize(), ns3::aodvq::RrepHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::Dcd::Deserialize(), ns3::Ucd::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::GrantManagementSubheader::Deserialize(), ns3::UanHeaderRcAck::Deserialize(), ns3::MgtAssocResponseHeader::Deserialize(), ns3::FragmentationSubheader::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodvq::RrepAckHeader::Deserialize(), ns3::aodvq::RerrHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::DlMap::Deserialize(), ns3::MgtProbeRequestHeader::Deserialize(), ns3::DsaAck::Deserialize(), ns3::UlMap::Deserialize(), ns3::PbbPacket::Deserialize(), ns3::RngReq::Deserialize(), ns3::MgtProbeResponseHeader::Deserialize(), ns3::WifiActionHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::PbbMessage::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtDelBaHeader::Deserialize(), ns3::dot11s::IePeeringProtocol::DeserializeInformationField(), ns3::dot11s::IeLinkMetricReport::DeserializeInformationField(), ns3::dot11s::IeMeshId::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IeConfiguration::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::MeshInformationElementVector::DeserializeSingleIe(), ns3::PbbTlvBlock::Serialize(), ns3::PbbAddressTlvBlock::Serialize(), and ns3::PbbMessage::Serialize().

std::string ns3::Buffer::Iterator::GetReadErrorMessage ( void  ) const
private

Returns an appropriate message indicating a read error.

Returns
the error message

Definition at line 1176 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by PeekU8().

+ Here is the caller graph for this function:

uint32_t ns3::Buffer::Iterator::GetRemainingSize ( void  ) const
Returns
the size left to read of the underlying buffer we are iterating

Definition at line 1168 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::Icmpv4Echo::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::RipHeader::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), and ns3::Icmpv6ParameterError::Deserialize().

+ Here is the caller graph for this function:

std::string ns3::Buffer::Iterator::GetWriteErrorMessage ( void  ) const
private

Returns an appropriate message indicating a write error.

The message depends on the actual Buffer::Iterator status.

Returns
the error message

Definition at line 1189 of file buffer.cc.

References NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by WriteHtonU16(), WriteHtonU32(), and WriteU8().

+ Here is the caller graph for this function:

bool ns3::Buffer::Iterator::IsEnd ( void  ) const
Returns
true if this iterator points to the end of the byte array. false otherwise.

Definition at line 802 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::PbbPacket::Deserialize(), and ns3::WifiInformationElement::DeserializeIfPresent().

+ Here is the caller graph for this function:

bool ns3::Buffer::Iterator::IsStart ( void  ) const
Returns
true if this iterator points to the start of the byte array. false otherwise.

Definition at line 808 of file buffer.cc.

References NS_LOG_FUNCTION.

void ns3::Buffer::Iterator::Next ( void  )
inline

go forward by one byte

Definition at line 845 of file buffer.h.

References m_current, m_dataEnd, and NS_ASSERT.

Referenced by TcpHeaderWithRFC793OptionTestCase::CheckNoPadding(), ns3::flame::FlameHeader::Deserialize(), ns3::LlcSnapHeader::Deserialize(), ns3::WifiInformationElementVector::Deserialize(), ns3::RadiotapHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::Icmpv4Header::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::RipHeader::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::SfVectorTlvValue::Deserialize(), ns3::CsParamVectorTlvValue::Deserialize(), ns3::ClassificationRuleVectorTlvValue::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::PbbTlv::Deserialize(), ns3::WifiInformationElement::DeserializeIfPresent(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::PbbMessage::DeserializeMessage(), ns3::MeshInformationElementVector::DeserializeSingleIe(), BufferTest::DoRun(), ns3::PacketMetadata::ItemIterator::Next(), TcpHeaderWithRFC793OptionTestCase::OneOptionAtTime(), ns3::Packet::PeekHeader(), ns3::Packet::Print(), Read(), ns3::Packet::RemoveHeader(), ns3::Icmpv4Header::Serialize(), ns3::PbbTlvBlock::Serialize(), ns3::RipNgHeader::Serialize(), ns3::RipHeader::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv4DestinationUnreachable::Serialize(), ns3::Ipv4Header::Serialize(), ns3::WifiInformationElement::Serialize(), ns3::Icmpv4TimeExceeded::Serialize(), ns3::VectorTlvValue::Serialize(), ns3::TcpHeader::Serialize(), ns3::PbbAddressTlvBlock::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::PbbPacket::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::PbbMessage::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::PbbAddressBlock::Serialize(), and ns3::PbbTlv::Serialize().

void ns3::Buffer::Iterator::Next ( uint32_t  delta)
inline
Parameters
deltanumber of bytes to go forward

Definition at line 857 of file buffer.h.

References m_current, m_dataEnd, and NS_ASSERT.

uint8_t ns3::Buffer::Iterator::PeekU8 ( void  )
inline
Returns
the byte read in the buffer.

Read data, but do not advance the Iterator read.

Definition at line 998 of file buffer.h.

References data, GetReadErrorMessage(), m_current, m_data, m_dataEnd, m_dataStart, m_zeroEnd, m_zeroStart, and NS_ASSERT_MSG().

Referenced by ns3::TcpHeader::Deserialize(), ReadU8(), TcpOptionWSTestCase::TestDeserialize(), and TcpOptionTSTestCase::TestDeserialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::Prev ( uint32_t  delta)
inline
Parameters
deltanumber of bytes to go backward

Definition at line 863 of file buffer.h.

References m_current, and NS_ASSERT.

void ns3::Buffer::Iterator::Read ( uint8_t *  buffer,
uint32_t  size 
)
Parameters
bufferbuffer to copy data into
sizenumber of bytes to copy

Copy size bytes of data from the internal buffer to the input buffer and advance the Iterator by the number of bytes read.

Definition at line 1126 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::RipNgRte::Deserialize(), ns3::OrganizationIdentifier::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::TcpOptionUnknown::Deserialize(), ns3::Icmpv4Echo::Deserialize(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::OptionField::Deserialize(), ns3::SixLowPanHc1::Deserialize(), ns3::QKDHeader::Deserialize(), ns3::dsr::DsrOptionField::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::dsr::DsrOptionRrepHeader::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::dsr::DsrOptionSRHeader::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::SixLowPanNhcExtension::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::PbbAddressBlock::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6OptionLinkLayerAddress::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::dot11s::IeMeshId::DeserializeInformationField(), ns3::ExtendedSupportedRatesIE::DeserializeInformationField(), ns3::Ssid::DeserializeInformationField(), ns3::SupportedRates::DeserializeInformationField(), ns3::PbbMessageIpv4::DeserializeOriginatorAddress(), ns3::PbbMessageIpv6::DeserializeOriginatorAddress(), and ns3::ReadFrom().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::Read ( Buffer::Iterator  start,
uint32_t  size 
)
inline
Parameters
startstart iterator of the buffer to copy data into
sizenumber of bytes to copy

Copy size bytes of data from the internal buffer to the input buffer via the provided iterator and advance the Iterator by the number of bytes read.

Definition at line 1041 of file buffer.h.

References Next(), and Write().

+ Here is the call graph for this function:

uint32_t ns3::Buffer::Iterator::ReadLsbtohU32 ( void  )
uint64_t ns3::Buffer::Iterator::ReadLsbtohU64 ( void  )
Returns
the eight bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in least significant byte format and returned in host format.

Definition at line 1096 of file buffer.cc.

References data, and NS_LOG_FUNCTION.

Referenced by ns3::LrWpanMacHeader::Deserialize(), ns3::MgtProbeResponseHeader::Deserialize(), ns3::CtrlBAckResponseHeader::DeserializeBitmap(), ns3::HeCapabilities::DeserializeInformationField(), ns3::VhtCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), and ns3::HtOperation::DeserializeInformationField().

+ Here is the caller graph for this function:

uint16_t ns3::Buffer::Iterator::ReadNtohU16 ( void  )
inline
Returns
the two bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in network format and returned in host format.

Definition at line 946 of file buffer.h.

References m_current, m_data, m_zeroEnd, m_zeroStart, and SlowReadNtohU16().

Referenced by MyHeader::Deserialize(), ns3::EpcX2Header::Deserialize(), ns3::AmsduSubframeHeader::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::LlcSnapHeader::Deserialize(), ns3::RipRte::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::QKDCommandHeader::Deserialize(), ns3::PppHeader::Deserialize(), ns3::TcpOptionMSS::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::SllHeader::Deserialize(), ns3::EthernetHeader::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::olsr::PacketHeader::Deserialize(), ns3::Icmpv4Echo::Deserialize(), ns3::PbbTlvBlock::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::QKDHeader::Deserialize(), ns3::U16TlvValue::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::EpcX2HandoverRequestAckHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::Ipv6OptionJumbogramHeader::Deserialize(), ns3::EpcX2HandoverPreparationFailureHeader::Deserialize(), ns3::PbbAddressTlvBlock::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::Ipv6OptionRouterAlertHeader::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::PortRangeTlvValue::Deserialize(), ns3::EpcX2UeContextReleaseHeader::Deserialize(), ns3::olsr::MessageHeader::Tc::Deserialize(), ns3::EpcX2LoadInformationHeader::Deserialize(), ns3::EpcX2ResourceStatusUpdateHeader::Deserialize(), ns3::PbbPacket::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::PbbMessage::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::PbbTlv::Deserialize(), and BufferTest::DoRun().

+ Here is the call graph for this function:

uint32_t ns3::Buffer::Iterator::ReadNtohU32 ( void  )
inline
Returns
the four bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in network format and returned in host format.

Definition at line 970 of file buffer.h.

References m_current, m_data, m_zeroEnd, m_zeroStart, and SlowReadNtohU32().

Referenced by ns3::TcpOptionTS::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::SeqTsHeader::Deserialize(), ns3::TcpOptionSack::Deserialize(), ns3::dsdvq::DsdvqHeader::Deserialize(), ns3::RipRte::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::aodvq::RreqHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::QKDHeader::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::EpcX2HandoverRequestAckHeader::Deserialize(), ns3::U32TlvValue::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::olsr::MessageHeader::Mid::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodvq::RrepHeader::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::olsr::MessageHeader::Tc::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::olsr::MessageHeader::Hna::Deserialize(), ns3::Ipv4AddressTlvValue::Deserialize(), ns3::aodvq::RerrHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), and ns3::ReadFrom().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint64_t ns3::Buffer::Iterator::ReadNtohU64 ( void  )
Returns
the eight bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in network format and returned in host format.

Definition at line 1046 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::SeqTsHeader::Deserialize(), ns3::SllHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), and ns3::EpcX2SnStatusTransferHeader::Deserialize().

+ Here is the caller graph for this function:

uint16_t ns3::Buffer::Iterator::ReadU16 ( void  )
inline
Returns
the two bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in the format written by writeU16.

Definition at line 1029 of file buffer.h.

References data, and ReadU8().

Referenced by ns3::LrWpanMacTrailer::Deserialize(), ns3::ThreeGppHttpHeader::Deserialize(), ns3::RadiotapHeader::Deserialize(), ns3::UanHeaderRcData::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::RipHeader::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::RngRsp::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::SixLowPanFrag1::Deserialize(), ns3::GrantManagementSubheader::Deserialize(), ns3::DsaReq::Deserialize(), ns3::SixLowPanFragN::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::DsaRsp::Deserialize(), ns3::DsaAck::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::dsr::DsrOptionRerrUnsupportHeader::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::dsr::DsrOptionAckReqHeader::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::dsr::DsrOptionAckHeader::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HeOperation::DeserializeInformationField(), ns3::VhtOperation::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), BufferTest::DoRun(), ns3::DcdChannelEncodings::Read(), ns3::UcdChannelEncodings::Read(), ns3::DlFramePrefixIe::Read(), ns3::OfdmDlMapIe::Read(), and ns3::OfdmUlMapIe::Read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint64_t ns3::Buffer::Iterator::ReadU64 ( void  )
Returns
the eight bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in the format written by writeU64.

Definition at line 992 of file buffer.cc.

References data, and NS_LOG_FUNCTION.

Referenced by ns3::ThreeGppHttpHeader::Deserialize(), ns3::RadiotapHeader::Deserialize(), ns3::EthernetHeader::Deserialize(), and BufferTest::DoRun().

+ Here is the caller graph for this function:

uint8_t ns3::Buffer::Iterator::ReadU8 ( void  )
inline
Returns
the byte read in the buffer.

Read data and advance the Iterator by the number of bytes read.

Definition at line 1021 of file buffer.h.

References m_current, and PeekU8().

Referenced by TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize(), ns3::TcpOptionEnd::Deserialize(), ns3::EpcX2Header::Deserialize(), ns3::AmpduSubframeHeader::Deserialize(), ns3::TcpOptionTS::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::TcpOptionSackPermitted::Deserialize(), BenchHeader< N >::Deserialize(), ns3::TcpOptionWinScale::Deserialize(), ns3::TcpOptionSack::Deserialize(), ns3::TcpOptionNOP::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::QKDCommandHeader::Deserialize(), ns3::RadiotapHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::aodvq::TypeHeader::Deserialize(), ns3::aodv::TypeHeader::Deserialize(), ns3::LtePdcpHeader::Deserialize(), ns3::dot11s::Dot11sMeshCapability::Deserialize(), ns3::ManagementMessageType::Deserialize(), ns3::Icmpv4Header::Deserialize(), ns3::UanHeaderRcData::Deserialize(), ns3::TcpOptionMSS::Deserialize(), ns3::ArpHeader::Deserialize(), anonymous_namespace{packet-metadata-test.cc}::HistoryHeader< N >::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Tlv::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::LteRlcHeader::Deserialize(), ns3::QKDDelimiterHeader::Deserialize(), ns3::TcpOptionUnknown::Deserialize(), ns3::UanHeaderCommon::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodvq::RreqHeader::Deserialize(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::VendorSpecificActionHeader::Deserialize(), ns3::U8TlvValue::Deserialize(), ns3::dsr::DsrOptionPad1Header::Deserialize(), ns3::RipHeader::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::SixLowPanHc1::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::Ipv6OptionPad1Header::Deserialize(), ns3::OfdmDownlinkFramePrefix::Deserialize(), ns3::GenericMacHeader::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::QKDHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::dsr::DsrOptionPadnHeader::Deserialize(), anonymous_namespace{packet-metadata-test.cc}::HistoryTrailer< N >::Deserialize(), ns3::LteRlcAmHeader::Deserialize(), ns3::Ipv6OptionPadnHeader::Deserialize(), ns3::Ipv6ExtensionHopByHopHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >::Deserialize(), ns3::RngRsp::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::Ipv6ExtensionDestinationHeader::Deserialize(), ns3::Ipv6OptionJumbogramHeader::Deserialize(), ns3::BandwidthRequestHeader::Deserialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Deserialize(), ns3::aodvq::RrepHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::SfVectorTlvValue::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::CsParamVectorTlvValue::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::SixLowPanFrag1::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::ClassificationRuleVectorTlvValue::Deserialize(), ns3::Ipv6OptionRouterAlertHeader::Deserialize(), ns3::Dcd::Deserialize(), ns3::Ucd::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::GrantManagementSubheader::Deserialize(), ns3::TosTlvValue::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::UanHeaderRcAck::Deserialize(), ns3::SixLowPanFragN::Deserialize(), ns3::FragmentationSubheader::Deserialize(), ns3::Ipv6ExtensionRoutingHeader::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodvq::RrepAckHeader::Deserialize(), ns3::dsr::DsrOptionRrepHeader::Deserialize(), ns3::ProtocolTlvValue::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::DsaRsp::Deserialize(), ns3::EpcX2LoadInformationHeader::Deserialize(), ns3::aodvq::RerrHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::SixLowPanIpv6::Deserialize(), ns3::DlMap::Deserialize(), ns3::EpcX2ResourceStatusUpdateHeader::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::DsaAck::Deserialize(), ns3::UlMap::Deserialize(), ns3::PbbPacket::Deserialize(), ns3::dsr::DsrOptionSRHeader::Deserialize(), ns3::RngReq::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::WifiActionHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnreachHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::SixLowPanNhcExtension::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::PbbMessage::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::dsr::DsrOptionRerrUnsupportHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::dsr::DsrOptionAckReqHeader::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::dsr::DsrOptionAckHeader::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::PbbAddressBlock::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6OptionLinkLayerAddress::Deserialize(), ns3::PbbTlv::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Asn1Header::DeserializeBitset(), ns3::WifiInformationElement::DeserializeIfPresent(), ns3::dot11s::IePeeringProtocol::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::CfParameterSet::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::DsssParameterSet::DeserializeInformationField(), ns3::HeOperation::DeserializeInformationField(), ns3::ErpInformation::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::VhtOperation::DeserializeInformationField(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IeConfiguration::DeserializeInformationField(), ns3::ExtendedCapabilities::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::EdcaParameterSet::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::PbbMessage::DeserializeMessage(), ns3::MeshInformationElementVector::DeserializeSingleIe(), ns3::WifiInformationElementVector::DeserializeSingleIe(), ns3::OfdmUcdChannelEncodings::DoRead(), ns3::OfdmDcdChannelEncodings::DoRead(), ns3::DlFramePrefixIe::Read(), ns3::OfdmUlBurstProfile::Read(), ns3::OfdmDlBurstProfile::Read(), ns3::OfdmDlMapIe::Read(), ns3::OfdmUlMapIe::Read(), and ReadU16().

+ Here is the call graph for this function:

uint16_t ns3::Buffer::Iterator::SlowReadNtohU16 ( void  )
private
Returns
the two bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in network format and returned in host format.

Warning
this is the slow version, please use ReadNtohU16 (void)

Definition at line 1022 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ReadNtohU16().

+ Here is the caller graph for this function:

uint32_t ns3::Buffer::Iterator::SlowReadNtohU32 ( void  )
private
Returns
the four bytes read in the buffer.

Read data and advance the Iterator by the number of bytes read. The data is read in network format and returned in host format.

Warning
this is the slow version, please use ReadNtohU32 (void)

Definition at line 1032 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ReadNtohU32().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::Write ( uint8_t const *  buffer,
uint32_t  size 
)
Parameters
buffera byte buffer to copy in the internal buffer.
sizenumber of bytes to copy.

Write the data in buffer and advance the iterator position by size bytes.

Definition at line 956 of file buffer.cc.

References NS_ASSERT_MSG(), and NS_LOG_FUNCTION.

Referenced by ns3::Buffer::AddAtEnd(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Buffer::CreateFullCopy(), ns3::SixLowPanNetDevice::DecompressLowPanNhc(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::OptionField::Deserialize(), ns3::dsr::DsrOptionField::Deserialize(), ns3::Buffer::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), BufferTest::DoRun(), ns3::Packet::Packet(), PbbTestCase::PbbTestCase(), Read(), ns3::Asn1Header::Serialize(), ns3::LlcSnapHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::OrganizationIdentifier::Serialize(), ns3::Ipv6ExtensionHeader::Serialize(), ns3::dsr::DsrOptionHeader::Serialize(), ns3::Ipv6OptionHeader::Serialize(), ns3::TcpOptionUnknown::Serialize(), ns3::Icmpv4Echo::Serialize(), ns3::dsr::DsrFsHeader::Serialize(), ns3::OptionField::Serialize(), ns3::SixLowPanHc1::Serialize(), ns3::QKDHeader::Serialize(), ns3::Icmpv4DestinationUnreachable::Serialize(), ns3::dsr::DsrOptionField::Serialize(), ns3::Icmpv4TimeExceeded::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::dsr::DsrOptionRrepHeader::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::dsr::DsrOptionSRHeader::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::dsr::DsrOptionRerrHeader::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::SixLowPanNhcExtension::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::PbbAddressBlock::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6OptionLinkLayerAddress::Serialize(), ns3::PbbTlv::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::ExtendedSupportedRatesIE::SerializeInformationField(), ns3::Ssid::SerializeInformationField(), ns3::SupportedRates::SerializeInformationField(), ns3::PbbMessageIpv4::SerializeOriginatorAddress(), ns3::PbbMessageIpv6::SerializeOriginatorAddress(), and ns3::WriteTo().

+ Here is the call graph for this function:

void ns3::Buffer::Iterator::Write ( Iterator  start,
Iterator  end 
)
Parameters
startthe start of the data to copy
endthe end of the data to copy

Write the data delimited by start and end in internal buffer and advance the iterator position by the number of bytes copied. The input iterators must not point to the same Buffer as we do to avoid overlapping copies. This is enforced in debug builds by asserts.

Definition at line 838 of file buffer.cc.

References m_current, m_data, m_dataEnd, m_zeroEnd, m_zeroStart, min, NS_ASSERT, NS_ASSERT_MSG(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::Buffer::Iterator::WriteHtolsbU32 ( uint32_t  data)
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by four bytes. The data is written in least significant byte order and the input data is expected to be in host order.

Definition at line 920 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::dot11s::MeshHeader::Serialize(), ns3::LrWpanMacHeader::Serialize(), ns3::HeCapabilities::SerializeInformationField(), ns3::dot11s::IeLinkMetricReport::SerializeInformationField(), ns3::VhtCapabilities::SerializeInformationField(), ns3::dot11s::IePerr::SerializeInformationField(), ns3::HeOperation::SerializeInformationField(), ns3::dot11s::IeRann::SerializeInformationField(), ns3::dot11s::IePrep::SerializeInformationField(), and ns3::dot11s::IePreq::SerializeInformationField().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::WriteHtolsbU64 ( uint64_t  data)
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by eight bytes. The data is written in least significant byte order and the input data is expected to be in host order.

Definition at line 929 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by BufferTest::DoRun(), ns3::LrWpanMacHeader::Serialize(), ns3::MgtProbeResponseHeader::Serialize(), ns3::CtrlBAckResponseHeader::SerializeBitmap(), ns3::HeCapabilities::SerializeInformationField(), ns3::VhtCapabilities::SerializeInformationField(), ns3::HtCapabilities::SerializeInformationField(), and ns3::HtOperation::SerializeInformationField().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::WriteHtonU16 ( uint16_t  data)
inline
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by two bytes. The data is written in network order and the input data is expected to be in host order.

Definition at line 905 of file buffer.h.

References CheckNoZero(), GetWriteErrorMessage(), m_current, m_data, m_zeroEnd, m_zeroStart, and NS_ASSERT_MSG().

Referenced by BufferTest::DoRun(), MyHeader::Serialize(), ns3::EpcX2Header::Serialize(), ns3::AmsduSubframeHeader::Serialize(), ns3::flame::FlameHeader::Serialize(), ns3::GtpuHeader::Serialize(), ns3::RipRte::Serialize(), ns3::LlcSnapHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::QKDCommandHeader::Serialize(), ns3::PppHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::TcpOptionMSS::Serialize(), ns3::ArpHeader::Serialize(), ns3::SllHeader::Serialize(), ns3::EthernetHeader::Serialize(), ns3::UdpHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::olsr::PacketHeader::Serialize(), ns3::Icmpv4Echo::Serialize(), ns3::PbbTlvBlock::Serialize(), ns3::U16TlvValue::Serialize(), ns3::QKDHeader::Serialize(), ns3::Icmpv4DestinationUnreachable::Serialize(), ns3::Ipv4Header::Serialize(), ns3::EpcX2HandoverRequestAckHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::DhcpHeader::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::EpcX2HandoverPreparationFailureHeader::Serialize(), ns3::PbbAddressTlvBlock::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::Ipv6OptionRouterAlertHeader::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Tc::Serialize(), ns3::PortRangeTlvValue::Serialize(), ns3::EpcX2UeContextReleaseHeader::Serialize(), ns3::EpcX2LoadInformationHeader::Serialize(), ns3::EpcX2ResourceStatusUpdateHeader::Serialize(), ns3::PbbPacket::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::PbbMessage::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), and ns3::PbbTlv::Serialize().

+ Here is the call graph for this function:

void ns3::Buffer::Iterator::WriteHtonU32 ( uint32_t  data)
inline
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by four bytes. The data is written in network order and the input data is expected to be in host order.

Definition at line 924 of file buffer.h.

References CheckNoZero(), GetWriteErrorMessage(), m_current, m_data, m_zeroEnd, m_zeroStart, and NS_ASSERT_MSG().

Referenced by BufferTest::DoRun(), ns3::TcpOptionTS::Serialize(), ns3::GtpuHeader::Serialize(), ns3::SeqTsHeader::Serialize(), ns3::TcpOptionSack::Serialize(), ns3::RipRte::Serialize(), ns3::dsdvq::DsdvqHeader::Serialize(), ns3::dsdv::DsdvHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::aodvq::RreqHeader::Serialize(), ns3::aodv::RreqHeader::Serialize(), ns3::QKDHeader::Serialize(), ns3::Ipv4Header::Serialize(), ns3::EpcX2HandoverRequestAckHeader::Serialize(), ns3::U32TlvValue::Serialize(), ns3::Ipv6Header::Serialize(), ns3::DhcpHeader::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::Ipv6OptionJumbogramHeader::Serialize(), ns3::olsr::MessageHeader::Mid::Serialize(), ns3::aodv::RrepHeader::Serialize(), ns3::aodvq::RrepHeader::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Tc::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::olsr::MessageHeader::Hna::Serialize(), ns3::Ipv4AddressTlvValue::Serialize(), ns3::aodvq::RerrHeader::Serialize(), ns3::aodv::RerrHeader::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), and ns3::WriteTo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::WriteHtonU64 ( uint64_t  data)
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by eight bytes. The data is written in network order and the input data is expected to be in host order.

Definition at line 943 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by BufferTest::DoRun(), ns3::SeqTsHeader::Serialize(), ns3::SllHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), and ns3::EpcX2SnStatusTransferHeader::Serialize().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::WriteU16 ( uint16_t  data)
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by two bytes. The format of the data written in the byte buffer is non-portable. We only ensure that readU16 will return exactly what we wrote with writeU16 if the program is run on the same machine.

Definition at line 873 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::UdpHeader::CalculateHeaderChecksum(), ns3::TcpHeader::CalculateHeaderChecksum(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), BufferTest::DoRun(), ns3::WimaxMacToMacHeader::Serialize(), ns3::LrWpanMacTrailer::Serialize(), ns3::RadiotapHeader::Serialize(), ns3::ThreeGppHttpHeader::Serialize(), OptionWithoutAlignmentHeader::Serialize(), ns3::UanHeaderRcData::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::UdpHeader::Serialize(), OptionWithAlignmentHeader::Serialize(), ns3::dsr::DsrFsHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::RipHeader::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::UanHeaderRcRts::Serialize(), ns3::Icmpv4DestinationUnreachable::Serialize(), ns3::Ipv4Header::Serialize(), ns3::RngRsp::Serialize(), ns3::DhcpHeader::Serialize(), ns3::UanHeaderRcCtsGlobal::Serialize(), ns3::dsr::DsrRoutingHeader::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::SixLowPanFrag1::Serialize(), ns3::GrantManagementSubheader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::DsaReq::Serialize(), ns3::SixLowPanFragN::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::DsaRsp::Serialize(), ns3::DsaAck::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::dsr::DsrOptionRerrUnsupportHeader::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::dsr::DsrOptionAckReqHeader::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::dsr::DsrOptionAckHeader::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::HeCapabilities::SerializeInformationField(), ns3::HeOperation::SerializeInformationField(), ns3::VhtOperation::SerializeInformationField(), ns3::HtCapabilities::SerializeInformationField(), ns3::HtOperation::SerializeInformationField(), ns3::DcdChannelEncodings::Write(), ns3::UcdChannelEncodings::Write(), ns3::DlFramePrefixIe::Write(), ns3::OfdmDlMapIe::Write(), and ns3::OfdmUlMapIe::Write().

void ns3::Buffer::Iterator::WriteU64 ( uint64_t  data)
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by eight bytes. The format of the data written in the byte buffer is non-portable. We only ensure that readU64 will return exactly what we wrote with writeU64 if the program is run on the same machine.

Definition at line 893 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by BufferTest::DoRun(), ns3::RadiotapHeader::Serialize(), ns3::ThreeGppHttpHeader::Serialize(), and ns3::EthernetHeader::Serialize().

+ Here is the caller graph for this function:

void ns3::Buffer::Iterator::WriteU8 ( uint8_t  data)
inline
Parameters
datadata to write in buffer

Write the data in buffer and advance the iterator position by one byte.

Definition at line 869 of file buffer.h.

References Check(), data, GetWriteErrorMessage(), m_current, m_data, m_zeroEnd, m_zeroStart, and NS_ASSERT_MSG().

Referenced by ns3::UdpHeader::CalculateHeaderChecksum(), ns3::TcpHeader::CalculateHeaderChecksum(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize(), ns3::Buffer::CreateFullCopy(), BufferTest::DoRun(), ns3::OfdmUcdChannelEncodings::DoWrite(), ns3::OfdmDcdChannelEncodings::DoWrite(), ns3::EpcX2Header::Serialize(), ns3::TcpOptionEnd::Serialize(), ns3::AmpduSubframeHeader::Serialize(), ns3::TcpOptionTS::Serialize(), ns3::GtpuHeader::Serialize(), ns3::flame::FlameHeader::Serialize(), ns3::WimaxMacToMacHeader::Serialize(), ns3::TcpOptionSackPermitted::Serialize(), BenchHeader< N >::Serialize(), ns3::TcpOptionWinScale::Serialize(), ns3::TcpOptionSack::Serialize(), ns3::RadiotapHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::TcpOptionNOP::Serialize(), ns3::QKDCommandHeader::Serialize(), ns3::aodv::TypeHeader::Serialize(), ns3::aodvq::TypeHeader::Serialize(), ns3::dot11s::Dot11sMeshCapability::Serialize(), OptionWithoutAlignmentHeader::Serialize(), ns3::LtePdcpHeader::Serialize(), ns3::ManagementMessageType::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::UanHeaderRcData::Serialize(), ns3::TcpOptionMSS::Serialize(), ns3::ArpHeader::Serialize(), ns3::Ipv6ExtensionHeader::Serialize(), anonymous_namespace{packet-metadata-test.cc}::HistoryHeader< N >::Serialize(), ns3::Tlv::Serialize(), ns3::dsr::DsrOptionHeader::Serialize(), ns3::Ipv6OptionHeader::Serialize(), ns3::dot11s::MeshHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::LteRlcHeader::Serialize(), ns3::QKDDelimiterHeader::Serialize(), ns3::TcpOptionUnknown::Serialize(), ns3::UanHeaderCommon::Serialize(), OptionWithAlignmentHeader::Serialize(), ns3::aodv::RreqHeader::Serialize(), ns3::aodvq::RreqHeader::Serialize(), ns3::dsr::DsrFsHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::U8TlvValue::Serialize(), ns3::VendorSpecificActionHeader::Serialize(), ns3::RipHeader::Serialize(), ns3::dsr::DsrOptionPad1Header::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::SixLowPanHc1::Serialize(), ns3::Ipv6OptionPad1Header::Serialize(), ns3::UanHeaderRcRts::Serialize(), ns3::OfdmDownlinkFramePrefix::Serialize(), ns3::GenericMacHeader::Serialize(), ns3::QKDHeader::Serialize(), ns3::Ipv4Header::Serialize(), ns3::dsr::DsrOptionPadnHeader::Serialize(), ns3::WifiInformationElement::Serialize(), anonymous_namespace{packet-metadata-test.cc}::HistoryTrailer< N >::Serialize(), ns3::Ipv6OptionPadnHeader::Serialize(), ns3::LteRlcAmHeader::Serialize(), ns3::Ipv6ExtensionHopByHopHeader::Serialize(), ns3::Ipv6Header::Serialize(), anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >::Serialize(), ns3::RngRsp::Serialize(), ns3::DhcpHeader::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::dsr::DsrRoutingHeader::Serialize(), ns3::Ipv6ExtensionDestinationHeader::Serialize(), ns3::Ipv6OptionJumbogramHeader::Serialize(), ns3::BandwidthRequestHeader::Serialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Serialize(), ns3::aodvq::RrepHeader::Serialize(), ns3::aodv::RrepHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::SixLowPanFrag1::Serialize(), ns3::Ipv6OptionRouterAlertHeader::Serialize(), ns3::UanHeaderRcCts::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Dcd::Serialize(), ns3::Ucd::Serialize(), ns3::LrWpanMacHeader::Serialize(), ns3::GrantManagementSubheader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::TosTlvValue::Serialize(), ns3::UanHeaderRcAck::Serialize(), ns3::SixLowPanFragN::Serialize(), ns3::FragmentationSubheader::Serialize(), ns3::Ipv6ExtensionRoutingHeader::Serialize(), ns3::dsr::DsrOptionRrepHeader::Serialize(), ns3::aodv::RrepAckHeader::Serialize(), ns3::aodvq::RrepAckHeader::Serialize(), ns3::ProtocolTlvValue::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::DsaRsp::Serialize(), ns3::EpcX2LoadInformationHeader::Serialize(), ns3::aodvq::RerrHeader::Serialize(), ns3::aodv::RerrHeader::Serialize(), ns3::SixLowPanIpv6::Serialize(), ns3::DlMap::Serialize(), ns3::EpcX2ResourceStatusUpdateHeader::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::DsaAck::Serialize(), ns3::UlMap::Serialize(), ns3::PbbPacket::Serialize(), ns3::dsr::DsrOptionSRHeader::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::RngReq::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::dsr::DsrOptionRerrHeader::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::dsr::DsrOptionRerrUnreachHeader::Serialize(), ns3::WifiActionHeader::Serialize(), ns3::MgtAddBaRequestHeader::Serialize(), ns3::SixLowPanNhcExtension::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::PbbMessage::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::dsr::DsrOptionRerrUnsupportHeader::Serialize(), ns3::MgtAddBaResponseHeader::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::dsr::DsrOptionAckReqHeader::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::dsr::DsrOptionAckHeader::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::PbbAddressBlock::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6OptionLinkLayerAddress::Serialize(), ns3::PbbTlv::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::dot11s::IePeeringProtocol::SerializeInformationField(), ns3::HeCapabilities::SerializeInformationField(), ns3::CfParameterSet::SerializeInformationField(), ns3::DsssParameterSet::SerializeInformationField(), ns3::dot11s::IeMeshId::SerializeInformationField(), ns3::dot11s::IePerr::SerializeInformationField(), ns3::HeOperation::SerializeInformationField(), ns3::ErpInformation::SerializeInformationField(), ns3::dot11s::IeRann::SerializeInformationField(), ns3::dot11s::IePeerManagement::SerializeInformationField(), ns3::VhtOperation::SerializeInformationField(), ns3::dot11s::IeBeaconTiming::SerializeInformationField(), ns3::dot11s::IePrep::SerializeInformationField(), ns3::ExtendedCapabilities::SerializeInformationField(), ns3::dot11s::IeConfiguration::SerializeInformationField(), ns3::dot11s::IePreq::SerializeInformationField(), ns3::HtCapabilities::SerializeInformationField(), ns3::EdcaParameterSet::SerializeInformationField(), ns3::HtOperation::SerializeInformationField(), ns3::DlFramePrefixIe::Write(), ns3::OfdmUlBurstProfile::Write(), ns3::OfdmDlBurstProfile::Write(), ns3::OfdmDlMapIe::Write(), ns3::OfdmUlMapIe::Write(), and ns3::Asn1Header::WriteOctet().

+ Here is the call graph for this function:

void ns3::Buffer::Iterator::WriteU8 ( uint8_t  data,
uint32_t  len 
)
inline
Parameters
datadata to write in buffer
lennumber of times data must be written in buffer

Write the data in buffer len times and advance the iterator position by len byte.

Definition at line 887 of file buffer.h.

References CheckNoZero(), GetWriteErrorMessage(), m_current, m_data, m_zeroEnd, m_zeroStart, and NS_ASSERT_MSG().

+ Here is the call graph for this function:

Friends And Related Function Documentation

friend class Buffer
friend

Friend class.

Definition at line 386 of file buffer.h.

Member Data Documentation

uint32_t ns3::Buffer::Iterator::m_current
private

offset in virtual bytes from the start of the data buffer to the current position represented by this iterator.

Definition at line 479 of file buffer.h.

Referenced by GetDistanceFrom(), Iterator(), Next(), PeekU8(), Prev(), ReadNtohU16(), ReadNtohU32(), ReadU8(), Write(), WriteHtonU16(), WriteHtonU32(), and WriteU8().

uint8_t* ns3::Buffer::Iterator::m_data
private

a pointer to the underlying byte buffer.

All offsets are relative to this pointer.

Definition at line 484 of file buffer.h.

Referenced by Construct(), GetDistanceFrom(), PeekU8(), ReadNtohU16(), ReadNtohU32(), Write(), WriteHtonU16(), WriteHtonU32(), and WriteU8().

uint32_t ns3::Buffer::Iterator::m_dataEnd
private

offset in virtual bytes from the start of the data buffer to the end of the data which can be read by this iterator

Definition at line 474 of file buffer.h.

Referenced by Construct(), Iterator(), Next(), PeekU8(), and Write().

uint32_t ns3::Buffer::Iterator::m_dataStart
private

offset in virtual bytes from the start of the data buffer to the start of the data which can be read by this iterator

Definition at line 469 of file buffer.h.

Referenced by Construct(), Iterator(), and PeekU8().

uint32_t ns3::Buffer::Iterator::m_zeroEnd
private

offset in virtual bytes from the start of the data buffer to the end of the "virtual zero area".

Definition at line 464 of file buffer.h.

Referenced by Construct(), PeekU8(), ReadNtohU16(), ReadNtohU32(), Write(), WriteHtonU16(), WriteHtonU32(), and WriteU8().

uint32_t ns3::Buffer::Iterator::m_zeroStart
private

offset in virtual bytes from the start of the data buffer to the start of the "virtual zero area".

Definition at line 459 of file buffer.h.

Referenced by Construct(), PeekU8(), ReadNtohU16(), ReadNtohU32(), Write(), WriteHtonU16(), WriteHtonU32(), and WriteU8().


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