Kea 2.7.6
isc::dns::MessageRenderer::MessageRendererImpl Struct Reference

The MessageRendererImpl class is the actual implementation of MessageRenderer. More...

Public Member Functions

 MessageRendererImpl ()
 Constructor.
 
void addOffset (size_t hash, size_t offset, size_t len)
 
uint16_t findOffset (const OutputBuffer &buffer, InputBuffer &name_buf, size_t hash, bool case_sensitive) const
 

Public Attributes

CompressMode compress_mode_
 The name compression mode.
 
uint16_t msglength_limit_
 The maximum length of rendered data that can fit without truncation.
 
boost::array< size_t, Name::MAX_LABELSseq_hashes_
 
vector< OffsetItem > table_ [BUCKETS]
 
bool truncated_
 A boolean flag that indicates truncation has occurred while rendering the data.
 

Static Public Attributes

static const size_t BUCKETS = 64
 
static const uint16_t NO_OFFSET = 65535
 
static const size_t RESERVED_ITEMS = 16
 

Detailed Description

The MessageRendererImpl class is the actual implementation of MessageRenderer.

The implementation is hidden from applications. We can refer to specific members of this class only within the implementation source file.

It internally holds a hash table for OffsetItem objects corresponding to portions of names rendered in this renderer. The offset information is used to compress subsequent names to be rendered.

Definition at line 155 of file messagerenderer.cc.

Constructor & Destructor Documentation

◆ MessageRendererImpl()

isc::dns::MessageRenderer::MessageRendererImpl::MessageRendererImpl ( )
inline

Constructor.

Definition at line 165 of file messagerenderer.cc.

References BUCKETS, RESERVED_ITEMS, and table_.

Member Function Documentation

◆ addOffset()

void isc::dns::MessageRenderer::MessageRendererImpl::addOffset ( size_t hash,
size_t offset,
size_t len )
inline

Definition at line 198 of file messagerenderer.cc.

References BUCKETS, and table_.

◆ findOffset()

uint16_t isc::dns::MessageRenderer::MessageRendererImpl::findOffset ( const OutputBuffer & buffer,
InputBuffer & name_buf,
size_t hash,
bool case_sensitive ) const
inline

Definition at line 174 of file messagerenderer.cc.

References BUCKETS, NO_OFFSET, and table_.

Member Data Documentation

◆ BUCKETS

const size_t isc::dns::MessageRenderer::MessageRendererImpl::BUCKETS = 64
static

◆ compress_mode_

CompressMode isc::dns::MessageRenderer::MessageRendererImpl::compress_mode_

The name compression mode.

Definition at line 211 of file messagerenderer.cc.

◆ msglength_limit_

uint16_t isc::dns::MessageRenderer::MessageRendererImpl::msglength_limit_

The maximum length of rendered data that can fit without truncation.

Definition at line 206 of file messagerenderer.cc.

◆ NO_OFFSET

const uint16_t isc::dns::MessageRenderer::MessageRendererImpl::NO_OFFSET = 65535
static

Definition at line 162 of file messagerenderer.cc.

Referenced by findOffset(), and isc::dns::MessageRenderer::writeName().

◆ RESERVED_ITEMS

const size_t isc::dns::MessageRenderer::MessageRendererImpl::RESERVED_ITEMS = 16
static

Definition at line 161 of file messagerenderer.cc.

Referenced by MessageRendererImpl(), and isc::dns::MessageRenderer::clear().

◆ seq_hashes_

boost::array<size_t, Name::MAX_LABELS> isc::dns::MessageRenderer::MessageRendererImpl::seq_hashes_

Definition at line 216 of file messagerenderer.cc.

◆ table_

vector<OffsetItem> isc::dns::MessageRenderer::MessageRendererImpl::table_[BUCKETS]

Definition at line 203 of file messagerenderer.cc.

Referenced by MessageRendererImpl(), addOffset(), and findOffset().

◆ truncated_

bool isc::dns::MessageRenderer::MessageRendererImpl::truncated_

A boolean flag that indicates truncation has occurred while rendering the data.

Definition at line 209 of file messagerenderer.cc.


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