Browse Source

added some more well known RR Type constants

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@534 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
b4db67074b
1 changed files with 36 additions and 0 deletions
  1. 36 0
      src/lib/dns/cpp/rrtype.h

+ 36 - 0
src/lib/dns/cpp/rrtype.h

@@ -253,6 +253,10 @@ public:
     // hard-coded for a proof of concept.
     static const RRType& A();
     static const RRType& NS();
+    static const RRType& MX();
+    static const RRType& SOA();
+    static const RRType& TXT();
+    static const RRType& AAAA();
 
 private:
     uint16_t typecode_;
@@ -277,6 +281,38 @@ RRType::NS()
     return (rrtype);
 }
 
+inline const RRType&
+RRType::SOA()
+{
+    static RRType rrtype(6);
+
+    return (rrtype);
+}
+
+inline const RRType&
+RRType::MX()
+{
+    static RRType rrtype(15);
+
+    return (rrtype);
+}
+
+inline const RRType&
+RRType::TXT()
+{
+    static RRType rrtype(16);
+
+    return (rrtype);
+}
+
+inline const RRType&
+RRType::AAAA()
+{
+    static RRType rrtype(28);
+
+    return (rrtype);
+}
+
 ///
 /// \brief Insert the \c RRType as a string into stream.
 ///