A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Buffer::Iterator Class Reference

iterator in a Buffer instance More...

#include "buffer.h"

Collaboration diagram for ns3::Buffer::Iterator:

Public Member Functions

 Iterator ()
uint16_t CalculateIpChecksum (uint16_t size)
 Calculate the checksum.
uint16_t CalculateIpChecksum (uint16_t size, uint32_t initialChecksum)
 Calculate the checksum.
uint32_t GetDistanceFrom (const Iterator &o) const
uint32_t GetRemainingSize () const
uint32_t GetSize () const
bool IsEnd () const
bool IsStart () const
void Next ()
 go forward by one byte
void Next (uint32_t delta)
uint8_t PeekU8 ()
void Prev ()
 go backward by one byte
void Prev (uint32_t delta)
template<Uint8tForwardIterator Iter>
void Read (Iter first, Iter last)
 Read into a range of uint8_t storage from the buffer.
void Read (Iterator start, uint32_t size)
void Read (uint8_t *buffer, uint32_t size)
uint16_t ReadLsbtohU16 ()
uint32_t ReadLsbtohU32 ()
uint64_t ReadLsbtohU64 ()
uint16_t ReadNtohU16 ()
uint32_t ReadNtohU32 ()
uint64_t ReadNtohU64 ()
uint16_t ReadU16 ()
uint32_t ReadU32 ()
uint64_t ReadU64 ()
uint8_t ReadU8 ()
void Write (const uint8_t *buffer, uint32_t size)
template<Uint8tForwardIterator Iter>
void Write (Iter first, Iter last)
 Write a range of uint8_t values into the buffer.
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 (const Buffer *buffer)
 Constructor - initializes the iterator to point to the buffer start.
 Iterator (const Buffer *buffer, bool dummy)
 Constructor - initializes the iterator to point to the buffer end.
bool Check (uint32_t i) const
 Checks that the buffer position is not in the "virtual zero area".
bool CheckNoZero (uint32_t start, uint32_t end) const
 Checks that the [start, end) is not in the "virtual zero area".
void Construct (const Buffer *buffer)
 Initializes the iterator values.
std::string GetReadErrorMessage () const
 Returns an appropriate message indicating a read error.
std::string GetWriteErrorMessage () const
 Returns an appropriate message indicating a write error.
uint16_t SlowReadNtohU16 ()
uint32_t SlowReadNtohU32 ()

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.
uint8_t * m_data
 a pointer to the underlying byte buffer.
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
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
uint32_t m_zeroEnd
 offset in virtual bytes from the start of the data buffer to the end of the "virtual zero area".
uint32_t m_zeroStart
 offset in virtual bytes from the start of the data buffer to the start of the "virtual zero area".

Friends

class Buffer
 Friend class.

Detailed Description

iterator in a Buffer instance

Definition at line 108 of file buffer.h.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

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

Definition at line 883 of file buffer.h.

References m_current, m_data, m_dataEnd, m_dataStart, m_zeroEnd, and m_zeroStart.

Referenced by GetDistanceFrom(), and Write().

Here is the caller graph for this function:

◆ Iterator() [2/3]

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

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

Parameters
bufferthe buffer this iterator refers to

Definition at line 893 of file buffer.h.

References Buffer, Construct(), m_current, and m_dataStart.

Here is the call graph for this function:

◆ Iterator() [3/3]

