Browse Source

added some more descriptive comments

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac311@2999 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 14 years ago
parent
commit
8b8bfbe1ed
2 changed files with 6 additions and 2 deletions
  1. 2 1
      src/lib/dns/edns.cc
  2. 4 1
      src/lib/dns/message.cc

+ 2 - 1
src/lib/dns/edns.cc

@@ -53,10 +53,11 @@ namespace {
 //                                          <= VERSION_SHIFT (16 bits)
 //                          <= EXTRCODE_SHIFT (24 bits)
 //EXTFLAG_DO:0 0 0 ....................... 0 1 0 0 0 0.....................0
+//VER_MASK:  0 0 0 ........0 1 1 1 1 1 1 1 1 0 0 ..........................0
 
-const uint32_t VERSION_MASK = 0x00ff0000;
 const unsigned int VERSION_SHIFT = 16;
 const unsigned int EXTRCODE_SHIFT = 24;
+const uint32_t VERSION_MASK = 0x00ff0000;
 const uint32_t EXTFLAG_DO = 0x00008000;
 }
 

+ 4 - 1
src/lib/dns/message.cc

@@ -166,11 +166,14 @@ Opcode::toText() const {
 }
 
 namespace {
+// This diagram shows the wire-format representation of the 12-bit extended
+// form RCODEs and its relationship with implementation specific parameters.
+//
 //     0     3               11      15
 //    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //    |UNUSED | EXTENDED-RCODE | RCODE |
 //    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//                            <= EXTRCODE_SHIFT
+//                            <= EXTRCODE_SHIFT (4 bits)
 const unsigned int EXTRCODE_SHIFT = 4;
 }