2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

defined some compression related constants to avoid hardcoding magic numbers

as much as possible.


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/jinmei-dnsmessageapi@389 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
JINMEI Tatuya
2009-12-19 02:31:33 +00:00
parent d09d0eccb1
commit b9ced3f2ee

View File

@@ -457,6 +457,17 @@ public:
/// \brief Max allowable length of labels of a domain name.
static const size_t MAX_LABELLEN = 63;
/// \brief Max possible pointer value for name compression.
///
/// This is the highest number of 14-bit unsigned integer. Name compression
/// pointers are identified as a 2-byte value starting with the upper two
/// bit being 11.
static const uint16_t MAX_COMPRESS_POINTER = 0x3fff;
/// \brief A 8-bit masked value indicating a start of compression pointer.
static const uint16_t COMPRESS_POINTER_MARK8 = 0xc0;
/// \brief A 16-bit masked value indicating a start of compression pointer.
static const uint16_t COMPRESS_POINTER_MARK16 = 0xc000;
//@}
private: