iterator in a Buffer instance More...
#include "buffer.h"
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) |
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) |
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. | |
|
inlineprivate |
|
inlineprivate |
uint16_t ns3::Buffer::Iterator::CalculateIpChecksum | ( | uint16_t | size | ) |
Calculate the checksum.
size | size of the buffer. |
Definition at line 1141 of file buffer.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::TcpHeader::CalculateHeaderChecksum(), ns3::UdpHeader::CalculateHeaderChecksum(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Ipv4Header::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Ipv4Header::Serialize(), ns3::TcpHeader::Serialize(), and ns3::UdpHeader::Serialize().
uint16_t ns3::Buffer::Iterator::CalculateIpChecksum | ( | uint16_t | size, |
uint32_t | initialChecksum | ||
) |
Calculate the checksum.
size | size of the buffer. |
initialChecksum | initial value |
Definition at line 1148 of file buffer.cc.
References NS_LOG_FUNCTION.
|
private |
Checks that the buffer position is not in the "virtual zero area".
i | buffer position |
Definition at line 824 of file buffer.cc.
References NS_LOG_FUNCTION.
Checks that the [start, end) is not in the "virtual zero area".
start | start buffer position |
end | end buffer position |
Definition at line 816 of file buffer.cc.
References NS_LOG_FUNCTION.
|
inlineprivate |
Initializes the iterator values.
buffer | the buffer this iterator refers to |
Definition at line 843 of file buffer.h.
References ns3::Buffer::Data::m_data, ns3::Buffer::m_data, ns3::Buffer::m_end, ns3::Buffer::m_start, ns3::Buffer::m_zeroAreaEnd, and ns3::Buffer::m_zeroAreaStart.
o | the second iterator |
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, ns3::Buffer::m_data, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::WifiInformationElement::Deserialize(), ns3::aodv::TypeHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::BeaconPayloadHeader::Deserialize(), ns3::CommandPayloadHeader::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::UanHeaderCommon::Deserialize(), ns3::UanHeaderRcData::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::UanHeaderRcAck::Deserialize(), ns3::AmpduSubframeHeader::Deserialize(), ns3::AmsduSubframeHeader::Deserialize(), ns3::CtrlBAckRequestHeader::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), ns3::CtrlTriggerHeader::Deserialize(), ns3::WifiActionHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtDelBaHeader::Deserialize(), ns3::MgtEmlOperatingModeNotification::Deserialize(), ns3::WifiMacHeader::Deserialize(), ns3::Dcd::Deserialize(), ns3::DlMap::Deserialize(), ns3::ManagementMessageType::Deserialize(), ns3::RngRsp::Deserialize(), ns3::DsaAck::Deserialize(), ns3::RngReq::Deserialize(), ns3::Ucd::Deserialize(), ns3::UlMap::Deserialize(), ns3::GenericMacHeader::Deserialize(), ns3::BandwidthRequestHeader::Deserialize(), ns3::GrantManagementSubheader::Deserialize(), ns3::FragmentationSubheader::Deserialize(), ns3::MgtAssocRequestHeader::DeserializeFromPerStaProfileImpl(), ns3::MgtAssocResponseHeader::DeserializeFromPerStaProfileImpl(), ns3::MgtReassocRequestHeader::DeserializeFromPerStaProfileImpl(), ns3::MgtAssocRequestHeader::DeserializeImpl(), ns3::MgtReassocRequestHeader::DeserializeImpl(), ns3::MgtAssocResponseHeader::DeserializeImpl(), ns3::MgtProbeResponseHeader::DeserializeImpl(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IeConfiguration::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::dot11s::IePeeringProtocol::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::dot11s::IeMeshId::DeserializeInformationField(), ns3::dot11s::IeLinkMetricReport::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::MultiLinkElement::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), TestWifiInformationElement::DeserializeInformationField(), ns3::MeshInformationElementVector::DeserializeSingleIe(), and ns3::PbbMessage::Serialize().
|
private |
Returns an appropriate message indicating a read error.
Definition at line 1186 of file buffer.cc.
References NS_LOG_FUNCTION.
uint32_t ns3::Buffer::Iterator::GetRemainingSize | ( | ) | const |
Definition at line 1179 of file buffer.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::RipHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::GtpcCreateSessionRequestMessage::Deserialize(), ns3::GtpcCreateSessionResponseMessage::Deserialize(), ns3::GtpcModifyBearerRequestMessage::Deserialize(), ns3::GtpcDeleteBearerCommandMessage::Deserialize(), ns3::GtpcDeleteBearerRequestMessage::Deserialize(), ns3::GtpcDeleteBearerResponseMessage::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), and ns3::CtrlTriggerHeader::Deserialize().
uint32_t ns3::Buffer::Iterator::GetSize | ( | ) | const |
Definition at line 1172 of file buffer.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), and ns3::Icmpv6ParameterError::Serialize().
|
private |
Returns an appropriate message indicating a write error.
The message depends on the actual Buffer::Iterator status.
Definition at line 1200 of file buffer.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
bool ns3::Buffer::Iterator::IsEnd | ( | ) | const |
Definition at line 802 of file buffer.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::WifiInformationElement::DeserializeIfPresent(), and ns3::WifiInformationElement::DoDeserialize().
bool ns3::Buffer::Iterator::IsStart | ( | ) | const |
Definition at line 809 of file buffer.cc.
References NS_LOG_FUNCTION.
|
inline |
go forward by one byte
Definition at line 853 of file buffer.h.
References NS_ASSERT.
Referenced by TcpHeaderWithRFC793OptionTestCase::CheckNoPadding(), WifiEhtCapabilitiesIeTest::CheckSerializedByte(), WifiIeFragmentationTest::CheckSerializedByte(), ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::RipHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::LlcSnapHeader::Deserialize(), ns3::SfVectorTlvValue::Deserialize(), ns3::CsParamVectorTlvValue::Deserialize(), ns3::ClassificationRuleVectorTlvValue::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::WifiInformationElement::Serialize(), ns3::CtrlTriggerUserInfoField::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Ipv4Header::Serialize(), ns3::RipHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::UdpHeader::Serialize(), and ns3::VectorTlvValue::Serialize().
|
inline |
|
inline |
Read data, but do not advance the Iterator read.
Definition at line 1006 of file buffer.h.
References data, ns3::Buffer::m_data, and NS_ASSERT_MSG.
Referenced by ns3::TcpHeader::Deserialize(), ns3::MultiLinkElement::DeserializeInformationField(), and ns3::WifiInformationElement::DoDeserialize().
|
inline |
go backward by one byte
Definition at line 860 of file buffer.h.
References NS_ASSERT.
Referenced by ns3::Buffer::AddAtEnd(), ns3::dsr::DsrOptionField::AddDsrOption(), ns3::OptionField::AddOption(), ns3::Buffer::CreateFullCopy(), ns3::EthernetTrailer::Deserialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::CtrlTriggerHeader::Deserialize(), ns3::Buffer::Deserialize(), ns3::MeshInformationElementVector::DeserializeSingleIe(), BufferTest::DoRun(), ns3::PacketMetadata::ItemIterator::Next(), ns3::EthernetTrailer::Serialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Serialize(), and ns3::Asn1Header::WriteOctet().
|
inline |
|
inline |
start | start iterator of the buffer to copy data into |
size | number 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 1047 of file buffer.h.
References Next().
void ns3::Buffer::Iterator::Read | ( | uint8_t * | buffer, |
uint32_t | size | ||
) |
buffer | buffer to copy data into |
size | number 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 1131 of file buffer.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrFsHeader::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::dsr::DsrOptionRrepHeader::Deserialize(), ns3::dsr::DsrOptionSRHeader::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6OptionLinkLayerAddress::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::TcpOptionUnknown::Deserialize(), ns3::SixLowPanHc1::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::SixLowPanNhcExtension::Deserialize(), ns3::SixLowPanMesh::Deserialize(), ns3::dot11s::IeMeshId::DeserializeInformationField(), and ns3::ReadFrom().
uint16_t ns3::Buffer::Iterator::ReadLsbtohU16 | ( | ) |
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 1070 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::SuperframeField::Deserialize(), ns3::EhtMacCapabilities::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::AmpduSubframeHeader::Deserialize(), ns3::CtrlBAckRequestHeader::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtDelBaHeader::Deserialize(), ns3::MgtEmlOperatingModeNotification::Deserialize(), ns3::WifiMacHeader::Deserialize(), ns3::CommonInfoBasicMle::Deserialize(), ns3::MgtAssocRequestHeader::DeserializeImpl(), ns3::MgtReassocRequestHeader::DeserializeImpl(), ns3::MgtAssocResponseHeader::DeserializeImpl(), ns3::MgtProbeResponseHeader::DeserializeImpl(), ns3::dot11s::IeBeaconTiming::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::MultiLinkElement::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::ReducedNeighborReport::DeserializeInformationField(), and BasicMultiLinkElementTest::DoRun().
uint32_t ns3::Buffer::Iterator::ReadLsbtohU32 | ( | ) |
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 1082 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::CtrlBAckResponseHeader::Deserialize(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::dot11s::IeLinkMetricReport::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HeOperation::DeserializeInformationField(), ns3::ReducedNeighborReport::DeserializeInformationField(), and ns3::VhtCapabilities::DeserializeInformationField().
uint64_t ns3::Buffer::Iterator::ReadLsbtohU64 | ( | ) |
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 1100 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::EhtPhyCapabilities::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::CtrlTriggerHeader::Deserialize(), ns3::MgtProbeResponseHeader::DeserializeImpl(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::VhtCapabilities::DeserializeInformationField(), and BufferTest::DoRun().
|
inline |
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 954 of file buffer.h.
References ns3::Buffer::m_data.
Referenced by ns3::U16TlvValue::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::Ipv6OptionJumbogramHeader::Deserialize(), ns3::Ipv6OptionRouterAlertHeader::Deserialize(), ns3::RipRte::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::TcpOptionMSS::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::EpcX2Header::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2HandoverRequestAckHeader::Deserialize(), ns3::EpcX2HandoverPreparationFailureHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::EpcX2UeContextReleaseHeader::Deserialize(), ns3::EpcX2LoadInformationHeader::Deserialize(), ns3::EpcX2ResourceStatusUpdateHeader::Deserialize(), ns3::EpcX2HandoverCancelHeader::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::EthernetHeader::Deserialize(), ns3::LlcSnapHeader::Deserialize(), ns3::SllHeader::Deserialize(), ns3::olsr::PacketHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::AmsduSubframeHeader::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::olsr::MessageHeader::Tc::Deserialize(), ns3::PortRangeTlvValue::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().
|
inline |
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 978 of file buffer.h.
References ns3::Buffer::m_data.
Referenced by ns3::U32TlvValue::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::SeqTsEchoHeader::Deserialize(), ns3::SeqTsHeader::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::RipRte::Deserialize(), ns3::TcpHeader::Deserialize(), ns3::TcpOptionSack::Deserialize(), ns3::TcpOptionTS::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2HandoverRequestAckHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::olsr::MessageHeader::Mid::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::olsr::MessageHeader::Tc::Deserialize(), ns3::olsr::MessageHeader::Hna::Deserialize(), ns3::Ipv4AddressTlvValue::Deserialize(), ns3::GtpcIes::DeserializeBearerTft(), ns3::GtpcIes::DeserializeFteid(), ns3::GtpcIes::DeserializeUliEcgi(), ns3::GtpcHeader::PreDeserialize(), and ns3::ReadFrom().
uint64_t ns3::Buffer::Iterator::ReadNtohU64 | ( | ) |
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 1047 of file buffer.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::SeqTsEchoHeader::Deserialize(), ns3::SeqTsHeader::Deserialize(), ns3::SeqTsSizeHeader::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2SnStatusTransferHeader::Deserialize(), ns3::SllHeader::Deserialize(), ns3::GtpcIes::DeserializeImsi(), and BufferTest::DoRun().
|
inline |
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 1035 of file buffer.h.
References data.
Referenced by ns3::dsr::DsrFsHeader::Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Deserialize(), ns3::dsr::DsrOptionAckReqHeader::Deserialize(), ns3::dsr::DsrOptionAckHeader::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::RipHeader::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::UdpHeader::Deserialize(), ns3::CommandPayloadHeader::Deserialize(), ns3::SixLowPanFrag1::Deserialize(), ns3::SixLowPanFragN::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::CtrlTriggerHeader::Deserialize(), ns3::RngRsp::Deserialize(), ns3::DsaReq::Deserialize(), ns3::DsaRsp::Deserialize(), ns3::DsaAck::Deserialize(), ns3::GrantManagementSubheader::Deserialize(), ns3::HeOperation::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::VhtOperation::DeserializeInformationField(), BufferTest::DoRun(), ns3::DcdChannelEncodings::Read(), ns3::OfdmDlMapIe::Read(), ns3::DlFramePrefixIe::Read(), ns3::UcdChannelEncodings::Read(), and ns3::OfdmUlMapIe::Read().
uint32_t ns3::Buffer::Iterator::ReadU32 | ( | ) |
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 972 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::EthernetTrailer::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::UanHeaderRcCtsGlobal::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::RngRsp::Deserialize(), ns3::OfdmDownlinkFramePrefix::Deserialize(), ns3::UlMap::Deserialize(), ns3::EdcaParameterSet::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::OfdmDcdChannelEncodings::DoRead(), ns3::DcdChannelEncodings::Read(), and ns3::UcdChannelEncodings::Read().
uint64_t ns3::Buffer::Iterator::ReadU64 | ( | ) |
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 990 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::EthernetHeader::Deserialize(), and BufferTest::DoRun().
|
inline |
Read data and advance the Iterator by the number of bytes read.
Definition at line 1027 of file buffer.h.
Referenced by TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize(), TcpHeaderWithRFC793OptionTestCase::CheckNoPadding(), WifiEhtCapabilitiesIeTest::CheckSerializedByte(), WifiIeFragmentationTest::CheckSerializedByte(), ns3::GtsFields::Deserialize(), ns3::PendingAddrFields::Deserialize(), ns3::CapabilityField::Deserialize(), ns3::dot11s::Dot11sMeshCapability::Deserialize(), anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >::Deserialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Deserialize(), ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::EhtPhyCapabilities::Deserialize(), ns3::EhtPpeThresholds::Deserialize(), ns3::U8TlvValue::Deserialize(), ns3::aodv::TypeHeader::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::dsr::DsrOptionPad1Header::Deserialize(), ns3::dsr::DsrOptionPadnHeader::Deserialize(), ns3::dsr::DsrOptionRreqHeader::Deserialize(), ns3::dsr::DsrOptionRrepHeader::Deserialize(), ns3::dsr::DsrOptionSRHeader::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnreachHeader::Deserialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Deserialize(), ns3::dsr::DsrOptionAckReqHeader::Deserialize(), ns3::dsr::DsrOptionAckHeader::Deserialize(), ns3::DhcpHeader::Deserialize(), ns3::ArpHeader::Deserialize(), ns3::Icmpv4DestinationUnreachable::Deserialize(), ns3::Icmpv4TimeExceeded::Deserialize(), ns3::Icmpv6Header::Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6OptionMtu::Deserialize(), ns3::Icmpv6OptionPrefixInformation::Deserialize(), ns3::Icmpv6OptionLinkLayerAddress::Deserialize(), ns3::Icmpv6OptionRedirected::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Ipv6ExtensionHopByHopHeader::Deserialize(), ns3::Ipv6ExtensionDestinationHeader::Deserialize(), ns3::Ipv6ExtensionFragmentHeader::Deserialize(), ns3::Ipv6ExtensionRoutingHeader::Deserialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::Ipv6OptionPad1Header::Deserialize(), ns3::Ipv6OptionPadnHeader::Deserialize(), ns3::Ipv6OptionJumbogramHeader::Deserialize(), ns3::Ipv6OptionRouterAlertHeader::Deserialize(), ns3::RipHeader::Deserialize(), ns3::RipNgRte::Deserialize(), ns3::RipNgHeader::Deserialize(), ns3::TcpOptionEnd::Deserialize(), ns3::TcpOptionNOP::Deserialize(), ns3::TcpOptionMSS::Deserialize(), ns3::TcpOptionSackPermitted::Deserialize(), ns3::TcpOptionSack::Deserialize(), ns3::TcpOptionTS::Deserialize(), ns3::TcpOptionWinScale::Deserialize(), ns3::TcpOptionUnknown::Deserialize(), ns3::LrWpanMacHeader::Deserialize(), ns3::CommandPayloadHeader::Deserialize(), ns3::GtpuHeader::Deserialize(), ns3::EpcX2Header::Deserialize(), ns3::EpcX2HandoverRequestHeader::Deserialize(), ns3::EpcX2LoadInformationHeader::Deserialize(), ns3::EpcX2ResourceStatusUpdateHeader::Deserialize(), ns3::LtePdcpHeader::Deserialize(), ns3::LteRlcAmHeader::Deserialize(), ns3::LteRlcHeader::Deserialize(), ns3::dot11s::MeshHeader::Deserialize(), ns3::dot11s::PeerLinkOpenStart::Deserialize(), ns3::dot11s::PeerLinkCloseStart::Deserialize(), ns3::dot11s::PeerLinkConfirmStart::Deserialize(), ns3::flame::FlameHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::SixLowPanHc1::Deserialize(), ns3::SixLowPanFrag1::Deserialize(), ns3::SixLowPanFragN::Deserialize(), ns3::SixLowPanIpv6::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::SixLowPanNhcExtension::Deserialize(), ns3::SixLowPanUdpNhcExtension::Deserialize(), ns3::SixLowPanBc0::Deserialize(), ns3::SixLowPanMesh::Deserialize(), ns3::UanHeaderCommon::Deserialize(), ns3::UanHeaderRcRts::Deserialize(), ns3::UanHeaderRcCts::Deserialize(), ns3::UanHeaderRcAck::Deserialize(), ns3::AmpduSubframeHeader::Deserialize(), ns3::WifiActionHeader::Deserialize(), ns3::MgtAddBaRequestHeader::Deserialize(), ns3::MgtAddBaResponseHeader::Deserialize(), ns3::MgtEmlOperatingModeNotification::Deserialize(), ns3::Dcd::Deserialize(), ns3::DlMap::Deserialize(), ns3::ManagementMessageType::Deserialize(), ns3::RngRsp::Deserialize(), ns3::DsaRsp::Deserialize(), ns3::DsaAck::Deserialize(), ns3::RngReq::Deserialize(), ns3::OfdmDownlinkFramePrefix::Deserialize(), ns3::Ucd::Deserialize(), ns3::UlMap::Deserialize(), ns3::GenericMacHeader::Deserialize(), ns3::BandwidthRequestHeader::Deserialize(), ns3::GrantManagementSubheader::Deserialize(), ns3::FragmentationSubheader::Deserialize(), ns3::Tlv::Deserialize(), ns3::EhtMcsAndNssSet::Deserialize(), ns3::CommonInfoBasicMle::Deserialize(), ns3::olsr::MessageHeader::Hello::Deserialize(), ns3::SfVectorTlvValue::Deserialize(), ns3::CsParamVectorTlvValue::Deserialize(), ns3::ClassificationRuleVectorTlvValue::Deserialize(), ns3::TosTlvValue::Deserialize(), ns3::ProtocolTlvValue::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::IePeerManagement::DeserializeInformationField(), ns3::dot11s::IePeeringProtocol::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::dot11s::IePrep::DeserializeInformationField(), ns3::dot11s::IeRann::DeserializeInformationField(), ns3::EdcaParameterSet::DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), ns3::ExtendedCapabilities::DeserializeInformationField(), ns3::HeCapabilities::DeserializeInformationField(), ns3::MuEdcaParameterSet::DeserializeInformationField(), ns3::HtCapabilities::DeserializeInformationField(), ns3::HtOperation::DeserializeInformationField(), ns3::DsssParameterSet::DeserializeInformationField(), ns3::ErpInformation::DeserializeInformationField(), ns3::ReducedNeighborReport::DeserializeInformationField(), ns3::VhtOperation::DeserializeInformationField(), ns3::MeshInformationElementVector::DeserializeSingleIe(), ns3::GtpcIes::DeserializeUliEcgi(), ns3::WifiInformationElement::DoDeserialize(), ns3::OfdmDcdChannelEncodings::DoRead(), ns3::OfdmUcdChannelEncodings::DoRead(), BufferTest::DoRun(), TcpHeaderWithRFC793OptionTestCase::OneOptionAtTime(), ns3::GtpcHeader::PreDeserialize(), ns3::OfdmDlBurstProfile::Read(), ns3::OfdmDlMapIe::Read(), ns3::DlFramePrefixIe::Read(), ns3::OfdmUlBurstProfile::Read(), ns3::OfdmUlMapIe::Read(), ns3::GtpcIes::ReadNtohU40(), ns3::WifiInformationElement::SerializeFragments(), and ns3::HeaderSerializationTestCase::TestHeaderSerialization().
|
private |
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 1021 of file buffer.cc.
References NS_LOG_FUNCTION.
|
private |
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 1032 of file buffer.cc.
References NS_LOG_FUNCTION.
void ns3::Buffer::Iterator::Write | ( | const uint8_t * | buffer, |
uint32_t | size | ||
) |
buffer | a byte buffer to copy in the internal buffer. |
size | number of bytes to copy. |
Write the data in buffer and advance the iterator position by size bytes.
Definition at line 954 of file buffer.cc.
References ns3::Buffer::m_data, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::Packet::Packet(), PbbTestCase::PbbTestCase(), ns3::Buffer::AddAtEnd(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Buffer::CreateFullCopy(), ns3::SixLowPanNetDevice::DecompressLowPanNhc(), ns3::PbbTlv::Deserialize(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::dsr::DsrOptionHeader::Deserialize(), ns3::dsr::DsrOptionRerrHeader::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Ipv6OptionHeader::Deserialize(), ns3::dsr::DsrOptionField::Deserialize(), ns3::OptionField::Deserialize(), ns3::Buffer::Deserialize(), BufferTest::DoRun(), ns3::Asn1Header::Serialize(), ns3::dsr::DsrFsHeader::Serialize(), ns3::dsr::DsrOptionHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::dsr::DsrOptionRrepHeader::Serialize(), ns3::dsr::DsrOptionSRHeader::Serialize(), ns3::dsr::DsrOptionRerrHeader::Serialize(), ns3::DhcpHeader::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6OptionLinkLayerAddress::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Ipv6ExtensionHeader::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::Ipv6OptionHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::TcpOptionUnknown::Serialize(), ns3::LlcSnapHeader::Serialize(), ns3::SixLowPanHc1::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::SixLowPanNhcExtension::Serialize(), ns3::SixLowPanMesh::Serialize(), ns3::Dcd::Serialize(), ns3::DlMap::Serialize(), ns3::OfdmDownlinkFramePrefix::Serialize(), ns3::Ucd::Serialize(), ns3::UlMap::Serialize(), ns3::PbbTlv::SetValue(), and ns3::WriteTo().
start | the start of the data to copy |
end | the 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 831 of file buffer.cc.
References m_current, m_data, ns3::Buffer::m_data, m_zeroEnd, m_zeroStart, NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void ns3::Buffer::Iterator::WriteHtolsbU16 | ( | uint16_t | data | ) |
data | data 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.
Definition at line 908 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::SuperframeField::Serialize(), ns3::LrWpanMacHeader::Serialize(), ns3::dot11s::PeerLinkOpenStart::Serialize(), ns3::dot11s::PeerLinkConfirmStart::Serialize(), ns3::AmpduSubframeHeader::Serialize(), ns3::CtrlBAckRequestHeader::Serialize(), ns3::CtrlBAckResponseHeader::Serialize(), ns3::MgtAddBaRequestHeader::Serialize(), ns3::MgtAddBaResponseHeader::Serialize(), ns3::MgtDelBaHeader::Serialize(), ns3::WifiMacHeader::Serialize(), ns3::MgtAssocRequestHeader::SerializeImpl(), ns3::MgtReassocRequestHeader::SerializeImpl(), ns3::MgtAssocResponseHeader::SerializeImpl(), ns3::MgtProbeResponseHeader::SerializeImpl(), ns3::dot11s::IeBeaconTiming::SerializeInformationField(), and ns3::dot11s::IePeerManagement::SerializeInformationField().
void ns3::Buffer::Iterator::WriteHtolsbU32 | ( | uint32_t | data | ) |
data | data 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 916 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::CtrlTriggerUserInfoField::Serialize(), ns3::LrWpanMacHeader::Serialize(), ns3::dot11s::MeshHeader::Serialize(), ns3::CtrlBAckResponseHeader::Serialize(), ns3::dot11s::IeLinkMetricReport::SerializeInformationField(), ns3::dot11s::IePerr::SerializeInformationField(), ns3::dot11s::IePrep::SerializeInformationField(), ns3::dot11s::IePreq::SerializeInformationField(), and ns3::dot11s::IeRann::SerializeInformationField().
void ns3::Buffer::Iterator::WriteHtolsbU64 | ( | uint64_t | data | ) |
data | data 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 926 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by BufferTest::DoRun(), ns3::LrWpanMacHeader::Serialize(), ns3::CtrlTriggerHeader::Serialize(), and ns3::MgtProbeResponseHeader::SerializeImpl().
|
inline |
data | data 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 915 of file buffer.h.
References data, ns3::Buffer::m_data, and NS_ASSERT_MSG.
Referenced by BufferTest::DoRun(), ns3::GtpcHeader::PreSerialize(), ns3::PbbTlvBlock::Serialize(), ns3::PbbAddressTlvBlock::Serialize(), ns3::PbbMessage::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Tc::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::DhcpHeader::Serialize(), ns3::ArpHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Ipv4Header::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::Ipv6OptionRouterAlertHeader::Serialize(), ns3::RipRte::Serialize(), ns3::RipNgRte::Serialize(), ns3::TcpHeader::Serialize(), ns3::TcpOptionMSS::Serialize(), ns3::UdpHeader::Serialize(), ns3::GtpuHeader::Serialize(), ns3::EpcX2Header::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2HandoverRequestAckHeader::Serialize(), ns3::EpcX2HandoverPreparationFailureHeader::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::EpcX2UeContextReleaseHeader::Serialize(), ns3::EpcX2LoadInformationHeader::Serialize(), ns3::EpcX2ResourceStatusUpdateHeader::Serialize(), ns3::EpcX2HandoverCancelHeader::Serialize(), ns3::flame::FlameHeader::Serialize(), ns3::EthernetHeader::Serialize(), ns3::LlcSnapHeader::Serialize(), ns3::SllHeader::Serialize(), ns3::olsr::PacketHeader::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::AmsduSubframeHeader::Serialize(), ns3::U16TlvValue::Serialize(), ns3::PortRangeTlvValue::Serialize(), ns3::GtpcIes::SerializeBearerQos(), ns3::GtpcIes::SerializeBearerTft(), ns3::GtpcIes::SerializeCause(), ns3::GtpcIes::SerializeEbi(), ns3::GtpcIes::SerializeFteid(), ns3::GtpcIes::SerializeImsi(), and ns3::GtpcIes::SerializeUliEcgi().
|
inline |
data | data 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 933 of file buffer.h.
References data, ns3::Buffer::m_data, and NS_ASSERT_MSG.
Referenced by BufferTest::DoRun(), ns3::GtpcHeader::PreSerialize(), ns3::aodv::RerrHeader::Serialize(), ns3::olsr::MessageHeader::Mid::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::olsr::MessageHeader::Tc::Serialize(), ns3::olsr::MessageHeader::Hna::Serialize(), ns3::aodv::RreqHeader::Serialize(), ns3::aodv::RrepHeader::Serialize(), ns3::SeqTsEchoHeader::Serialize(), ns3::SeqTsHeader::Serialize(), ns3::dsdv::DsdvHeader::Serialize(), ns3::DhcpHeader::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Ipv4Header::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::Ipv6OptionJumbogramHeader::Serialize(), ns3::RipRte::Serialize(), ns3::TcpHeader::Serialize(), ns3::TcpOptionSack::Serialize(), ns3::TcpOptionTS::Serialize(), ns3::GtpuHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2HandoverRequestAckHeader::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::U32TlvValue::Serialize(), ns3::Ipv4AddressTlvValue::Serialize(), ns3::GtpcIes::SerializeBearerTft(), ns3::GtpcIes::SerializeFteid(), ns3::GtpcIes::SerializeUliEcgi(), and ns3::WriteTo().
void ns3::Buffer::Iterator::WriteHtonU64 | ( | uint64_t | data | ) |
data | data 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 940 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by BufferTest::DoRun(), ns3::SeqTsEchoHeader::Serialize(), ns3::SeqTsHeader::Serialize(), ns3::SeqTsSizeHeader::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2SnStatusTransferHeader::Serialize(), ns3::SllHeader::Serialize(), and ns3::GtpcIes::SerializeImsi().
void ns3::Buffer::Iterator::WriteU16 | ( | uint16_t | data | ) |
data | data 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 865 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::TcpHeader::CalculateHeaderChecksum(), ns3::UdpHeader::CalculateHeaderChecksum(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), BufferTest::DoRun(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::dsr::DsrFsHeader::Serialize(), ns3::dsr::DsrRoutingHeader::Serialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Serialize(), ns3::dsr::DsrOptionAckReqHeader::Serialize(), ns3::dsr::DsrOptionAckHeader::Serialize(), ns3::DhcpHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Ipv4Header::Serialize(), ns3::RipHeader::Serialize(), ns3::RipNgHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::UdpHeader::Serialize(), ns3::CommandPayloadHeader::Serialize(), ns3::SixLowPanFrag1::Serialize(), ns3::SixLowPanFragN::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::RngRsp::Serialize(), ns3::DsaReq::Serialize(), ns3::DsaRsp::Serialize(), ns3::DsaAck::Serialize(), ns3::GrantManagementSubheader::Serialize(), ns3::WimaxMacToMacHeader::Serialize(), ns3::GtpcIes::SerializeBearerContextHeader(), ns3::DcdChannelEncodings::Write(), ns3::OfdmDlMapIe::Write(), ns3::DlFramePrefixIe::Write(), ns3::UcdChannelEncodings::Write(), and ns3::OfdmUlMapIe::Write().
void ns3::Buffer::Iterator::WriteU32 | ( | uint32_t | data | ) |
data | data 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 non-portable. We only ensure that readU32 will return exactly what we wrote with writeU32 if the program is run on the same machine.
Definition at line 874 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by ns3::OfdmDcdChannelEncodings::DoWrite(), ns3::EthernetTrailer::Serialize(), ns3::DhcpHeader::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::RngRsp::Serialize(), ns3::OfdmDownlinkFramePrefix::Serialize(), ns3::UlMap::Serialize(), ns3::DcdChannelEncodings::Write(), and ns3::UcdChannelEncodings::Write().
void ns3::Buffer::Iterator::WriteU64 | ( | uint64_t | data | ) |
data | data 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 887 of file buffer.cc.
References data, and NS_LOG_FUNCTION.
Referenced by BufferTest::DoRun(), and ns3::EthernetHeader::Serialize().
|
inline |
data | data to write in buffer |
Write the data in buffer and advance the iterator position by one byte.
Definition at line 881 of file buffer.h.
References data, ns3::Buffer::m_data, and NS_ASSERT_MSG.
Referenced by ns3::TcpHeader::CalculateHeaderChecksum(), ns3::UdpHeader::CalculateHeaderChecksum(), ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize(), ns3::Buffer::CreateFullCopy(), ns3::WifiInformationElement::DoDeserialize(), BufferTest::DoRun(), ns3::OfdmDcdChannelEncodings::DoWrite(), ns3::OfdmUcdChannelEncodings::DoWrite(), ns3::GtpcHeader::PreSerialize(), ns3::PbbMessage::Serialize(), ns3::PbbAddressBlock::Serialize(), ns3::PbbTlv::Serialize(), ns3::GtsFields::Serialize(), ns3::PendingAddrFields::Serialize(), ns3::CapabilityField::Serialize(), ns3::dot11s::Dot11sMeshCapability::Serialize(), ns3::WifiInformationElement::Serialize(), ns3::aodv::RerrHeader::Serialize(), anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >::Serialize(), anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >::Serialize(), ns3::olsr::MessageHeader::Hello::Serialize(), ns3::CtrlTriggerUserInfoField::Serialize(), ns3::aodv::TypeHeader::Serialize(), ns3::aodv::RreqHeader::Serialize(), ns3::aodv::RrepHeader::Serialize(), ns3::aodv::RrepAckHeader::Serialize(), ns3::dsr::DsrFsHeader::Serialize(), ns3::dsr::DsrRoutingHeader::Serialize(), ns3::dsr::DsrOptionHeader::Serialize(), ns3::dsr::DsrOptionPad1Header::Serialize(), ns3::dsr::DsrOptionPadnHeader::Serialize(), ns3::dsr::DsrOptionRreqHeader::Serialize(), ns3::dsr::DsrOptionRrepHeader::Serialize(), ns3::dsr::DsrOptionSRHeader::Serialize(), ns3::dsr::DsrOptionRerrHeader::Serialize(), ns3::dsr::DsrOptionRerrUnreachHeader::Serialize(), ns3::dsr::DsrOptionRerrUnsupportedHeader::Serialize(), ns3::dsr::DsrOptionAckReqHeader::Serialize(), ns3::dsr::DsrOptionAckHeader::Serialize(), ns3::DhcpHeader::Serialize(), ns3::ArpHeader::Serialize(), ns3::Icmpv4Header::Serialize(), ns3::Icmpv6Header::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), ns3::Icmpv6ParameterError::Serialize(), ns3::Icmpv6OptionMtu::Serialize(), ns3::Icmpv6OptionPrefixInformation::Serialize(), ns3::Icmpv6OptionLinkLayerAddress::Serialize(), ns3::Icmpv6OptionRedirected::Serialize(), ns3::Ipv4Header::Serialize(), ns3::Ipv6ExtensionHeader::Serialize(), ns3::Ipv6ExtensionHopByHopHeader::Serialize(), ns3::Ipv6ExtensionDestinationHeader::Serialize(), ns3::Ipv6ExtensionFragmentHeader::Serialize(), ns3::Ipv6ExtensionRoutingHeader::Serialize(), ns3::Ipv6ExtensionLooseRoutingHeader::Serialize(), ns3::Ipv6Header::Serialize(), ns3::Ipv6OptionHeader::Serialize(), ns3::Ipv6OptionPad1Header::Serialize(), ns3::Ipv6OptionPadnHeader::Serialize(), ns3::Ipv6OptionJumbogramHeader::Serialize(), ns3::Ipv6OptionRouterAlertHeader::Serialize(), ns3::RipHeader::Serialize(), ns3::RipNgRte::Serialize(), ns3::RipNgHeader::Serialize(), ns3::TcpHeader::Serialize(), ns3::TcpOptionEnd::Serialize(), ns3::TcpOptionNOP::Serialize(), ns3::TcpOptionMSS::Serialize(), ns3::TcpOptionSackPermitted::Serialize(), ns3::TcpOptionSack::Serialize(), ns3::TcpOptionTS::Serialize(), ns3::TcpOptionWinScale::Serialize(), ns3::TcpOptionUnknown::Serialize(), ns3::LrWpanMacHeader::Serialize(), ns3::CommandPayloadHeader::Serialize(), ns3::GtpuHeader::Serialize(), ns3::EpcX2Header::Serialize(), ns3::EpcX2HandoverRequestHeader::Serialize(), ns3::EpcX2LoadInformationHeader::Serialize(), ns3::EpcX2ResourceStatusUpdateHeader::Serialize(), ns3::LtePdcpHeader::Serialize(), ns3::LteRlcAmHeader::Serialize(), ns3::LteRlcHeader::Serialize(), ns3::dot11s::MeshHeader::Serialize(), ns3::flame::FlameHeader::Serialize(), ns3::PbbPacket::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::SixLowPanHc1::Serialize(), ns3::SixLowPanFrag1::Serialize(), ns3::SixLowPanFragN::Serialize(), ns3::SixLowPanIpv6::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::SixLowPanNhcExtension::Serialize(), ns3::SixLowPanUdpNhcExtension::Serialize(), ns3::SixLowPanBc0::Serialize(), ns3::SixLowPanMesh::Serialize(), ns3::AmpduSubframeHeader::Serialize(), ns3::CtrlTriggerHeader::Serialize(), ns3::MgtAddBaRequestHeader::Serialize(), ns3::MgtAddBaResponseHeader::Serialize(), ns3::Dcd::Serialize(), ns3::DlMap::Serialize(), ns3::ManagementMessageType::Serialize(), ns3::RngRsp::Serialize(), ns3::DsaRsp::Serialize(), ns3::DsaAck::Serialize(), ns3::RngReq::Serialize(), ns3::OfdmDownlinkFramePrefix::Serialize(), ns3::Ucd::Serialize(), ns3::UlMap::Serialize(), ns3::GenericMacHeader::Serialize(), ns3::BandwidthRequestHeader::Serialize(), ns3::GrantManagementSubheader::Serialize(), ns3::FragmentationSubheader::Serialize(), ns3::WimaxMacToMacHeader::Serialize(), ns3::Tlv::Serialize(), ns3::U8TlvValue::Serialize(), ns3::TosTlvValue::Serialize(), ns3::ProtocolTlvValue::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::IePeerManagement::SerializeInformationField(), ns3::dot11s::IePeeringProtocol::SerializeInformationField(), ns3::dot11s::IePerr::SerializeInformationField(), ns3::dot11s::IePrep::SerializeInformationField(), ns3::dot11s::IePreq::SerializeInformationField(), ns3::dot11s::IeRann::SerializeInformationField(), ns3::GtpcIes::SerializeUliEcgi(), ns3::OfdmDlBurstProfile::Write(), ns3::OfdmDlMapIe::Write(), ns3::DlFramePrefixIe::Write(), ns3::OfdmUlBurstProfile::Write(), ns3::OfdmUlMapIe::Write(), ns3::GtpcIes::WriteHtonU40(), and ns3::Asn1Header::WriteOctet().
|
inline |
data | data to write in buffer |
len | number 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 898 of file buffer.h.
References data, ns3::Buffer::m_data, and NS_ASSERT_MSG.
|
private |
offset in virtual bytes from the start of the data buffer to the current position represented by this iterator.
Definition at line 480 of file buffer.h.
Referenced by GetDistanceFrom(), and Write().
|
private |
a pointer to the underlying byte buffer.
All offsets are relative to this pointer.
Definition at line 485 of file buffer.h.
Referenced by GetDistanceFrom(), and Write().
|
private |
|
private |
|
private |
|
private |