From b4db67074b983b700b8adb32b152d5a16dc3d551 Mon Sep 17 00:00:00 2001 From: JINMEI Tatuya Date: Tue, 26 Jan 2010 23:08:23 +0000 Subject: [PATCH] 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 --- src/lib/dns/cpp/rrtype.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/lib/dns/cpp/rrtype.h b/src/lib/dns/cpp/rrtype.h index 74ae0b8ad4..9aa2066794 100644 --- a/src/lib/dns/cpp/rrtype.h +++ b/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. ///