ns3::Buffer::Iterator::Iterator ( const Buffer * 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 899 of file buffer.h.

References Buffer, Construct(), m_current, and m_dataEnd.

Here is the call graph for this function:

Member Function Documentation

◆ CalculateIpChecksum() [1/2]

uint16_t ns3::Buffer::Iterator::CalculateIpChecksum ( uint16_t size)

◆ CalculateIpChecksum() [2/2]

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 1129 of file buffer.cc.

References NS_LOG_FUNCTION, ReadU16(), and ReadU8().

Here is the call graph for this function:

◆ Check()

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 805 of file buffer.cc.

References m_dataEnd, m_dataStart, m_zeroEnd, m_zeroStart, and NS_LOG_FUNCTION.

Referenced by WriteU8().

Here is the caller graph for this function:

◆ CheckNoZero()

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 797 of file buffer.cc.

References m_dataEnd, m_zeroEnd, m_zeroStart, and NS_LOG_FUNCTION.

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

Here is the caller graph for this function:

◆ Construct()

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

Initializes the iterator values.

Parameters
bufferthe buffer this iterator refers to

Definition at line 906 of file buffer.h.

References Buffer, ns3::Buffer::Data::m_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(), and Iterator().

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

◆ GetDistanceFrom()

uint32_t ns3::Buffer::Iterator::GetDistanceFrom ( const Iterator & 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.

Caller graph was not generated because of its size.

Definition at line 767 of file buffer.cc.

References Iterator(), m_current, m_data, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::AmpduSubframeHeader::Deserialize(), ns3::AmsduSubframeHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodv::TypeHeader::Deserialize(), ns3::CtrlBAckRequestHeader::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), ns3::CtrlTriggerHeader::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::FilsDiscHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::HeOperation::OpInfo6GHz::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::lrwpan::BeaconPayloadHeader::Deserialize(), ns3::lrwpan::CommandPayloadHeader::Deserialize(), ns3::lrwpan::LrWpanMacHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtDelBaHeader::Deserialize(), ns3::MgtEmlOmn::Deserialize(), ns3::UanHeaderCommon::Deserialize(), ns3::UanHeaderRcAck::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::UanHeaderRcData::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::WifiActionHeader::Deserialize(), ns3::WifiInformationElement::Deserialize(), ns3::WifiMacHeader::Deserialize(), ns3::zigbee::NwkAddrRequestCmd::Deserialize(), ns3::zigbee::NwkAddrResponseCmd::Deserialize(), ns3::zigbee::ZigbeeApsHeader::Deserialize(), ns3::zigbee::ZigbeeBeaconPayload::Deserialize(), ns3::zigbee::ZigbeeNwkHeader::Deserialize(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::Deserialize(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::Deserialize(), ns3::zigbee::ZigbeePayloadType::Deserialize(), ns3::MgtAssocRequestHeader::DeserializeFromPerStaProfileImpl(), ns3::MgtAssocResponseHeader::DeserializeFromPerStaProfileImpl(), ns3::MgtReassocRequestHeader::DeserializeFromPerStaProfileImpl(), ns3::MgtAssocRequestHeader::DeserializeImpl(), ns3::MgtAssocResponseHeader::DeserializeImpl(), ns3::MgtBeaconHeader::DeserializeImpl(), ns3::MgtProbeResponseHeader::DeserializeImpl(), ns3::MgtReassocRequestHeader::DeserializeImpl(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IeConfiguration::DeserializeInformationField(), ns3::dot11s::IeLinkMetricReport::DeserializeInformationField(), ns3::dot11s::IeMeshId::DeserializeInformationField(), ns3::dot11s::IePeeringProtocol::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::HeOperation::DeserializeInformationField(), ns3::MultiLinkElement::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), TestWifiInformationElement::DeserializeInformationField(), ns3::MeshInformationElementVector::DeserializeSingleIe(), and ns3::PbbMessage::Serialize().

Here is the call graph for this function:

◆ GetReadErrorMessage()

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

Returns an appropriate message indicating a read error.

Returns
the error message

Definition at line 1167 of file buffer.cc.

References NS_LOG_FUNCTION.

Referenced by PeekU8().

Here is the caller graph for this function:

◆ GetRemainingSize()

uint32_t ns3::Buffer::Iterator::GetRemainingSize ( ) const

◆ GetSize()

uint32_t ns3::Buffer::Iterator::GetSize ( ) const

◆ GetWriteErrorMessage()

std::string ns3::Buffer::Iterator::GetWriteErrorMessage ( ) 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 1181 of file buffer.cc.

References m_current, m_dataEnd, m_dataStart, m_zeroEnd, m_zeroStart, NS_ASSERT, and NS_LOG_FUNCTION.

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

Here is the caller graph for this function:

◆ IsEnd()

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

Definition at line 783 of file buffer.cc.

References m_current, m_dataEnd, and NS_LOG_FUNCTION.

Referenced by ns3::WifiInformationElement::DeserializeIfPresent(), and ns3::WifiInformationElement::DoDeserialize().

Here is the caller graph for this function:

◆ IsStart()

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

Definition at line 790 of file buffer.cc.

References m_current, m_dataStart, and NS_LOG_FUNCTION.

◆ Next() [1/2]

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

go forward by one byte

Definition at line 916 of file buffer.h.

References m_current, m_dataEnd, and NS_ASSERT.

Referenced by TcpHeaderWithRFC793OptionTestCase::CheckNoPadding(), WifiEhtCapabilitiesIeTest::CheckSerializedByte(), WifiIeFragmentationTest::CheckSerializedByte(), ns3::CtrlTriggerSpecialUserInfoField::Deserialize(), ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::Dhcp6Header::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::FilsDiscHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4Header::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::Icmpv6OptionSixLowPanCapabilityIndication::Deserialize(), ns3::Icmpv6OptionSixLowPanContext::Deserialize(), ns3::Icmpv6SixLowPanExtendedDuplicateAddressReqOrConf::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::LlcSnapHeader::Deserialize(), ns3::RipHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::EhtCapabilities::DeserializeInformationField(), ns3::MultiLinkElement::DeserializeInformationField(), ns3::GtpcIes::DeserializeUliEcgi(), ns3::WifiInformationElement::DoDeserialize(), BufferTest::DoRun(), ns3::PacketMetadata::ItemIterator::Next(), TcpHeaderWithRFC793OptionTestCase::OneOptionAtTime(), ns3::Packet::PeekHeader(), ns3::Packet::Print(), Read(), ns3::Packet::RemoveHeader(), ns3::CtrlTriggerSpecialUserInfoField::Serialize(), ns3::CtrlTriggerUserInfoField::Serialize(), ns3::Dhcp6Header::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Ipv4Header::Serialize(), ns3::RipHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::UdpHeader::Serialize(), and ns3::WifiInformationElement::Serialize().

◆ Next() [2/2]

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

Definition at line 930 of file buffer.h.

References m_current, m_dataEnd, and NS_ASSERT.

◆ PeekU8()

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

Read data, but do not advance the Iterator read.

Definition at line 1069 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(), ns3::MultiLinkElement::DeserializeInformationField(), ns3::WifiInformationElement::DoDeserialize(), and ReadU8().

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

◆ Prev() [1/2]

◆ Prev() [2/2]

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

Definition at line 937 of file buffer.h.

References m_current, and NS_ASSERT.

◆ Read() [1/3]

template<Uint8tForwardIterator Iter>
void ns3::Buffer::Iterator::Read ( Iter first,
Iter last )
inline

Read into a range of uint8_t storage from the buffer.

Template Parameters
Itera forward iterator with value type uint8_t
Parameters
firststart of the destination range
lastone-past-the-end of the destination range

Advances the iterator position by std::distance(first, last) bytes.

Definition at line 405 of file buffer.h.

References Read(), and ReadU8().

Here is the call graph for this function:

◆ Read() [2/3]

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 1110 of file buffer.h.

References Next().

Here is the call graph for this function:

◆ Read() [3/3]

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 1112 of file buffer.cc.

References NS_LOG_FUNCTION, and ReadU8().

Referenced by ns3::SixLowPanNetDevice::CompressLowPanGhcNhc(), ns3::Dhcp6Header::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dsr::DsrOptionRrepHeader::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::dsr::DsrOptionSRHeader::Deserialize(), ns3::Duid::Deserialize(), ns3::FilsDiscHeader::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6OptionLinkLayerAddress::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::Deserialize(), ns3::Icmpv6OptionSixLowPanContext::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::SixLowPanHc1::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::SixLowPanMesh::Deserialize(), ns3::SixLowPanNhcExtension::Deserialize(), ns3::TcpOptionUnknown::Deserialize(), ns3::dot11s::IeMeshId::DeserializeInformationField(), BufferTest::DoRun(), Read(), ns3::ReadFrom(), ns3::ReadFrom(), ns3::ReadFrom(), ns3::ReadFrom(), and ns3::ReadFrom().

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

◆ ReadLsbtohU16()

uint16_t ns3::Buffer::Iterator::ReadLsbtohU16 ( )
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 least significant byte format and returned in host format.

Deprecated
"Deprecated in ns-3.48: " "Use Buffer::Iterator::ReadU16 instead"

Definition at line 1051 of file buffer.cc.

References data, NS_LOG_FUNCTION, and ReadU8().

Here is the call graph for this function:

◆ ReadLsbtohU32()

uint32_t ns3::Buffer::Iterator::ReadLsbtohU32 ( )
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 least significant byte format and returned in host format.

Deprecated
"Deprecated in ns-3.48: " "Use Buffer::Iterator::ReadU32 instead"

Definition at line 1063 of file buffer.cc.

References data, NS_LOG_FUNCTION, and ReadU8().

Here is the call graph for this function:

◆ ReadLsbtohU64()

uint64_t ns3::Buffer::Iterator::ReadLsbtohU64 ( )
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.

Deprecated
"Deprecated in ns-3.48: " "Use Buffer::Iterator::ReadU64 instead"

Definition at line 1081 of file buffer.cc.

References data, NS_LOG_FUNCTION, and ReadU8().

Here is the call graph for this function:

◆ ReadNtohU16()

uint16_t ns3::Buffer::Iterator::ReadNtohU16 ( )
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.

Caller graph was not generated because of its size.

Definition at line 1017 of file buffer.h.

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

Referenced by ns3::AmsduSubframeHeader::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::Dhcp6Header::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dsr::DsrOptionAckHeader::Deserialize(), ns3::dsr::DsrOptionAckReqHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::Duid::Deserialize(), ns3::EpcX2HandoverCancelHeader::Deserialize(), ns3::EpcX2HandoverPreparationFailureHeader::Deserialize(), ns3::EpcX2HandoverRequestAckHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2Header::Deserialize(), ns3::EpcX2LoadInformationHeader::Deserialize(), ns3::EpcX2ResourceStatusUpdateHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::EpcX2UeContextReleaseHeader::Deserialize(), ns3::EthernetHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Icmpv6OptionSixLowPanContext::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::Ipv6OptionJumbogramHeader::Deserialize(), ns3::Ipv6OptionRouterAlertHeader::Deserialize(), ns3::LlcSnapHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::olsr::MessageHeader::Tc::Deserialize(), ns3::olsr::PacketHeader::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::RipRte::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::SllHeader::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::TcpOptionMSS::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::GtpcIes::DeserializeBearerContextHeader(), ns3::GtpcIes::DeserializeBearerQos(), ns3::GtpcIes::DeserializeBearerTft(), ns3::GtpcIes::DeserializeCause(), ns3::GtpcIes::DeserializeEbi(), ns3::GtpcIes::DeserializeFteid(), ns3::GtpcIes::DeserializeImsi(), ns3::GtpcIes::DeserializeUliEcgi(), BufferTest::DoRun(), and ns3::GtpcHeader::PreDeserialize().

Here is the call graph for this function:

◆ ReadNtohU32()

uint32_t ns3::Buffer::Iterator::ReadNtohU32 ( )
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 1041 of file buffer.h.

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

Referenced by ns3::aodv::RerrHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::Dhcp6Header::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::EpcX2HandoverRequestAckHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::olsr::MessageHeader::Hna::Deserialize(), ns3::olsr::MessageHeader::Mid::Deserialize(), ns3::olsr::MessageHeader::Tc::Deserialize(), ns3::RipRte::Deserialize(), ns3::SeqTsEchoHeader::Deserialize(), ns3::SeqTsHeader::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::TcpOptionSack::Deserialize(), ns3::TcpOptionTS::Deserialize(), ns3::GtpcIes::DeserializeBearerTft(), ns3::GtpcIes::DeserializeFteid(), ns3::GtpcIes::DeserializeUliEcgi(), ns3::GtpcHeader::PreDeserialize(), and ns3::ReadFrom().

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

◆ ReadNtohU64()

uint64_t ns3::Buffer::Iterator::ReadNtohU64 ( )
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 1028 of file buffer.cc.

References NS_LOG_FUNCTION, and ReadU8().

Referenced by ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::SeqTsEchoHeader::Deserialize(), ns3::SeqTsHeader::Deserialize(), ns3::SeqTsSizeHeader::Deserialize(), ns3::SllHeader::Deserialize(), ns3::GtpcIes::DeserializeImsi(), and BufferTest::DoRun().

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

◆ ReadU16()

uint16_t ns3::Buffer::Iterator::ReadU16 ( )
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 1098 of file buffer.h.

References data, and ReadU8().

Referenced by CalculateIpChecksum(), ns3::AmpduSubframeHeader::Deserialize(), ns3::CommonInfoBasicMle::Deserialize(), ns3::CtrlBAckRequestHeader::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), ns3::CtrlTriggerHeader::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::EhtMacCapabilities::Deserialize(), ns3::FilsDiscHeader::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::Deserialize(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6SixLowPanExtendedDuplicateAddressReqOrConf::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::lrwpan::BeaconPayloadHeader::Deserialize(), ns3::lrwpan::CommandPayloadHeader::Deserialize(), ns3::lrwpan::LrWpanMacHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtDelBaHeader::Deserialize(), ns3::MgtEmlOmn::Deserialize(), ns3::RipHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::SixLowPanFrag1::Deserialize(), ns3::SixLowPanFragN::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::WifiMacHeader::Deserialize(), ns3::zigbee::ZigbeeApsHeader::Deserialize(), ns3::zigbee::ZigbeeBeaconPayload::Deserialize(), ns3::zigbee::ZigbeeNwkHeader::Deserialize(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::Deserialize(), ns3::MgtAssocRequestHeader::DeserializeImpl(), ns3::MgtAssocResponseHeader::DeserializeImpl(), ns3::MgtBeaconHeader::DeserializeImpl(), ns3::MgtProbeResponseHeader::DeserializeImpl(), ns3::MgtReassocRequestHeader::DeserializeImpl(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HeOperation::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::MultiLinkElement::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), ns3::ReducedNeighborReport::DeserializeInformationField(), ns3::VhtOperation::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserProbeReqMlePerSta(), BasicMultiLinkElementTest::DoRun(), and BufferTest::DoRun().

Here is the call graph for this function:

◆ ReadU32()

uint32_t ns3::Buffer::Iterator::ReadU32 ( )
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 the format written by WriteU32.

Definition at line 953 of file buffer.cc.

References data, NS_LOG_FUNCTION, and ReadU8().

Referenced by ns3::CtrlBAckResponseHeader::Deserialize(), ns3::CtrlTriggerSpecialUserInfoField::Deserialize(), ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::EthernetTrailer::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::lrwpan::LrWpanMacHeader::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::zigbee::ZigbeeBeaconPayload::Deserialize(), ns3::dot11s::IeLinkMetricReport::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::EdcaParameterSet::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::ReducedNeighborReport::DeserializeInformationField(), and ns3::VhtCapabilities::DeserializeInformationField().

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

◆ ReadU64()

uint64_t ns3::Buffer::Iterator::ReadU64 ( )
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 971 of file buffer.cc.

References data, NS_LOG_FUNCTION, and ReadU8().

Referenced by ns3::CtrlTriggerHeader::Deserialize(), ns3::EhtPhyCapabilities::Deserialize(), ns3::EthernetHeader::Deserialize(), ns3::FilsDiscHeader::Deserialize(), ns3::lrwpan::LrWpanMacHeader::Deserialize(), ns3::zigbee::ZigbeeBeaconPayload::Deserialize(), ns3::MgtBeaconHeader::DeserializeImpl(), ns3::MgtProbeResponseHeader::DeserializeImpl(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::VhtCapabilities::DeserializeInformationField(), and BufferTest::DoRun().

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

◆ ReadU8()

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

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

Caller graph was not generated because of its size.

Definition at line 1090 of file buffer.h.

References m_current, and PeekU8().

Referenced by CalculateIpChecksum(), TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize(), TcpHeaderWithRFC793OptionTestCase::CheckNoPadding(), TimInformationElementTest::CheckSerializationAgainstBuffer(), WifiEhtCapabilitiesIeTest::CheckSerializedByte(), WifiIeFragmentationTest::CheckSerializedByte(), anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >::Deserialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Deserialize(), ns3::AmpduSubframeHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodv::TypeHeader::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::CommonInfoBasicMle::Deserialize(), ns3::CtrlTriggerSpecialUserInfoField::Deserialize(), ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::dot11s::Dot11sMeshCapability::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dsr::DsrOptionAckHeader::Deserialize(), ns3::dsr::DsrOptionAckReqHeader::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::dsr::DsrOptionPad1Header::Deserialize(), ns3::dsr::DsrOptionPadnHeader::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnreachHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Deserialize(), ns3::dsr::DsrOptionRrepHeader::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::dsr::DsrOptionSRHeader::Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::EhtMcsAndNssSet::Deserialize(), ns3::EhtPhyCapabilities::Deserialize(), ns3::EhtPpeThresholds::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2Header::Deserialize(), ns3::EpcX2LoadInformationHeader::Deserialize(), ns3::EpcX2ResourceStatusUpdateHeader::Deserialize(), ns3::FilsDiscHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::HeOperation::OpInfo6GHz::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4Header::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6OptionLinkLayerAddress::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::Deserialize(), ns3::Icmpv6OptionSixLowPanCapabilityIndication::Deserialize(), ns3::Icmpv6OptionSixLowPanContext::Deserialize(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6SixLowPanExtendedDuplicateAddressReqOrConf::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::Ipv6ExtensionDestinationHeader::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Ipv6ExtensionHopByHopHeader::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::Ipv6ExtensionRoutingHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::Ipv6OptionJumbogramHeader::Deserialize(), ns3::Ipv6OptionPad1Header::Deserialize(), ns3::Ipv6OptionPadnHeader::Deserialize(), ns3::Ipv6OptionRouterAlertHeader::Deserialize(), ns3::lrwpan::CommandPayloadHeader::Deserialize(), ns3::lrwpan::GtsFields::Deserialize(), ns3::lrwpan::LrWpanMacHeader::Deserialize(), ns3::lrwpan::PendingAddrFields::Deserialize(), ns3::LtePdcpHeader::Deserialize(), ns3::LteRlcAmHeader::Deserialize(), ns3::LteRlcHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtEmlOmn::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::RipHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::SixLowPanBc0::Deserialize(), ns3::SixLowPanFrag1::Deserialize(), ns3::SixLowPanFragN::Deserialize(), ns3::SixLowPanHc1::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::SixLowPanIpv6::Deserialize(), ns3::SixLowPanMesh::Deserialize(), ns3::SixLowPanNhcExtension::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::TcpOptionEnd::Deserialize(), ns3::TcpOptionMSS::Deserialize(), ns3::TcpOptionNOP::Deserialize(), ns3::TcpOptionSack::Deserialize(), ns3::TcpOptionSackPermitted::Deserialize(), ns3::TcpOptionTS::Deserialize(), ns3::TcpOptionUnknown::Deserialize(), ns3::TcpOptionWinScale::Deserialize(), ns3::UanHeaderCommon::Deserialize(), ns3::UanHeaderRcAck::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::WifiActionHeader::Deserialize(), ns3::zigbee::NwkAddrRequestCmd::Deserialize(), ns3::zigbee::NwkAddrResponseCmd::Deserialize(), ns3::zigbee::ZigbeeApsHeader::Deserialize(), ns3::zigbee::ZigbeeBeaconPayload::Deserialize(), ns3::zigbee::ZigbeeNwkHeader::Deserialize(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::Deserialize(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::Deserialize(), ns3::zigbee::ZigbeePayloadType::Deserialize(), ns3::GtpcIes::DeserializeBearerContextHeader(), ns3::GtpcIes::DeserializeBearerQos(), ns3::GtpcIes::DeserializeBearerTft(), ns3::CtrlBAckResponseHeader::DeserializeBitmap(), ns3::Asn1Header::DeserializeBitset(), ns3::GtpcIes::DeserializeCause(), ns3::GtpcIes::DeserializeEbi(), ns3::GtpcIes::DeserializeFteid(), ns3::WifiInformationElement::DeserializeIfPresent(), ns3::GtpcIes::DeserializeImsi(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IeConfiguration::DeserializeInformationField(), ns3::dot11s::IePeeringProtocol::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::DsssParameterSet::DeserializeInformationField(), ns3::EdcaParameterSet::DeserializeInformationField(), ns3::ErpInformation::DeserializeInformationField(), ns3::ExtendedCapabilities::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::MuEdcaParameterSet::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), ns3::ReducedNeighborReport::DeserializeInformationField(), ns3::VhtOperation::DeserializeInformationField(), ns3::MeshInformationElementVector::DeserializeSingleIe(), ns3::GtpcIes::DeserializeUliEcgi(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserProbeReqMlePerSta(), ns3::WifiInformationElement::DoDeserialize(), BufferTest::DoRun(), TcpHeaderWithRFC793OptionTestCase::OneOptionAtTime(), ns3::GtpcHeader::PreDeserialize(), Read(), Read(), ReadLsbtohU16(), ReadLsbtohU32(), ReadLsbtohU64(), ns3::GtpcIes::ReadNtohU40(), ReadNtohU64(), ReadU16(), ReadU32(), ReadU64(), ns3::WifiInformationElement::SerializeFragments(), SlowReadNtohU16(), SlowReadNtohU32(), and ns3::HeaderSerializationTestCase::TestHeaderSerialization().

Here is the call graph for this function:

◆ SlowReadNtohU16()

uint16_t ns3::Buffer::Iterator::SlowReadNtohU16 ( )
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 ()

Definition at line 1002 of file buffer.cc.

References NS_LOG_FUNCTION, and ReadU8().

Referenced by ReadNtohU16().

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

◆ SlowReadNtohU32()

uint32_t ns3::Buffer::Iterator::SlowReadNtohU32 ( )
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 ()

Definition at line 1013 of file buffer.cc.

References NS_LOG_FUNCTION, and ReadU8().

Referenced by ReadNtohU32().

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

◆ Write() [1/3]

void ns3::Buffer::Iterator::Write ( const uint8_t * 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 935 of file buffer.cc.

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

Referenced by ns3::Packet::Packet(), ns3::Buffer::AddAtEnd(), ns3::Icmpv6Header::CalculateHeaderChecksum(), ns3::Buffer::CreateFullCopy(), ns3::SixLowPanNetDevice::DecompressLowPanGhcNhc(), ns3::SixLowPanNetDevice::DecompressLowPanNhc(), ns3::Buffer::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), BufferTest::DoRun(), ns3::GhcAddIcmpv6TypedHeader(), ns3::GhcIcmpHdrSize(), ns3::Asn1Header::Serialize(), ns3::Dhcp6Header::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dsr::DsrOptionHeader::Serialize(), ns3::dsr::DsrOptionRerrHeader::Serialize(), ns3::dsr::DsrOptionRrepHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::dsr::DsrOptionSRHeader::Serialize(), ns3::Duid::Serialize(), ns3::FilsDiscHeader::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6OptionLinkLayerAddress::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::Serialize(), ns3::Icmpv6OptionSixLowPanContext::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Ipv6ExtensionHeader::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::Ipv6OptionHeader::Serialize(), ns3::LlcSnapHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::SixLowPanHc1::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::SixLowPanMesh::Serialize(), ns3::SixLowPanNhcExtension::Serialize(), ns3::TcpOptionUnknown::Serialize(), ns3::WriteTo(), ns3::WriteTo(), ns3::WriteTo(), ns3::WriteTo(), and ns3::WriteTo().

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

◆ Write() [2/3]

template<Uint8tForwardIterator Iter>
void ns3::Buffer::Iterator::Write ( Iter first,
Iter last )
inline

Write a range of uint8_t values into the buffer.

Template Parameters
Itera forward iterator with value type uint8_t
Parameters
firststart of the range to copy in
lastone-past-the-end of the range to copy in

Advances the iterator position by std::distance(first, last) bytes.

Definition at line 284 of file buffer.h.

References WriteU8().

Here is the call graph for this function:

◆ Write() [3/3]

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 812 of file buffer.cc.

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

Here is the call graph for this function:

◆ WriteHtolsbU16()

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

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

Deprecated
"Deprecated in ns-3.48: " "Use Buffer::Iterator::WriteU16 instead"

Definition at line 889 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

Here is the call graph for this function:

◆ WriteHtolsbU32()

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.

Deprecated
"Deprecated in ns-3.48: " "Use Buffer::Iterator::WriteU32 instead"

Definition at line 897 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

Here is the call graph for this function:

◆ WriteHtolsbU64()

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.

Deprecated
"Deprecated in ns-3.48: " "Use Buffer::Iterator::WriteU64 instead"

Definition at line 907 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

Here is the call graph for this function:

◆ WriteHtonU16()

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 (big-endian) and the input data is expected to be in host order.

Caller graph was not generated because of its size.

Definition at line 978 of file buffer.h.

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

Referenced by BufferTest::DoRun(), ns3::GtpcHeader::PreSerialize(), ns3::AmsduSubframeHeader::Serialize(), ns3::ArpHeader::Serialize(), ns3::Dhcp6Header::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dsr::DsrOptionAckHeader::Serialize(), ns3::dsr::DsrOptionAckReqHeader::Serialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::dsr::DsrRoutingHeader::Serialize(), ns3::Duid::Serialize(), ns3::EpcX2HandoverCancelHeader::Serialize(), ns3::EpcX2HandoverPreparationFailureHeader::Serialize(), ns3::EpcX2HandoverRequestAckHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2Header::Serialize(), ns3::EpcX2LoadInformationHeader::Serialize(), ns3::EpcX2ResourceStatusUpdateHeader::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::EpcX2UeContextReleaseHeader::Serialize(), ns3::EthernetHeader::Serialize(), ns3::flame::FlameHeader::Serialize(), ns3::GtpuHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Ipv4Header::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::Ipv6OptionRouterAlertHeader::Serialize(), ns3::LlcSnapHeader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::olsr::MessageHeader::Tc::Serialize(), ns3::olsr::PacketHeader::Serialize(), ns3::PbbAddressTlvBlock::Serialize(), ns3::PbbMessage::Serialize(), ns3::PbbTlvBlock::Serialize(), ns3::RipNgRte::Serialize(), ns3::RipRte::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::SllHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::TcpOptionMSS::Serialize(), ns3::UdpHeader::Serialize(), ns3::GtpcIes::SerializeBearerQos(), ns3::GtpcIes::SerializeBearerTft(), ns3::GtpcIes::SerializeCause(), ns3::GtpcIes::SerializeEbi(), ns3::GtpcIes::SerializeFteid(), ns3::GtpcIes::SerializeImsi(), and ns3::GtpcIes::SerializeUliEcgi().

Here is the call graph for this function:

◆ WriteHtonU32()

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 (big-endian) and the input data is expected to be in host order.

Definition at line 996 of file buffer.h.

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

Referenced by BufferTest::DoRun(), ns3::GtpcHeader::PreSerialize(), ns3::aodv::RerrHeader::Serialize(), ns3::aodv::RrepHeader::Serialize(), ns3::aodv::RreqHeader::Serialize(), ns3::Dhcp6Header::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dsdv::DsdvHeader::Serialize(), ns3::EpcX2HandoverRequestAckHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::GtpuHeader::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Ipv4Header::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::Ipv6OptionJumbogramHeader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Hna::Serialize(), ns3::olsr::MessageHeader::Mid::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::olsr::MessageHeader::Tc::Serialize(), ns3::RipRte::Serialize(), ns3::SeqTsEchoHeader::Serialize(), ns3::SeqTsHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::TcpOptionSack::Serialize(), ns3::TcpOptionTS::Serialize(), ns3::GtpcIes::SerializeBearerTft(), ns3::GtpcIes::SerializeFteid(), ns3::GtpcIes::SerializeUliEcgi(), and ns3::WriteTo().

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

◆ WriteHtonU64()

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 (big-endian) and the input data is expected to be in host order.

Definition at line 921 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

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

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

◆ WriteU16()

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 little-endian. We ensure that ReadU16 will return exactly what we wrote with WriteU16 if the program is run on the same machine.

Definition at line 846 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

Referenced by ns3::Icmpv6Header::CalculateHeaderChecksum(), ns3::TcpHeader::CalculateHeaderChecksum(), ns3::UdpHeader::CalculateHeaderChecksum(), BufferTest::DoRun(), ns3::AmpduSubframeHeader::Serialize(), ns3::CtrlBAckRequestHeader::Serialize(), ns3::CtrlBAckResponseHeader::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dot11s::PeerLinkConfirmStart::Serialize(), ns3::dot11s::PeerLinkOpenStart::Serialize(), ns3::FilsDiscHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::Serialize(), ns3::Icmpv6OptionSixLowPanContext::Serialize(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6SixLowPanExtendedDuplicateAddressReqOrConf::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Ipv4Header::Serialize(), ns3::lrwpan::BeaconPayloadHeader::Serialize(), ns3::lrwpan::CommandPayloadHeader::Serialize(), ns3::lrwpan::LrWpanMacHeader::Serialize(), ns3::MgtAddBaRequestHeader::Serialize(), ns3::MgtAddBaResponseHeader::Serialize(), ns3::MgtDelBaHeader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::RipHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::SixLowPanFrag1::Serialize(), ns3::SixLowPanFragN::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::TcpHeader::Serialize(), ns3::UdpHeader::Serialize(), ns3::WifiMacHeader::Serialize(), ns3::zigbee::ZigbeeApsHeader::Serialize(), ns3::zigbee::ZigbeeBeaconPayload::Serialize(), ns3::zigbee::ZigbeeNwkHeader::Serialize(), ns3::GtpcIes::SerializeBearerContextHeader(), ns3::MgtAssocRequestHeader::SerializeImpl(), ns3::MgtAssocResponseHeader::SerializeImpl(), ns3::MgtBeaconHeader::SerializeImpl(), ns3::MgtProbeResponseHeader::SerializeImpl(), ns3::MgtReassocRequestHeader::SerializeImpl(), ns3::dot11s::IeBeaconTiming::SerializeInformationField(), and ns3::dot11s::IePeerManagement::SerializeInformationField().

Here is the call graph for this function:

◆ WriteU32()

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

Write the data in buffer and advance the iterator position by four bytes. The format of the data written in the byte buffer is little-endian. We ensure that ReadU32 will return exactly what we wrote with WriteU32 if the program is run on the same machine.

Definition at line 855 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

Referenced by ns3::CtrlBAckResponseHeader::Serialize(), ns3::CtrlTriggerSpecialUserInfoField::Serialize(), ns3::CtrlTriggerUserInfoField::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dot11s::MeshHeader::Serialize(), ns3::EthernetTrailer::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Icmpv6OptionSixLowPanCapabilityIndication::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::lrwpan::LrWpanMacHeader::Serialize(), ns3::zigbee::ZigbeeBeaconPayload::Serialize(), ns3::dot11s::IeLinkMetricReport::SerializeInformationField(), ns3::dot11s::IePerr::SerializeInformationField(), ns3::dot11s::IePrep::SerializeInformationField(), ns3::dot11s::IePreq::SerializeInformationField(), and ns3::dot11s::IeRann::SerializeInformationField().

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

◆ WriteU64()

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 little-endian. We ensure that ReadU64 will return exactly what we wrote with WriteU64 if the program is run on the same machine.

Definition at line 868 of file buffer.cc.

References data, NS_LOG_FUNCTION, and WriteU8().

Referenced by BufferTest::DoRun(), ns3::CtrlTriggerHeader::Serialize(), ns3::EthernetHeader::Serialize(), ns3::FilsDiscHeader::Serialize(), ns3::lrwpan::LrWpanMacHeader::Serialize(), ns3::zigbee::ZigbeeBeaconPayload::Serialize(), ns3::MgtBeaconHeader::SerializeImpl(), and ns3::MgtProbeResponseHeader::SerializeImpl().

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

◆ WriteU8() [1/2]

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.

Caller graph was not generated because of its size.

Definition at line 944 of file buffer.h.

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

Referenced by ns3::Icmpv6Header::CalculateHeaderChecksum(), ns3::TcpHeader::CalculateHeaderChecksum(), ns3::UdpHeader::CalculateHeaderChecksum(), TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize(), ns3::Buffer::CreateFullCopy(), ns3::WifiInformationElement::DoDeserialize(), BufferTest::DoRun(), ns3::GhcIcmpHdrSize(), ns3::GtpcHeader::PreSerialize(), anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >::Serialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Serialize(), ns3::AmpduSubframeHeader::Serialize(), ns3::aodv::RerrHeader::Serialize(), ns3::aodv::RrepAckHeader::Serialize(), ns3::aodv::RrepHeader::Serialize(), ns3::aodv::RreqHeader::Serialize(), ns3::aodv::TypeHeader::Serialize(), ns3::ArpHeader::Serialize(), ns3::CtrlTriggerHeader::Serialize(), ns3::CtrlTriggerSpecialUserInfoField::Serialize(), ns3::CtrlTriggerUserInfoField::Serialize(), ns3::DhcpHeader::Serialize(), ns3::dot11s::Dot11sMeshCapability::Serialize(), ns3::dot11s::MeshHeader::Serialize(), ns3::dsr::DsrOptionAckHeader::Serialize(), ns3::dsr::DsrOptionAckReqHeader::Serialize(), ns3::dsr::DsrOptionHeader::Serialize(), ns3::dsr::DsrOptionPad1Header::Serialize(), ns3::dsr::DsrOptionPadnHeader::Serialize(), ns3::dsr::DsrOptionRerrHeader::Serialize(), ns3::dsr::DsrOptionRerrUnreachHeader::Serialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Serialize(), ns3::dsr::DsrOptionRrepHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::dsr::DsrOptionSRHeader::Serialize(), ns3::dsr::DsrRoutingHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2Header::Serialize(), ns3::EpcX2LoadInformationHeader::Serialize(), ns3::EpcX2ResourceStatusUpdateHeader::Serialize(), ns3::FilsDiscHeader::Serialize(), ns3::flame::FlameHeader::Serialize(), ns3::GtpuHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6OptionLinkLayerAddress::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::Serialize(), ns3::Icmpv6OptionSixLowPanCapabilityIndication::Serialize(), ns3::Icmpv6OptionSixLowPanContext::Serialize(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6SixLowPanExtendedDuplicateAddressReqOrConf::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Ipv4Header::Serialize(), ns3::Ipv6ExtensionDestinationHeader::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Ipv6ExtensionHeader::Serialize(), ns3::Ipv6ExtensionHopByHopHeader::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::Ipv6ExtensionRoutingHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::Ipv6OptionHeader::Serialize(), ns3::Ipv6OptionJumbogramHeader::Serialize(), ns3::Ipv6OptionPad1Header::Serialize(), ns3::Ipv6OptionPadnHeader::Serialize(), ns3::Ipv6OptionRouterAlertHeader::Serialize(), ns3::lrwpan::CommandPayloadHeader::Serialize(), ns3::lrwpan::GtsFields::Serialize(), ns3::lrwpan::LrWpanMacHeader::Serialize(), ns3::lrwpan::PendingAddrFields::Serialize(), ns3::LtePdcpHeader::Serialize(), ns3::LteRlcAmHeader::Serialize(), ns3::LteRlcHeader::Serialize(), ns3::MgtAddBaRequestHeader::Serialize(), ns3::MgtAddBaResponseHeader::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::PbbAddressBlock::Serialize(), ns3::PbbMessage::Serialize(), ns3::PbbPacket::Serialize(), ns3::PbbTlv::Serialize(), ns3::RipHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::SixLowPanBc0::Serialize(), ns3::SixLowPanFrag1::Serialize(), ns3::SixLowPanFragN::Serialize(), ns3::SixLowPanHc1::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::SixLowPanIpv6::Serialize(), ns3::SixLowPanMesh::Serialize(), ns3::SixLowPanNhcExtension::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::TcpHeader::Serialize(), ns3::TcpOptionEnd::Serialize(), ns3::TcpOptionMSS::Serialize(), ns3::TcpOptionNOP::Serialize(), ns3::TcpOptionSack::Serialize(), ns3::TcpOptionSackPermitted::Serialize(), ns3::TcpOptionTS::Serialize(), ns3::TcpOptionUnknown::Serialize(), ns3::TcpOptionWinScale::Serialize(), ns3::WifiInformationElement::Serialize(), ns3::zigbee::NwkAddrRequestCmd::Serialize(), ns3::zigbee::NwkAddrResponseCmd::Serialize(), ns3::zigbee::ZigbeeApsHeader::Serialize(), ns3::zigbee::ZigbeeBeaconPayload::Serialize(), ns3::zigbee::ZigbeeNwkHeader::Serialize(), ns3::zigbee::ZigbeePayloadRouteReplyCommand::Serialize(), ns3::zigbee::ZigbeePayloadRouteRequestCommand::Serialize(), ns3::zigbee::ZigbeePayloadType::Serialize(), ns3::GtpcIes::SerializeBearerContextHeader(), ns3::GtpcIes::SerializeBearerQos(), ns3::GtpcIes::SerializeBearerTft(), ns3::CtrlBAckResponseHeader::SerializeBitmap(), ns3::GtpcIes::SerializeCause(), ns3::GtpcIes::SerializeEbi(), ns3::WifiInformationElement::SerializeFragments(), ns3::GtpcIes::SerializeFteid(), ns3::GtpcIes::SerializeImsi(), ns3::dot11s::IeBeaconTiming::SerializeInformationField(), ns3::dot11s::IeConfiguration::SerializeInformationField(), ns3::dot11s::IeMeshId::SerializeInformationField(), ns3::dot11s::IePeeringProtocol::SerializeInformationField(), ns3::dot11s::IePeerManagement::SerializeInformationField(), ns3::dot11s::IePerr::SerializeInformationField(), ns3::dot11s::IePrep::SerializeInformationField(), ns3::dot11s::IePreq::SerializeInformationField(), ns3::dot11s::IeRann::SerializeInformationField(), ns3::GtpcIes::SerializeUliEcgi(), Write(), WriteHtolsbU16(), WriteHtolsbU32(), WriteHtolsbU64(), ns3::GtpcIes::WriteHtonU40(), WriteHtonU64(), ns3::Asn1Header::WriteOctet(), WriteU16(), WriteU32(), and WriteU64().

Here is the call graph for this function:

◆ WriteU8() [2/2]

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.

Caller graph was not generated because of its size.

Definition at line 961 of file buffer.h.

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

Here is the call graph for this function:

◆ Buffer

friend class Buffer
friend

Friend class.

Definition at line 450 of file buffer.h.

References Buffer.

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

Member Data Documentation

◆ m_current

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 543 of file buffer.h.

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

◆ m_data

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 548 of file buffer.h.

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

◆ m_dataEnd

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 538 of file buffer.h.

Referenced by Iterator(), Iterator(), Check(), CheckNoZero(), Construct(), GetRemainingSize(), GetSize(), GetWriteErrorMessage(), IsEnd(), Next(), Next(), and PeekU8().

◆ m_dataStart

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 533 of file buffer.h.

Referenced by Iterator(), Iterator(), Check(), Construct(), GetSize(), GetWriteErrorMessage(), IsStart(), and PeekU8().

◆ m_zeroEnd

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 528 of file buffer.h.

Referenced by Iterator(), Check(), CheckNoZero(), Construct(), GetWriteErrorMessage(), PeekU8(), ReadNtohU16(), ReadNtohU32(), Write(), Write(), WriteHtonU16(), WriteHtonU32(), WriteU8(), and WriteU8().

◆ m_zeroStart

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 523 of file buffer.h.

Referenced by Iterator(), Check(), CheckNoZero(), Construct(), GetWriteErrorMessage(), PeekU8(), ReadNtohU16(), ReadNtohU32(), Write(), Write(), WriteHtonU16(), WriteHtonU32(), WriteU8(), and WriteU8().


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