7 #ifndef MESSAGERENDERER_H 8 #define MESSAGERENDERER_H 1 12 #include <boost/noncopyable.hpp> 234 void skip(
size_t len) {
263 virtual void clear();
329 virtual void writeName(
const Name& name,
bool compress =
true) = 0;
357 public boost::noncopyable {
381 virtual void clear();
382 virtual void writeName(
const Name& name,
bool compress =
true);
391 #endif // MESSAGERENDERER_H void setBuffer(isc::util::OutputBuffer *buffer)
Set or reset a temporary output buffer.
The Name class encapsulates DNS names.
void writeUint8(const uint8_t data)
Write an unsigned 8-bit integer into the internal buffer.
virtual void writeName(const Name &name, bool compress=true)=0
Write a Name object into the internal buffer in wire format, with or without name compression...
void skip(size_t len)
Insert a specified length of gap at the end of the buffer.
virtual bool isTruncated() const =0
Return whether truncation has occurred while rendering.
void skip(size_t len)
Insert a specified length of gap at the end of the buffer.
AbstractMessageRenderer()
The default constructor.
void writeUint16At(uint16_t data, size_t pos)
Write an unsigned 16-bit integer in host byte order at the specified position of the internal buffer ...
The MessageRendererImpl class is the actual implementation of MessageRenderer.
void writeUint32(uint32_t data)
Write an unsigned 32-bit integer in host byte order into the internal buffer in network byte order...
isc::util::OutputBuffer & getBuffer()
void trim(size_t len)
Trim the specified length of data from the end of the internal buffer.
void trim(size_t len)
Trim the specified length of data from the end of the buffer.
virtual void clear()
Clear the internal buffer and other internal resources.
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the internal buffer in network byte order...
void writeData(const void *data, size_t len)
Copy an arbitrary length of data into the buffer.
void writeUint16At(uint16_t data, size_t pos)
Write an unsigned 16-bit integer in host byte order at the specified position of the buffer in networ...
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
virtual void setTruncated()=0
Mark the renderer to indicate truncation has occurred while rendering.
CompressMode
Compression mode constants.
void writeData(const void *data, size_t len)
Copy an arbitrary length of data into the internal buffer of the renderer object. ...
const void * getData() const
Return a pointer to the head of the data stored in the buffer.
virtual void setCompressMode(CompressMode mode)=0
Set the compression mode of the renderer class object.
Compress names case-sensitive manner.
virtual ~AbstractMessageRenderer()
The destructor.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
size_t getLength() const
Return the length of data written in the buffer.
void writeUint32(uint32_t data)
Write an unsigned 32-bit integer in host byte order into the buffer in network byte order...
Defines the logger used by the top-level component of kea-lfc.
const isc::util::OutputBuffer & getBuffer() const
Return the output buffer we render into.
const void * getData() const
Return a pointer to the head of the data stored in the internal buffer.
The MessageRenderer is a concrete derived class of AbstractMessageRenderer as a general purpose imple...
void writeUint8(uint8_t data)
Write an unsigned 8-bit integer into the buffer.
Compress names case-insensitive manner (default)
virtual void setLengthLimit(size_t len)=0
Set the maximum length of rendered data that can fit in the corresponding DNS message without truncat...
size_t getLength() const
Return the length of data written in the internal buffer.
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the buffer in network byte order...
virtual size_t getLengthLimit() const =0
Return the maximum length of rendered data that can fit in the corresponding DNS message without trun...
Light-weight Accessor to Name data.
virtual CompressMode getCompressMode() const =0
Return the compression mode of the renderer class object.