summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/messagerenderer.h
diff options
context:
space:
mode:
authorJINMEI Tatuya <jinmei@isc.org>2012-03-06 23:55:56 +0100
committerJINMEI Tatuya <jinmei@isc.org>2012-03-06 23:55:56 +0100
commitf0b94ec2fb650ddf64d8d51dabb427056465747a (patch)
tree4e62f8ae9d832be2c800f6eec97fb51ab17c1e07 /src/lib/dns/messagerenderer.h
parent[1603] revised the MessageRenderer w/ a hash table and LabelSequence. (diff)
downloadkea-f0b94ec2fb650ddf64d8d51dabb427056465747a.tar.xz
kea-f0b94ec2fb650ddf64d8d51dabb427056465747a.zip
[1603] updated the behavior of setCompressMode(): now disallow it in rendering.
the new implementation doesn't allow such flexibility anymore (as the hash value would change). added comment about that, and updated the test accordingly.
Diffstat (limited to 'src/lib/dns/messagerenderer.h')
-rw-r--r--src/lib/dns/messagerenderer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/dns/messagerenderer.h b/src/lib/dns/messagerenderer.h
index f7f2381dc0..4c1c92a34f 100644
--- a/src/lib/dns/messagerenderer.h
+++ b/src/lib/dns/messagerenderer.h
@@ -359,7 +359,17 @@ public:
virtual CompressMode getCompressMode() const;
virtual void setTruncated();
virtual void setLengthLimit(size_t len);
+
+ /// This implementation does not allow this call in the middle of
+ /// rendering (i.e. after at least one name is rendered) due to
+ /// restriction specific to the internal implementation. Such attempts
+ /// will result in an \c isc::InvalidParameter exception.
+ ///
+ /// This shouldn't be too restrictive in practice; there's no known
+ /// practical case for such a mixed compression policy in a single
+ /// message.
virtual void setCompressMode(CompressMode mode);
+
virtual void clear();
virtual void writeName(const Name& name, bool compress = true);
private: