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 setLengthLimit(size_t len)
Set the maximum length of rendered data that can fit in the corresponding DNS message without truncat...
const void * getData() const
Return a pointer to the head of the data stored in the 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 void setTruncated()
Mark the renderer to indicate truncation has occurred while rendering.
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.
virtual void clear()
Clear the internal buffer and other internal resources.
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...
virtual bool isTruncated() const
Return whether truncation has occurred while rendering.
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...
const void * getData() const
Return a pointer to the head of the data stored in the internal buffer.
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
virtual void writeName(const Name &name, bool compress=true)
Write a Name object into the internal buffer in wire format, with or without name compression...
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. ...
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.
virtual ~MessageRenderer()
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-dhcp-ddns.
const isc::util::OutputBuffer & getBuffer() const
Return the output buffer we render into.
virtual CompressMode getCompressMode() const
Return the compression mode of the renderer class object.
virtual size_t getLengthLimit() const
Return the maximum length of rendered data that can fit in the corresponding DNS message without trun...
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...
virtual void setCompressMode(CompressMode mode)
This implementation does not allow this call in the middle of rendering (i.e.
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the buffer in network byte order...
size_t getLength() const
Return the length of data written in the internal buffer.
virtual size_t getLengthLimit() const =0
Return the maximum length of rendered data that can fit in the corresponding DNS message without trun...
size_t getLength() const
Return the length of data written in the buffer.
Light-weight Accessor to Name data.
virtual CompressMode getCompressMode() const =0
Return the compression mode of the renderer class object.