A Discrete-Event Network Simulator
API
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...

Public Attributes

uint32_t m_count
 The reference count of an instance of this data structure. More...
 
uint8_t m_data [1]
 The real data buffer holds at least one byte. More...
 
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. More...
 
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. More...
 
uint32_t m_size
 the size of the m_data field below. More...
 

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

Member Data Documentation

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

Referenced by ns3::Buffer::Allocate(), ns3::Buffer::Buffer(), ns3::Buffer::Create(), ns3::Buffer::Deallocate(), ns3::Buffer::operator=(), and ns3::Buffer::Recycle().

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

The real data buffer holds at least one byte.

Its real size is stored in the m_size field.

Definition at line 685 of file buffer.h.

Referenced by ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtStart(), and ns3::Buffer::Iterator::Construct().

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

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

Referenced by ns3::Buffer::AddAtEnd().

uint32_t ns3::Buffer::Data::m_size

the size of the m_data field below.

Definition at line 670 of file buffer.h.

Referenced by ns3::Buffer::Allocate(), ns3::Buffer::Create(), and ns3::Buffer::Recycle().


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