Browse Source

added some document. committing it mainly for maintenance purposes.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac311@2840 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 14 years ago
parent
commit
4467ae9955
1 changed files with 17 additions and 5 deletions
  1. 17 5
      src/lib/dns/edns.h

+ 17 - 5
src/lib/dns/edns.h

@@ -60,13 +60,26 @@ typedef boost::shared_ptr<const EDNS> ConstEDNSPtr;
 /// MEMO: performance consideration: toWire() can be optimized by caching
 /// the rendered image and reuse EDNS
 ///
+/// This version of this class is copyable, but we may want to change it
+/// once we support EDNS options.
+/// (Note to ourselves: the python binding assumes this class is copyable).
+///
 ///TBD: how to manage options is an open issue.
 class EDNS {
 public:
+    ///
+    /// \name Constructors and Destructor
+    ///
+    /// We use the default copy constructor, default copy assignment operator,
+    /// and default destructors intentionally.
+    ///
+    //@{
+    /// By default, the highest supported version is assumed.
     explicit EDNS(const uint8_t version = SUPPORTED_VERSION);
 
     EDNS(const Name& name, const RRClass& rrclass, const RRType& rrtype,
          const RRTTL& ttl, const rdata::Rdata& rdata);
+    //@}
 
     /// \brief Returns the version of EDNS.
     uint8_t getVersion() const { return (version_); }
@@ -105,8 +118,9 @@ public:
     /// TBD
     std::string toText() const;
 
-    // TBD: currently not implemented.
-    void addOption();
+    // TBD: currently not implemented.  We'll eventually need something like
+    // this.
+    //void addOption();
 
 private:
     /// Helper method to define unified implementation for the public versions
@@ -135,10 +149,8 @@ private:
 /// exception is thrown \c extended_code won't be modified.
 EDNS* createEDNSFromRR(const Name& name, const RRClass& rrclass,
                        const RRType& rrtype, const RRTTL& ttl,
-                       const rdata::Rdata& rdata,
-                       uint8_t& extended_rcode);
+                       const rdata::Rdata& rdata, uint8_t& extended_rcode);
 
-/// Should we define this?
 std::ostream& operator<<(std::ostream& os, const EDNS& edns);
 }
 }