A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
buffer.cc File Reference
#include "buffer.h"
#include "ns3/assert.h"
#include "ns3/log.h"
+ Include dependency graph for buffer.cc:

Go to the source code of this file.

Classes

struct  anonymous_namespace{buffer.cc}::Zeroes
 Zero-filled buffer. More...
 

Namespaces

namespace  anonymous_namespace{buffer.cc}
 
namespace  ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 

Macros

#define DESTROYED   ((Buffer::FreeList*)MAGIC_DESTROYED)
 
#define IS_DESTROYED(x)   (x == (Buffer::FreeList*)MAGIC_DESTROYED)
 
#define IS_INITIALIZED(x)   (!IS_UNINITIALIZED(x) && !IS_DESTROYED(x))
 
#define IS_UNINITIALIZED(x)   (x == (Buffer::FreeList*)0)
 
#define LOG_INTERNAL_STATE(y)
 
#define MAGIC_DESTROYED   (~(long)0)
 
#define UNINITIALIZED   ((Buffer::FreeList*)0)
 

Variables

constexpr uint32_t ns3::ALLOC_OVER_PROVISION = 100
 Additional bytes to over-provision.
 
struct anonymous_namespace{buffer.cc}::Zeroes anonymous_namespace{buffer.cc}::g_zeroes
 Zero-filled buffer.
 

Macro Definition Documentation

◆ DESTROYED

#define DESTROYED   ((Buffer::FreeList*)MAGIC_DESTROYED)

◆ IS_DESTROYED

#define IS_DESTROYED ( x)    (x == (Buffer::FreeList*)MAGIC_DESTROYED)

Definition at line 67 of file buffer.cc.

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

◆ IS_INITIALIZED

#define IS_INITIALIZED ( x)    (!IS_UNINITIALIZED(x) && !IS_DESTROYED(x))

◆ IS_UNINITIALIZED

#define IS_UNINITIALIZED ( x)    (x == (Buffer::FreeList*)0)

Definition at line 66 of file buffer.cc.

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

◆ LOG_INTERNAL_STATE

#define LOG_INTERNAL_STATE ( y)
Value:
NS_LOG_LOGIC(y << "start=" << m_start << ", end=" << m_end \
<< ", zero start=" << m_zeroAreaStart << ", zero end=" << m_zeroAreaEnd \
<< ", count=" << m_data->m_count << ", size=" << m_data->m_size \
<< ", dirty start=" << m_data->m_dirtyStart \
<< ", dirty end=" << m_data->m_dirtyEnd)
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition log.h:271

Definition at line 13 of file buffer.cc.

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

◆ MAGIC_DESTROYED

#define MAGIC_DESTROYED   (~(long)0)

Definition at line 65 of file buffer.cc.

◆ UNINITIALIZED

#define UNINITIALIZED   ((Buffer::FreeList*)0)

Definition at line 70 of file buffer.cc.