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

This data structure is variable-sized through its last member whose size is determined at allocation time and stored in the m_size field. More...

+ Collaboration diagram for ns3::Buffer::Data:

Public Attributes

uint32_t m_count
 The reference count of an instance of this data structure.
 
uint8_t m_data [1]
 The real data buffer holds at least one byte.
 
uint32_t m_dirtyEnd
 offset from the start of the m_data field below to the end of the area in which user bytes were written.
 
uint32_t m_dirtyStart
 offset from the start of the m_data field below to the start of the area in which user bytes were written.
 
uint32_t m_size
 the size of the m_data field below.
 

Detailed Description

This data structure is variable-sized through its last member whose size is determined at allocation time and stored in the m_size field.

The so-called "dirty area" describes the area in the buffer which has been reserved and used by a user. Multiple Buffer instances may reference the same Buffer::Data object instance and may reference different parts of the underlying byte buffer. The "dirty area" is union of all the areas referenced by the Buffer instances which reference the same BufferData instance. New user data can be safely written only outside of the "dirty area" if the reference count is higher than 1 (that is, if more than one Buffer instance references the same BufferData).

Definition at line 651 of file buffer.h.

Member Data Documentation

◆ m_count

uint32_t ns3::Buffer::Data::m_count

The reference count of an instance of this data structure.

Each buffer which references an instance holds a count.

Definition at line 657 of file buffer.h.

Referenced by ns3::Buffer::Buffer(), ns3::Buffer::~Buffer(), ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtStart(), ns3::Buffer::CheckInternalState(), and ns3::Buffer::operator=().

◆ m_data

uint8_t ns3::Buffer::Data::m_data[1]

◆ m_dirtyEnd

uint32_t ns3::Buffer::Data::m_dirtyEnd

offset from the start of the m_data field below to the end of the area in which user bytes were written.

Definition at line 671 of file buffer.h.

Referenced by ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtStart(), ns3::Buffer::CheckInternalState(), and ns3::Buffer::Initialize().

◆ m_dirtyStart

uint32_t ns3::Buffer::Data::m_dirtyStart

offset from the start of the m_data field below to the start of the area in which user bytes were written.

Definition at line 666 of file buffer.h.

Referenced by ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtStart(), ns3::Buffer::CheckInternalState(), and ns3::Buffer::Initialize().

◆ m_size

uint32_t ns3::Buffer::Data::m_size

the size of the m_data field below.

Definition at line 661 of file buffer.h.

Referenced by ns3::Buffer::CheckInternalState(), and ns3::Buffer::Initialize().


The documentation for this struct was generated from the following file: