LCOV - code coverage report
Current view: top level - dns - rdataclass.h (source / functions) Hit Total Coverage
Test: report.info Lines: 38 40 95.0 %
Date: 2012-05-15 Functions: 33 38 86.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 12 22 54.5 %

           Branch data     Line data    Source code
       1                 :            : ///////////////
       2                 :            : ///////////////
       3                 :            : ///////////////   THIS FILE IS AUTOMATICALLY GENERATED BY gen-rdatacode.py.
       4                 :            : ///////////////   DO NOT EDIT!
       5                 :            : ///////////////
       6                 :            : ///////////////
       7                 :            : 
       8                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
       9                 :            : //
      10                 :            : // Permission to use, copy, modify, and/or distribute this software for any
      11                 :            : // purpose with or without fee is hereby granted, provided that the above
      12                 :            : // copyright notice and this permission notice appear in all copies.
      13                 :            : //
      14                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
      15                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      16                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
      17                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      18                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
      19                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      20                 :            : // PERFORMANCE OF THIS SOFTWARE.
      21                 :            : 
      22                 :            : #ifndef __ANY_TSIG_250_H
      23                 :            : #define __ANY_TSIG_250_H 1
      24                 :            : 
      25                 :            : #include <stdint.h>
      26                 :            : 
      27                 :            : #include <string>
      28                 :            : 
      29                 :            : #include <dns/rdata.h>
      30                 :            : 
      31                 :            : namespace isc {
      32                 :            : namespace dns {
      33                 :            : class Name;
      34                 :            : }
      35                 :            : }
      36                 :            : 
      37                 :            : namespace isc {
      38                 :            : namespace util {
      39                 :            : 
      40                 :            : class InputBuffer;
      41                 :            : class OutputBuffer;
      42                 :            : }
      43                 :            : 
      44                 :            : namespace dns {
      45                 :            : 
      46                 :            : // BEGIN_COMMON_DECLARATIONS
      47                 :            : 
      48                 :            : class AbstractMessageRenderer;
      49                 :            : 
      50                 :            : // END_COMMON_DECLARATIONS
      51                 :            : 
      52                 :            : namespace rdata {
      53                 :            : namespace any {
      54                 :            : 
      55                 :            : /// \brief \c rdata::TSIG class represents the TSIG RDATA as defined %in
      56                 :            : /// RFC2845.
      57                 :            : ///
      58                 :            : /// This class implements the basic interfaces inherited from the abstract
      59                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
      60                 :            : /// TSIG RDATA.
      61                 :            : class TSIG : public Rdata {
      62                 :            : public:
      63                 :            :     // BEGIN_COMMON_MEMBERS
      64                 :            : 
      65                 :            :     explicit TSIG(const std::string& type_str);
      66                 :            :     TSIG(isc::util::InputBuffer& buffer, size_t rdata_len);
      67                 :            :     TSIG(const TSIG& other);
      68                 :            :     virtual std::string toText() const;
      69                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
      70                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
      71                 :            :     virtual int compare(const Rdata& other) const;
      72                 :            : 
      73                 :            :     // END_COMMON_MEMBERS
      74                 :            : 
      75                 :            :     /// \brief Constructor from RDATA field parameters.
      76                 :            :     ///
      77                 :            :     /// The parameters are a straightforward mapping of %TSIG RDATA
      78                 :            :     /// fields as defined %in RFC2845, but there are some implementation
      79                 :            :     /// specific notes as follows.
      80                 :            :     ///
      81                 :            :     /// \c algorithm is a \c Name object that specifies the algorithm.
      82                 :            :     /// For example, if the algorithm is HMAC-SHA256, \c algorithm would be
      83                 :            :     /// \c Name("hmac-sha256").
      84                 :            :     ///
      85                 :            :     /// \c time_signed corresponds to the Time Signed field, which is of
      86                 :            :     /// 48-bit unsigned integer type, and therefore cannot exceed 2^48-1;
      87                 :            :     /// otherwise, an exception of type \c OutOfRange will be thrown.
      88                 :            :     ///
      89                 :            :     /// \c mac_size and \c mac correspond to the MAC Size and MAC fields,
      90                 :            :     /// respectively.  When the MAC field is empty, \c mac must be NULL.
      91                 :            :     /// \c mac_size and \c mac must be consistent %in that \c mac_size is 0 if
      92                 :            :     /// and only if \c mac is NULL; otherwise an exception of type
      93                 :            :     /// InvalidParameter will be thrown.
      94                 :            :     ///
      95                 :            :     /// The same restriction applies to \c other_len and \c other_data,
      96                 :            :     /// which correspond to the Other Len and Other Data fields, respectively.
      97                 :            :     ///
      98                 :            :     /// This constructor internally involves resource allocation, and if
      99                 :            :     /// it fails, a corresponding standard exception will be thrown.
     100                 :            :     TSIG(const Name& algorithm, uint64_t time_signed, uint16_t fudge,
     101                 :            :          uint16_t mac_size, const void* mac, uint16_t original_id,
     102                 :            :          uint16_t error, uint16_t other_len, const void* other_data);
     103                 :            : 
     104                 :            :     /// \brief Assignment operator.
     105                 :            :     ///
     106                 :            :     /// It internally allocates a resource, and if it fails a corresponding
     107                 :            :     /// standard exception will be thrown.
     108                 :            :     /// This operator never throws an exception otherwise.
     109                 :            :     ///
     110                 :            :     /// This operator provides the strong exception guarantee: When an
     111                 :            :     /// exception is thrown the content of the assignment target will be
     112                 :            :     /// intact.
     113                 :            :     TSIG& operator=(const TSIG& source);
     114                 :            : 
     115                 :            :     /// \brief The destructor.
     116                 :            :     ~TSIG();
     117                 :            : 
     118                 :            :     /// \brief Return the algorithm name.
     119                 :            :     ///
     120                 :            :     /// This method never throws an exception.
     121                 :            :     const Name& getAlgorithm() const;
     122                 :            : 
     123                 :            :     /// \brief Return the value of the Time Signed field.
     124                 :            :     ///
     125                 :            :     /// The returned value does not exceed 2^48-1.
     126                 :            :     ///
     127                 :            :     /// This method never throws an exception.
     128                 :            :     uint64_t getTimeSigned() const;
     129                 :            : 
     130                 :            :     /// \brief Return the value of the Fudge field.
     131                 :            :     ///
     132                 :            :     /// This method never throws an exception.
     133                 :            :     uint16_t getFudge() const;
     134                 :            : 
     135                 :            :     /// \brief Return the value of the MAC Size field.
     136                 :            :     ///
     137                 :            :     /// This method never throws an exception.
     138                 :            :     uint16_t getMACSize() const;
     139                 :            : 
     140                 :            :     /// \brief Return the value of the MAC field.
     141                 :            :     ///
     142                 :            :     /// If the MAC field is empty, it returns NULL.
     143                 :            :     /// Otherwise, the memory region beginning at the address returned by
     144                 :            :     /// this method is valid up to the bytes specified by the return value
     145                 :            :     /// of \c getMACSize().
     146                 :            :     /// The memory region is only valid while the corresponding \c TSIG
     147                 :            :     /// object is valid.  The caller must hold the \c TSIG object while
     148                 :            :     /// it needs to refer to the region or it must make a local copy of the
     149                 :            :     /// region.
     150                 :            :     ///
     151                 :            :     /// This method never throws an exception.
     152                 :            :     const void* getMAC() const;
     153                 :            : 
     154                 :            :     /// \brief Return the value of the Original ID field.
     155                 :            :     ///
     156                 :            :     /// This method never throws an exception.
     157                 :            :     uint16_t getOriginalID() const;
     158                 :            : 
     159                 :            :     /// \brief Return the value of the Error field.
     160                 :            :     ///
     161                 :            :     /// This method never throws an exception.
     162                 :            :     uint16_t getError() const;
     163                 :            : 
     164                 :            :     /// \brief Return the value of the Other Len field.
     165                 :            :     ///
     166                 :            :     /// This method never throws an exception.
     167                 :            :     uint16_t getOtherLen() const;
     168                 :            : 
     169                 :            :     /// \brief Return the value of the Other Data field.
     170                 :            :     ///
     171                 :            :     /// The same note as \c getMAC() applies.
     172                 :            :     ///
     173                 :            :     /// This method never throws an exception.
     174                 :            :     const void* getOtherData() const;
     175                 :            : private:
     176                 :            :     struct TSIGImpl;
     177                 :            :     TSIGImpl* impl_;
     178                 :            : };
     179                 :            : 
     180                 :            : } // end of namespace "any"
     181                 :            : } // end of namespace "rdata"
     182                 :            : } // end of namespace "dns"
     183                 :            : } // end of namespace "isc"
     184                 :            : #endif // __ANY_TSIG_250_H
     185                 :            : 
     186                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
     187                 :            : //
     188                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     189                 :            : // purpose with or without fee is hereby granted, provided that the above
     190                 :            : // copyright notice and this permission notice appear in all copies.
     191                 :            : //
     192                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     193                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     194                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     195                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     196                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     197                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     198                 :            : // PERFORMANCE OF THIS SOFTWARE.
     199                 :            : 
     200                 :            : #ifndef __CH_A_1_H
     201                 :            : #define __CH_A_1_H 1
     202                 :            : 
     203                 :            : #include <string>
     204                 :            : 
     205                 :            : #include <dns/rdata.h>
     206                 :            : 
     207                 :            : namespace isc {
     208                 :            : namespace util {
     209                 :            : 
     210                 :            : class InputBuffer;
     211                 :            : class OutputBuffer;
     212                 :            : }
     213                 :            : 
     214                 :            : namespace dns {
     215                 :            : 
     216                 :            : // BEGIN_COMMON_DECLARATIONS
     217                 :            : 
     218                 :            : class AbstractMessageRenderer;
     219                 :            : 
     220                 :            : // END_COMMON_DECLARATIONS
     221                 :            : 
     222                 :            : namespace rdata {
     223                 :            : namespace ch {
     224                 :            : 
     225                 :          0 : class A : public Rdata {
     226                 :            : public:
     227                 :            :     // BEGIN_COMMON_MEMBERS
     228                 :            : 
     229                 :            :     explicit A(const std::string& type_str);
     230                 :            :     A(isc::util::InputBuffer& buffer, size_t rdata_len);
     231                 :            :     A(const A& other);
     232                 :            :     virtual std::string toText() const;
     233                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     234                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     235                 :            :     virtual int compare(const Rdata& other) const;
     236                 :            : 
     237                 :            :     // END_COMMON_MEMBERS
     238                 :            : };
     239                 :            : 
     240                 :            : } // end of namespace "ch"
     241                 :            : } // end of namespace "rdata"
     242                 :            : } // end of namespace "dns"
     243                 :            : } // end of namespace "isc"
     244                 :            : #endif // __CH_A_1_H
     245                 :            : 
     246                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
     247                 :            : //
     248                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     249                 :            : // purpose with or without fee is hereby granted, provided that the above
     250                 :            : // copyright notice and this permission notice appear in all copies.
     251                 :            : //
     252                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     253                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     254                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     255                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     256                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     257                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     258                 :            : // PERFORMANCE OF THIS SOFTWARE.
     259                 :            : 
     260                 :            : #ifndef __GENERIC_AFSDB_18_H
     261                 :            : #define __GENERIC_AFSDB_18_H 1
     262                 :            : 
     263                 :            : #include <stdint.h>
     264                 :            : 
     265                 :            : #include <string>
     266                 :            : 
     267                 :            : #include <dns/name.h>
     268                 :            : #include <dns/rdata.h>
     269                 :            : 
     270                 :            : namespace isc {
     271                 :            : namespace util {
     272                 :            : 
     273                 :            : class InputBuffer;
     274                 :            : class OutputBuffer;
     275                 :            : }
     276                 :            : 
     277                 :            : namespace dns {
     278                 :            : 
     279                 :            : // BEGIN_COMMON_DECLARATIONS
     280                 :            : 
     281                 :            : class AbstractMessageRenderer;
     282                 :            : 
     283                 :            : // END_COMMON_DECLARATIONS
     284                 :            : 
     285                 :            : namespace rdata {
     286                 :            : namespace generic {
     287                 :            : 
     288                 :            : /// \brief \c rdata::AFSDB class represents the AFSDB RDATA as defined %in
     289                 :            : /// RFC1183.
     290                 :            : ///
     291                 :            : /// This class implements the basic interfaces inherited from the abstract
     292                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
     293                 :            : /// AFSDB RDATA.
     294                 :         61 : class AFSDB : public Rdata {
     295                 :            : public:
     296                 :            :     // BEGIN_COMMON_MEMBERS
     297                 :            : 
     298                 :            :     explicit AFSDB(const std::string& type_str);
     299                 :            :     AFSDB(isc::util::InputBuffer& buffer, size_t rdata_len);
     300                 :            :     AFSDB(const AFSDB& other);
     301                 :            :     virtual std::string toText() const;
     302                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     303                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     304                 :            :     virtual int compare(const Rdata& other) const;
     305                 :            : 
     306                 :            :     // END_COMMON_MEMBERS
     307                 :            : 
     308                 :            :     /// \brief Assignment operator.
     309                 :            :     ///
     310                 :            :     /// This method never throws an exception.
     311                 :            :     AFSDB& operator=(const AFSDB& source);
     312                 :            :     ///
     313                 :            :     /// Specialized methods
     314                 :            :     ///
     315                 :            : 
     316                 :            :     /// \brief Return the value of the server field.
     317                 :            :     ///
     318                 :            :     /// \return A reference to a \c Name class object corresponding to the
     319                 :            :     /// internal server name.
     320                 :            :     ///
     321                 :            :     /// This method never throws an exception.
     322                 :            :     const Name& getServer() const;
     323                 :            : 
     324                 :            :     /// \brief Return the value of the subtype field.
     325                 :            :     ///
     326                 :            :     /// This method never throws an exception.
     327                 :            :     uint16_t getSubtype() const;
     328                 :            : 
     329                 :            : private:
     330                 :            :     uint16_t subtype_;
     331                 :            :     Name server_;
     332                 :            : };
     333                 :            : 
     334                 :            : } // end of namespace "generic"
     335                 :            : } // end of namespace "rdata"
     336                 :            : } // end of namespace "dns"
     337                 :            : } // end of namespace "isc"
     338                 :            : #endif // __GENERIC_AFSDB_18_H
     339                 :            : 
     340                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
     341                 :            : //
     342                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     343                 :            : // purpose with or without fee is hereby granted, provided that the above
     344                 :            : // copyright notice and this permission notice appear in all copies.
     345                 :            : //
     346                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     347                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     348                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     349                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     350                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     351                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     352                 :            : // PERFORMANCE OF THIS SOFTWARE.
     353                 :            : 
     354                 :            : #ifndef __GENERIC_CNAME_5_H
     355                 :            : #define __GENERIC_CNAME_5_H 1
     356                 :            : 
     357                 :            : #include <string>
     358                 :            : 
     359                 :            : #include <dns/name.h>
     360                 :            : #include <dns/rdata.h>
     361                 :            : 
     362                 :            : namespace isc {
     363                 :            : namespace util {
     364                 :            : 
     365                 :            : class InputBuffer;
     366                 :            : class OutputBuffer;
     367                 :            : }
     368                 :            : 
     369                 :            : namespace dns {
     370                 :            : 
     371                 :            : // BEGIN_COMMON_DECLARATIONS
     372                 :            : 
     373                 :            : class AbstractMessageRenderer;
     374                 :            : 
     375                 :            : // END_COMMON_DECLARATIONS
     376                 :            : 
     377                 :            : namespace rdata {
     378                 :            : namespace generic {
     379                 :            : 
     380                 :       2480 : class CNAME : public Rdata {
     381                 :            : public:
     382                 :            :     // BEGIN_COMMON_MEMBERS
     383                 :            : 
     384                 :            :     explicit CNAME(const std::string& type_str);
     385                 :            :     CNAME(isc::util::InputBuffer& buffer, size_t rdata_len);
     386                 :            :     CNAME(const CNAME& other);
     387                 :            :     virtual std::string toText() const;
     388                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     389                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     390                 :            :     virtual int compare(const Rdata& other) const;
     391                 :            : 
     392                 :            :     // END_COMMON_MEMBERS
     393                 :            : 
     394                 :            :     // CNAME specific methods
     395                 :            :     CNAME(const Name& cname);
     396                 :            :     const Name& getCname() const;
     397                 :            : private:
     398                 :            :     Name cname_;
     399                 :            : };
     400                 :            : 
     401                 :            : } // end of namespace "generic"
     402                 :            : } // end of namespace "rdata"
     403                 :            : } // end of namespace "dns"
     404                 :            : } // end of namespace "isc"
     405                 :            : #endif // __GENERIC_CNAME_5_H
     406                 :            : 
     407                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
     408                 :            : //
     409                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     410                 :            : // purpose with or without fee is hereby granted, provided that the above
     411                 :            : // copyright notice and this permission notice appear in all copies.
     412                 :            : //
     413                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     414                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     415                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     416                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     417                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     418                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     419                 :            : // PERFORMANCE OF THIS SOFTWARE.
     420                 :            : 
     421                 :            : #ifndef __GENERIC_DLV_32769_H
     422                 :            : #define __GENERIC_DLV_32769_H 1
     423                 :            : 
     424                 :            : #include <stdint.h>
     425                 :            : 
     426                 :            : #include <string>
     427                 :            : 
     428                 :            : #include <dns/name.h>
     429                 :            : #include <dns/rrtype.h>
     430                 :            : #include <dns/rrttl.h>
     431                 :            : #include <dns/rdata.h>
     432                 :            : 
     433                 :            : namespace isc {
     434                 :            : namespace util {
     435                 :            : 
     436                 :            : class InputBuffer;
     437                 :            : class OutputBuffer;
     438                 :            : }
     439                 :            : 
     440                 :            : namespace dns {
     441                 :            : 
     442                 :            : // BEGIN_COMMON_DECLARATIONS
     443                 :            : 
     444                 :            : class AbstractMessageRenderer;
     445                 :            : 
     446                 :            : // END_COMMON_DECLARATIONS
     447                 :            : 
     448                 :            : namespace rdata {
     449                 :            : namespace generic {
     450                 :            : 
     451                 :            : namespace detail {
     452                 :            : template <class Type, uint16_t typeCode> class DSLikeImpl;
     453                 :            : }
     454                 :            : 
     455                 :            : /// \brief \c rdata::generic::DLV class represents the DLV RDATA as defined in
     456                 :            : /// RFC4431.
     457                 :            : ///
     458                 :            : /// This class implements the basic interfaces inherited from the abstract
     459                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
     460                 :            : /// DLV RDATA.
     461                 :            : class DLV : public Rdata {
     462                 :            : public:
     463                 :            :     // BEGIN_COMMON_MEMBERS
     464                 :            : 
     465                 :            :     explicit DLV(const std::string& type_str);
     466                 :            :     DLV(isc::util::InputBuffer& buffer, size_t rdata_len);
     467                 :            :     DLV(const DLV& other);
     468                 :            :     virtual std::string toText() const;
     469                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     470                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     471                 :            :     virtual int compare(const Rdata& other) const;
     472                 :            : 
     473                 :            :     // END_COMMON_MEMBERS
     474                 :            : 
     475                 :            :     /// \brief Assignment operator.
     476                 :            :     ///
     477                 :            :     /// It internally allocates a resource, and if it fails a corresponding
     478                 :            :     /// standard exception will be thrown.
     479                 :            :     /// This operator never throws an exception otherwise.
     480                 :            :     ///
     481                 :            :     /// This operator provides the strong exception guarantee: When an
     482                 :            :     /// exception is thrown the content of the assignment target will be
     483                 :            :     /// intact.
     484                 :            :     DLV& operator=(const DLV& source);
     485                 :            : 
     486                 :            :     /// \brief The destructor.
     487                 :            :     ~DLV();
     488                 :            : 
     489                 :            :     /// \brief Return the value of the Tag field.
     490                 :            :     ///
     491                 :            :     /// This method never throws an exception.
     492                 :            :     uint16_t getTag() const;
     493                 :            : private:
     494                 :            :     typedef detail::DSLikeImpl<DLV, 32769> DLVImpl;
     495                 :            :     DLVImpl* impl_;
     496                 :            : };
     497                 :            : 
     498                 :            : } // end of namespace "generic"
     499                 :            : } // end of namespace "rdata"
     500                 :            : } // end of namespace "dns"
     501                 :            : } // end of namespace "isc"
     502                 :            : #endif // __GENERIC_DLV_32769_H
     503                 :            : 
     504                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
     505                 :            : //
     506                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     507                 :            : // purpose with or without fee is hereby granted, provided that the above
     508                 :            : // copyright notice and this permission notice appear in all copies.
     509                 :            : //
     510                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     511                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     512                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     513                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     514                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     515                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     516                 :            : // PERFORMANCE OF THIS SOFTWARE.
     517                 :            : 
     518                 :            : #ifndef __GENERIC_DNAME_39_H
     519                 :            : #define __GENERIC_DNAME_39_H 1
     520                 :            : 
     521                 :            : #include <string>
     522                 :            : 
     523                 :            : #include <dns/name.h>
     524                 :            : #include <dns/rdata.h>
     525                 :            : 
     526                 :            : namespace isc {
     527                 :            : namespace util {
     528                 :            : 
     529                 :            : class InputBuffer;
     530                 :            : class OutputBuffer;
     531                 :            : }
     532                 :            : 
     533                 :            : namespace dns {
     534                 :            : 
     535                 :            : // BEGIN_COMMON_DECLARATIONS
     536                 :            : 
     537                 :            : class AbstractMessageRenderer;
     538                 :            : 
     539                 :            : // END_COMMON_DECLARATIONS
     540                 :            : 
     541                 :            : namespace rdata {
     542                 :            : namespace generic {
     543                 :            : 
     544                 :       1551 : class DNAME : public Rdata {
     545                 :            : public:
     546                 :            :     // BEGIN_COMMON_MEMBERS
     547                 :            : 
     548                 :            :     explicit DNAME(const std::string& type_str);
     549                 :            :     DNAME(isc::util::InputBuffer& buffer, size_t rdata_len);
     550                 :            :     DNAME(const DNAME& other);
     551                 :            :     virtual std::string toText() const;
     552                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     553                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     554                 :            :     virtual int compare(const Rdata& other) const;
     555                 :            : 
     556                 :            :     // END_COMMON_MEMBERS
     557                 :            : 
     558                 :            :     // DNAME specific methods
     559                 :            :     DNAME(const Name& dname);
     560                 :            :     const Name& getDname() const;
     561                 :            : private:
     562                 :            :     Name dname_;
     563                 :            : };
     564                 :            : 
     565                 :            : } // end of namespace "generic"
     566                 :            : } // end of namespace "rdata"
     567                 :            : } // end of namespace "dns"
     568                 :            : } // end of namespace "isc"
     569                 :            : #endif // __GENERIC_DNAME_39_H
     570                 :            : 
     571                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
     572                 :            : //
     573                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     574                 :            : // purpose with or without fee is hereby granted, provided that the above
     575                 :            : // copyright notice and this permission notice appear in all copies.
     576                 :            : //
     577                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     578                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     579                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     580                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     581                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     582                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     583                 :            : // PERFORMANCE OF THIS SOFTWARE.
     584                 :            : 
     585                 :            : #include <stdint.h>
     586                 :            : 
     587                 :            : #include <string>
     588                 :            : 
     589                 :            : #include <dns/name.h>
     590                 :            : #include <dns/rrtype.h>
     591                 :            : #include <dns/rrttl.h>
     592                 :            : #include <dns/rdata.h>
     593                 :            : 
     594                 :            : #ifndef __GENERIC_DNSKEY_48_H
     595                 :            : #define __GENERIC_DNSKEY_48_H 1
     596                 :            : 
     597                 :            : namespace isc {
     598                 :            : namespace util {
     599                 :            : 
     600                 :            : class InputBuffer;
     601                 :            : class OutputBuffer;
     602                 :            : }
     603                 :            : 
     604                 :            : namespace dns {
     605                 :            : 
     606                 :            : // BEGIN_COMMON_DECLARATIONS
     607                 :            : 
     608                 :            : class AbstractMessageRenderer;
     609                 :            : 
     610                 :            : // END_COMMON_DECLARATIONS
     611                 :            : 
     612                 :            : namespace rdata {
     613                 :            : namespace generic {
     614                 :            : 
     615                 :            : struct DNSKEYImpl;
     616                 :            : 
     617                 :            : class DNSKEY : public Rdata {
     618                 :            : public:
     619                 :            :     // BEGIN_COMMON_MEMBERS
     620                 :            : 
     621                 :            :     explicit DNSKEY(const std::string& type_str);
     622                 :            :     DNSKEY(isc::util::InputBuffer& buffer, size_t rdata_len);
     623                 :            :     DNSKEY(const DNSKEY& other);
     624                 :            :     virtual std::string toText() const;
     625                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     626                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     627                 :            :     virtual int compare(const Rdata& other) const;
     628                 :            : 
     629                 :            :     // END_COMMON_MEMBERS
     630                 :            :     DNSKEY& operator=(const DNSKEY& source);
     631                 :            :     ~DNSKEY();
     632                 :            : 
     633                 :            :     ///
     634                 :            :     /// Specialized methods
     635                 :            :     ///
     636                 :            :     uint16_t getTag() const;
     637                 :            :     uint16_t getFlags() const;
     638                 :            :     uint8_t getAlgorithm() const;
     639                 :            : 
     640                 :            : private:
     641                 :            :     DNSKEYImpl* impl_;
     642                 :            : };
     643                 :            : 
     644                 :            : } // end of namespace "generic"
     645                 :            : } // end of namespace "rdata"
     646                 :            : } // end of namespace "dns"
     647                 :            : } // end of namespace "isc"
     648                 :            : #endif // __GENERIC_DNSKEY_48_H
     649                 :            : 
     650                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
     651                 :            : //
     652                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     653                 :            : // purpose with or without fee is hereby granted, provided that the above
     654                 :            : // copyright notice and this permission notice appear in all copies.
     655                 :            : //
     656                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     657                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     658                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     659                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     660                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     661                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     662                 :            : // PERFORMANCE OF THIS SOFTWARE.
     663                 :            : 
     664                 :            : #ifndef __GENERIC_DS_43_H
     665                 :            : #define __GENERIC_DS_43_H 1
     666                 :            : 
     667                 :            : #include <stdint.h>
     668                 :            : 
     669                 :            : #include <string>
     670                 :            : 
     671                 :            : #include <dns/name.h>
     672                 :            : #include <dns/rrtype.h>
     673                 :            : #include <dns/rrttl.h>
     674                 :            : #include <dns/rdata.h>
     675                 :            : 
     676                 :            : namespace isc {
     677                 :            : namespace util {
     678                 :            : 
     679                 :            : class InputBuffer;
     680                 :            : class OutputBuffer;
     681                 :            : }
     682                 :            : 
     683                 :            : namespace dns {
     684                 :            : 
     685                 :            : // BEGIN_COMMON_DECLARATIONS
     686                 :            : 
     687                 :            : class AbstractMessageRenderer;
     688                 :            : 
     689                 :            : // END_COMMON_DECLARATIONS
     690                 :            : 
     691                 :            : namespace rdata {
     692                 :            : namespace generic {
     693                 :            : 
     694                 :            : namespace detail {
     695                 :            : template <class Type, uint16_t typeCode> class DSLikeImpl;
     696                 :            : }
     697                 :            : 
     698                 :            : /// \brief \c rdata::generic::DS class represents the DS RDATA as defined in
     699                 :            : /// RFC3658.
     700                 :            : ///
     701                 :            : /// This class implements the basic interfaces inherited from the abstract
     702                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
     703                 :            : /// DS RDATA.
     704                 :            : class DS : public Rdata {
     705                 :            : public:
     706                 :            :     // BEGIN_COMMON_MEMBERS
     707                 :            : 
     708                 :            :     explicit DS(const std::string& type_str);
     709                 :            :     DS(isc::util::InputBuffer& buffer, size_t rdata_len);
     710                 :            :     DS(const DS& other);
     711                 :            :     virtual std::string toText() const;
     712                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     713                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     714                 :            :     virtual int compare(const Rdata& other) const;
     715                 :            : 
     716                 :            :     // END_COMMON_MEMBERS
     717                 :            : 
     718                 :            :     /// \brief Assignment operator.
     719                 :            :     ///
     720                 :            :     /// It internally allocates a resource, and if it fails a corresponding
     721                 :            :     /// standard exception will be thrown.
     722                 :            :     /// This operator never throws an exception otherwise.
     723                 :            :     ///
     724                 :            :     /// This operator provides the strong exception guarantee: When an
     725                 :            :     /// exception is thrown the content of the assignment target will be
     726                 :            :     /// intact.
     727                 :            :     DS& operator=(const DS& source);
     728                 :            : 
     729                 :            :     /// \brief The destructor.
     730                 :            :     ~DS();
     731                 :            : 
     732                 :            :     /// \brief Return the value of the Tag field.
     733                 :            :     ///
     734                 :            :     /// This method never throws an exception.
     735                 :            :     uint16_t getTag() const;
     736                 :            : private:
     737                 :            :     typedef detail::DSLikeImpl<DS, 43> DSImpl;
     738                 :            :     DSImpl* impl_;
     739                 :            : };
     740                 :            : 
     741                 :            : } // end of namespace "generic"
     742                 :            : } // end of namespace "rdata"
     743                 :            : } // end of namespace "dns"
     744                 :            : } // end of namespace "isc"
     745                 :            : #endif // __GENERIC_DS_43_H
     746                 :            : 
     747                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
     748                 :            : //
     749                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     750                 :            : // purpose with or without fee is hereby granted, provided that the above
     751                 :            : // copyright notice and this permission notice appear in all copies.
     752                 :            : //
     753                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     754                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     755                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     756                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     757                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     758                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     759                 :            : // PERFORMANCE OF THIS SOFTWARE.
     760                 :            : 
     761                 :            : #ifndef __GENERIC_HINFO_13_H
     762                 :            : #define __GENERIC_HINFO_13_H 1
     763                 :            : #include <stdint.h>
     764                 :            : 
     765                 :            : #include <string>
     766                 :            : 
     767                 :            : #include <dns/name.h>
     768                 :            : #include <dns/rdata.h>
     769                 :            : #include <util/buffer.h>
     770                 :            : 
     771                 :            : namespace isc {
     772                 :            : namespace util {
     773                 :            : 
     774                 :            : class InputBuffer;
     775                 :            : class OutputBuffer;
     776                 :            : }
     777                 :            : 
     778                 :            : namespace dns {
     779                 :            : 
     780                 :            : // BEGIN_COMMON_DECLARATIONS
     781                 :            : 
     782                 :            : class AbstractMessageRenderer;
     783                 :            : 
     784                 :            : // END_COMMON_DECLARATIONS
     785                 :            : 
     786                 :            : namespace rdata {
     787                 :            : namespace generic {
     788                 :            : 
     789                 :            : /// \brief \c HINFO class represents the HINFO rdata defined in
     790                 :            : /// RFC1034, RFC1035
     791                 :            : ///
     792                 :            : /// This class implements the basic interfaces inherited from the
     793                 :            : /// \c rdata::Rdata class, and provides accessors specific to the
     794                 :            : /// HINFO rdata.
     795                 :        116 : class HINFO : public Rdata {
     796                 :            : public:
     797                 :            :     // BEGIN_COMMON_MEMBERS
     798                 :            : 
     799                 :            :     explicit HINFO(const std::string& type_str);
     800                 :            :     HINFO(isc::util::InputBuffer& buffer, size_t rdata_len);
     801                 :            :     HINFO(const HINFO& other);
     802                 :            :     virtual std::string toText() const;
     803                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     804                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     805                 :            :     virtual int compare(const Rdata& other) const;
     806                 :            : 
     807                 :            :     // END_COMMON_MEMBERS
     808                 :            : 
     809                 :            :     // HINFO specific methods
     810                 :            :     const std::string& getCPU() const;
     811                 :            :     const std::string& getOS() const;
     812                 :            : 
     813                 :            : private:
     814                 :            :     /// Skip the left whitespaces of the input string
     815                 :            :     ///
     816                 :            :     /// \param input_str The input string
     817                 :            :     /// \param input_iterator From which the skipping started
     818                 :            :     void skipLeftSpaces(const std::string& input_str,
     819                 :            :                         std::string::const_iterator& input_iterator);
     820                 :            : 
     821                 :            :     /// Helper template function for toWire()
     822                 :            :     ///
     823                 :            :     /// \param outputer Where to write data in
     824                 :            :     template <typename T>
     825                 :            :     void toWireHelper(T& outputer) const {
     826                 :          1 :         outputer.writeUint8(cpu_.size());
     827                 :          1 :         outputer.writeData(cpu_.c_str(), cpu_.size());
     828                 :            : 
     829                 :          1 :         outputer.writeUint8(os_.size());
     830                 :          1 :         outputer.writeData(os_.c_str(), os_.size());
     831                 :            :     }
     832                 :            : 
     833                 :            :     std::string cpu_;
     834                 :            :     std::string os_;
     835                 :            : };
     836                 :            : 
     837                 :            : 
     838                 :            : } // end of namespace "generic"
     839                 :            : } // end of namespace "rdata"
     840                 :            : } // end of namespace "dns"
     841                 :            : } // end of namespace "isc"
     842                 :            : #endif // __GENERIC_HINFO_13_H
     843                 :            : 
     844                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
     845                 :            : //
     846                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     847                 :            : // purpose with or without fee is hereby granted, provided that the above
     848                 :            : // copyright notice and this permission notice appear in all copies.
     849                 :            : //
     850                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     851                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     852                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     853                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     854                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     855                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     856                 :            : // PERFORMANCE OF THIS SOFTWARE.
     857                 :            : 
     858                 :            : #ifndef __GENERIC_MINFO_14_H
     859                 :            : #define __GENERIC_MINFO_14_H 1
     860                 :            : 
     861                 :            : #include <string>
     862                 :            : 
     863                 :            : #include <dns/name.h>
     864                 :            : #include <dns/rdata.h>
     865                 :            : 
     866                 :            : namespace isc {
     867                 :            : namespace util {
     868                 :            : 
     869                 :            : class InputBuffer;
     870                 :            : class OutputBuffer;
     871                 :            : }
     872                 :            : 
     873                 :            : namespace dns {
     874                 :            : 
     875                 :            : // BEGIN_COMMON_DECLARATIONS
     876                 :            : 
     877                 :            : class AbstractMessageRenderer;
     878                 :            : 
     879                 :            : // END_COMMON_DECLARATIONS
     880                 :            : 
     881                 :            : namespace rdata {
     882                 :            : namespace generic {
     883                 :            : 
     884                 :            : /// \brief \c rdata::generic::MINFO class represents the MINFO RDATA as
     885                 :            : /// defined in RFC1035.
     886                 :            : ///
     887                 :            : /// This class implements the basic interfaces inherited from the abstract
     888                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
     889                 :            : /// MINFO RDATA.
     890                 :         57 : class MINFO : public Rdata {
     891                 :            : public:
     892                 :            :     // BEGIN_COMMON_MEMBERS
     893                 :            : 
     894                 :            :     explicit MINFO(const std::string& type_str);
     895                 :            :     MINFO(isc::util::InputBuffer& buffer, size_t rdata_len);
     896                 :            :     MINFO(const MINFO& other);
     897                 :            :     virtual std::string toText() const;
     898                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     899                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     900                 :            :     virtual int compare(const Rdata& other) const;
     901                 :            : 
     902                 :            :     // END_COMMON_MEMBERS
     903                 :            : 
     904                 :            :     /// \brief Define the assignment operator.
     905                 :            :     ///
     906                 :            :     /// \exception std::bad_alloc Memory allocation fails in copying
     907                 :            :     /// internal member variables (this should be very rare).
     908                 :            :     MINFO& operator=(const MINFO& source);
     909                 :            : 
     910                 :            :     /// \brief Return the value of the rmailbox field.
     911                 :            :     ///
     912                 :            :     /// \exception std::bad_alloc If resource allocation for the returned
     913                 :            :     /// \c Name fails.
     914                 :            :     ///
     915                 :            :     /// \note
     916                 :            :     /// Unlike the case of some other RDATA classes (such as
     917                 :            :     /// \c NS::getNSName()), this method constructs a new \c Name object
     918                 :            :     /// and returns it, instead of returning a reference to a \c Name object
     919                 :            :     /// internally maintained in the class (which is a private member).
     920                 :            :     /// This is based on the observation that this method will be rarely
     921                 :            :     /// used and even when it's used it will not be in a performance context
     922                 :            :     /// (for example, a recursive resolver won't need this field in its
     923                 :            :     /// resolution process).  By returning a new object we have flexibility
     924                 :            :     /// of changing the internal representation without the risk of changing
     925                 :            :     /// the interface or method property.
     926                 :            :     /// The same note applies to the \c getEmailbox() method.
     927                 :          2 :     Name getRmailbox() const { return (rmailbox_); }
     928                 :            : 
     929                 :            :     /// \brief Return the value of the emailbox field.
     930                 :            :     ///
     931                 :            :     /// \exception std::bad_alloc If resource allocation for the returned
     932                 :            :     /// \c Name fails.
     933                 :          2 :     Name getEmailbox() const { return (emailbox_); }
     934                 :            : 
     935                 :            : private:
     936                 :            :     Name rmailbox_;
     937                 :            :     Name emailbox_;
     938                 :            : };
     939                 :            : 
     940                 :            : } // end of namespace "generic"
     941                 :            : } // end of namespace "rdata"
     942                 :            : } // end of namespace "dns"
     943                 :            : } // end of namespace "isc"
     944                 :            : #endif // __GENERIC_MINFO_14_H
     945                 :            : 
     946                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
     947                 :            : //
     948                 :            : // Permission to use, copy, modify, and/or distribute this software for any
     949                 :            : // purpose with or without fee is hereby granted, provided that the above
     950                 :            : // copyright notice and this permission notice appear in all copies.
     951                 :            : //
     952                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     953                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     954                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     955                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     956                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     957                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     958                 :            : // PERFORMANCE OF THIS SOFTWARE.
     959                 :            : 
     960                 :            : #ifndef __GENERIC_MX_15_H
     961                 :            : #define __GENERIC_MX_15_H 1
     962                 :            : 
     963                 :            : #include <stdint.h>
     964                 :            : 
     965                 :            : #include <string>
     966                 :            : 
     967                 :            : #include <dns/name.h>
     968                 :            : #include <dns/rdata.h>
     969                 :            : 
     970                 :            : namespace isc {
     971                 :            : namespace util {
     972                 :            : 
     973                 :            : class InputBuffer;
     974                 :            : class OutputBuffer;
     975                 :            : }
     976                 :            : 
     977                 :            : namespace dns {
     978                 :            : 
     979                 :            : // BEGIN_COMMON_DECLARATIONS
     980                 :            : 
     981                 :            : class AbstractMessageRenderer;
     982                 :            : 
     983                 :            : // END_COMMON_DECLARATIONS
     984                 :            : 
     985                 :            : namespace rdata {
     986                 :            : namespace generic {
     987                 :            : 
     988                 :       1796 : class MX : public Rdata {
     989                 :            : public:
     990                 :            :     // BEGIN_COMMON_MEMBERS
     991                 :            : 
     992                 :            :     explicit MX(const std::string& type_str);
     993                 :            :     MX(isc::util::InputBuffer& buffer, size_t rdata_len);
     994                 :            :     MX(const MX& other);
     995                 :            :     virtual std::string toText() const;
     996                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
     997                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
     998                 :            :     virtual int compare(const Rdata& other) const;
     999                 :            : 
    1000                 :            :     // END_COMMON_MEMBERS
    1001                 :            : 
    1002                 :            :     MX(uint16_t preference, const Name& mxname);
    1003                 :            : 
    1004                 :            :     ///
    1005                 :            :     /// Specialized methods
    1006                 :            :     ///
    1007                 :            :     const Name& getMXName() const;
    1008                 :            :     uint16_t getMXPref() const;
    1009                 :            : 
    1010                 :            : private:
    1011                 :            :     /// Note: this is a prototype version; we may reconsider
    1012                 :            :     /// this representation later.
    1013                 :            :     uint16_t preference_;
    1014                 :            :     Name mxname_;
    1015                 :            : };
    1016                 :            : 
    1017                 :            : } // end of namespace "generic"
    1018                 :            : } // end of namespace "rdata"
    1019                 :            : } // end of namespace "dns"
    1020                 :            : } // end of namespace "isc"
    1021                 :            : #endif // __GENERIC_MX_15_H
    1022                 :            : 
    1023                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
    1024                 :            : //
    1025                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1026                 :            : // purpose with or without fee is hereby granted, provided that the above
    1027                 :            : // copyright notice and this permission notice appear in all copies.
    1028                 :            : //
    1029                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1030                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1031                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1032                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1033                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1034                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1035                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1036                 :            : 
    1037                 :            : #ifndef __GENERIC_NAPTR_35_H
    1038                 :            : #define __GENERIC_NAPTR_35_H 1
    1039                 :            : 
    1040                 :            : #include <string>
    1041                 :            : 
    1042                 :            : #include <dns/name.h>
    1043                 :            : #include <dns/rdata.h>
    1044                 :            : #include <util/buffer.h>
    1045                 :            : 
    1046                 :            : namespace isc {
    1047                 :            : namespace util {
    1048                 :            : 
    1049                 :            : class InputBuffer;
    1050                 :            : class OutputBuffer;
    1051                 :            : }
    1052                 :            : 
    1053                 :            : namespace dns {
    1054                 :            : 
    1055                 :            : // BEGIN_COMMON_DECLARATIONS
    1056                 :            : 
    1057                 :            : class AbstractMessageRenderer;
    1058                 :            : 
    1059                 :            : // END_COMMON_DECLARATIONS
    1060                 :            : 
    1061                 :            : namespace rdata {
    1062                 :            : namespace generic {
    1063                 :            : 
    1064                 :            : /// \brief \c NAPTR class represents the NAPTR rdata defined in
    1065                 :            : /// RFC2915, RFC2168 and RFC3403
    1066                 :            : ///
    1067                 :            : /// This class implements the basic interfaces inherited from the
    1068                 :            : /// \c rdata::Rdata class, and provides accessors specific to the
    1069                 :            : /// NAPTR rdata.
    1070                 :         78 : class NAPTR : public Rdata {
    1071                 :            : public:
    1072                 :            :     // BEGIN_COMMON_MEMBERS
    1073                 :            : 
    1074                 :            :     explicit NAPTR(const std::string& type_str);
    1075                 :            :     NAPTR(isc::util::InputBuffer& buffer, size_t rdata_len);
    1076                 :            :     NAPTR(const NAPTR& other);
    1077                 :            :     virtual std::string toText() const;
    1078                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1079                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1080                 :            :     virtual int compare(const Rdata& other) const;
    1081                 :            : 
    1082                 :            :     // END_COMMON_MEMBERS
    1083                 :            : 
    1084                 :            :     // NAPTR specific methods
    1085                 :            :     uint16_t getOrder() const;
    1086                 :            :     uint16_t getPreference() const;
    1087                 :            :     const std::string& getFlags() const;
    1088                 :            :     const std::string& getServices() const;
    1089                 :            :     const std::string& getRegexp() const;
    1090                 :            :     const Name& getReplacement() const;
    1091                 :            : private:
    1092                 :            :     /// Helper template function for toWire()
    1093                 :            :     ///
    1094                 :            :     /// \param outputer Where to write data in
    1095                 :            :     template <typename T>
    1096                 :            :     void toWireHelper(T& outputer) const {
    1097                 :          1 :         outputer.writeUint16(order_);
    1098                 :          1 :         outputer.writeUint16(preference_);
    1099                 :            : 
    1100                 :          1 :         outputer.writeUint8(flags_.size());
    1101                 :          1 :         outputer.writeData(flags_.c_str(), flags_.size());
    1102                 :            : 
    1103                 :          1 :         outputer.writeUint8(services_.size());
    1104                 :          1 :         outputer.writeData(services_.c_str(), services_.size());
    1105                 :            : 
    1106                 :          1 :         outputer.writeUint8(regexp_.size());
    1107                 :          1 :         outputer.writeData(regexp_.c_str(), regexp_.size());
    1108                 :            : 
    1109                 :          2 :         replacement_.toWire(outputer);
    1110                 :            :     }
    1111                 :            : 
    1112                 :            :     uint16_t order_;
    1113                 :            :     uint16_t preference_;
    1114                 :            :     std::string flags_;
    1115                 :            :     std::string services_;
    1116                 :            :     std::string regexp_;
    1117                 :            :     Name replacement_;
    1118                 :            : };
    1119                 :            : 
    1120                 :            : } // end of namespace "generic"
    1121                 :            : } // end of namespace "rdata"
    1122                 :            : } // end of namespace "dns"
    1123                 :            : } // end of namespace "isc"
    1124                 :            : #endif // __GENERIC_NAPTR_35_H
    1125                 :            : 
    1126                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1127                 :            : //
    1128                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1129                 :            : // purpose with or without fee is hereby granted, provided that the above
    1130                 :            : // copyright notice and this permission notice appear in all copies.
    1131                 :            : //
    1132                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1133                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1134                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1135                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1136                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1137                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1138                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1139                 :            : 
    1140                 :            : #ifndef __GENERIC_NS_2_H
    1141                 :            : #define __GENERIC_NS_2_H 1
    1142                 :            : 
    1143                 :            : #include <string>
    1144                 :            : 
    1145                 :            : #include <dns/name.h>
    1146                 :            : #include <dns/rdata.h>
    1147                 :            : 
    1148                 :            : namespace isc {
    1149                 :            : namespace util {
    1150                 :            : 
    1151                 :            : class InputBuffer;
    1152                 :            : class OutputBuffer;
    1153                 :            : }
    1154                 :            : 
    1155                 :            : namespace dns {
    1156                 :            : 
    1157                 :            : // BEGIN_COMMON_DECLARATIONS
    1158                 :            : 
    1159                 :            : class AbstractMessageRenderer;
    1160                 :            : 
    1161                 :            : // END_COMMON_DECLARATIONS
    1162                 :            : 
    1163                 :            : namespace rdata {
    1164                 :            : namespace generic {
    1165                 :            : 
    1166                 :      16599 : class NS : public Rdata {
    1167                 :            : public:
    1168                 :            :     // BEGIN_COMMON_MEMBERS
    1169                 :            : 
    1170                 :            :     explicit NS(const std::string& type_str);
    1171                 :            :     NS(isc::util::InputBuffer& buffer, size_t rdata_len);
    1172                 :            :     NS(const NS& other);
    1173                 :            :     virtual std::string toText() const;
    1174                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1175                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1176                 :            :     virtual int compare(const Rdata& other) const;
    1177                 :            : 
    1178                 :            :     // END_COMMON_MEMBERS
    1179                 :            :     ///
    1180                 :            :     /// Specialized constructor
    1181                 :            :     ///
    1182 [ -  + ][ +  + ]:        407 :     explicit NS(const Name& nsname) : nsname_(nsname) {}
                 [ -  + ]
    1183                 :            :     ///
    1184                 :            :     /// Specialized methods
    1185                 :            :     ///
    1186                 :            :     const Name& getNSName() const;
    1187                 :            : private:
    1188                 :            :     Name nsname_;
    1189                 :            : };
    1190                 :            : 
    1191                 :            : } // end of namespace "generic"
    1192                 :            : } // end of namespace "rdata"
    1193                 :            : } // end of namespace "dns"
    1194                 :            : } // end of namespace "isc"
    1195                 :            : #endif // __GENERIC_NS_2_H
    1196                 :            : 
    1197                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1198                 :            : //
    1199                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1200                 :            : // purpose with or without fee is hereby granted, provided that the above
    1201                 :            : // copyright notice and this permission notice appear in all copies.
    1202                 :            : //
    1203                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1204                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1205                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1206                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1207                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1208                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1209                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1210                 :            : 
    1211                 :            : #include <stdint.h>
    1212                 :            : 
    1213                 :            : #include <string>
    1214                 :            : #include <vector>
    1215                 :            : 
    1216                 :            : #include <dns/name.h>
    1217                 :            : #include <dns/rrtype.h>
    1218                 :            : #include <dns/rrttl.h>
    1219                 :            : #include <dns/rdata.h>
    1220                 :            : 
    1221                 :            : #ifndef __GENERIC_NSEC3_50_H
    1222                 :            : #define __GENERIC_NSEC3_50_H 1
    1223                 :            : 
    1224                 :            : namespace isc {
    1225                 :            : namespace util {
    1226                 :            : 
    1227                 :            : class InputBuffer;
    1228                 :            : class OutputBuffer;
    1229                 :            : }
    1230                 :            : 
    1231                 :            : namespace dns {
    1232                 :            : 
    1233                 :            : // BEGIN_COMMON_DECLARATIONS
    1234                 :            : 
    1235                 :            : class AbstractMessageRenderer;
    1236                 :            : 
    1237                 :            : // END_COMMON_DECLARATIONS
    1238                 :            : 
    1239                 :            : namespace rdata {
    1240                 :            : namespace generic {
    1241                 :            : 
    1242                 :            : struct NSEC3Impl;
    1243                 :            : 
    1244                 :            : class NSEC3 : public Rdata {
    1245                 :            : public:
    1246                 :            :     // BEGIN_COMMON_MEMBERS
    1247                 :            : 
    1248                 :            :     explicit NSEC3(const std::string& type_str);
    1249                 :            :     NSEC3(isc::util::InputBuffer& buffer, size_t rdata_len);
    1250                 :            :     NSEC3(const NSEC3& other);
    1251                 :            :     virtual std::string toText() const;
    1252                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1253                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1254                 :            :     virtual int compare(const Rdata& other) const;
    1255                 :            : 
    1256                 :            :     // END_COMMON_MEMBERS
    1257                 :            :     NSEC3& operator=(const NSEC3& source);
    1258                 :            :     ~NSEC3();
    1259                 :            : 
    1260                 :            :     uint8_t getHashalg() const;
    1261                 :            :     uint8_t getFlags() const;
    1262                 :            :     uint16_t getIterations() const;
    1263                 :            :     const std::vector<uint8_t>& getSalt() const;
    1264                 :            :     const std::vector<uint8_t>& getNext() const;
    1265                 :            : 
    1266                 :            : private:
    1267                 :            :     NSEC3Impl* impl_;
    1268                 :            : };
    1269                 :            : 
    1270                 :            : } // end of namespace "generic"
    1271                 :            : } // end of namespace "rdata"
    1272                 :            : } // end of namespace "dns"
    1273                 :            : } // end of namespace "isc"
    1274                 :            : #endif // __GENERIC_NSEC3_50_H
    1275                 :            : 
    1276                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1277                 :            : //
    1278                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1279                 :            : // purpose with or without fee is hereby granted, provided that the above
    1280                 :            : // copyright notice and this permission notice appear in all copies.
    1281                 :            : //
    1282                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1283                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1284                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1285                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1286                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1287                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1288                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1289                 :            : 
    1290                 :            : #include <stdint.h>
    1291                 :            : 
    1292                 :            : #include <string>
    1293                 :            : #include <vector>
    1294                 :            : 
    1295                 :            : #include <dns/name.h>
    1296                 :            : #include <dns/rrtype.h>
    1297                 :            : #include <dns/rrttl.h>
    1298                 :            : #include <dns/rdata.h>
    1299                 :            : 
    1300                 :            : #ifndef __GENERIC_NSEC3PARAM_51_H
    1301                 :            : #define __GENERIC_NSEC3PARAM_51_H 1
    1302                 :            : 
    1303                 :            : namespace isc {
    1304                 :            : namespace util {
    1305                 :            : 
    1306                 :            : class InputBuffer;
    1307                 :            : class OutputBuffer;
    1308                 :            : }
    1309                 :            : 
    1310                 :            : namespace dns {
    1311                 :            : 
    1312                 :            : // BEGIN_COMMON_DECLARATIONS
    1313                 :            : 
    1314                 :            : class AbstractMessageRenderer;
    1315                 :            : 
    1316                 :            : // END_COMMON_DECLARATIONS
    1317                 :            : 
    1318                 :            : namespace rdata {
    1319                 :            : namespace generic {
    1320                 :            : 
    1321                 :            : struct NSEC3PARAMImpl;
    1322                 :            : 
    1323                 :            : class NSEC3PARAM : public Rdata {
    1324                 :            : public:
    1325                 :            :     // BEGIN_COMMON_MEMBERS
    1326                 :            : 
    1327                 :            :     explicit NSEC3PARAM(const std::string& type_str);
    1328                 :            :     NSEC3PARAM(isc::util::InputBuffer& buffer, size_t rdata_len);
    1329                 :            :     NSEC3PARAM(const NSEC3PARAM& other);
    1330                 :            :     virtual std::string toText() const;
    1331                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1332                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1333                 :            :     virtual int compare(const Rdata& other) const;
    1334                 :            : 
    1335                 :            :     // END_COMMON_MEMBERS
    1336                 :            :     NSEC3PARAM& operator=(const NSEC3PARAM& source);
    1337                 :            :     ~NSEC3PARAM();
    1338                 :            : 
    1339                 :            :     ///
    1340                 :            :     /// Specialized methods
    1341                 :            :     ///
    1342                 :            :     uint8_t getHashalg() const;
    1343                 :            :     uint8_t getFlags() const;
    1344                 :            :     uint16_t getIterations() const;
    1345                 :            :     const std::vector<uint8_t>& getSalt() const;
    1346                 :            : private:
    1347                 :            :     NSEC3PARAMImpl* impl_;
    1348                 :            : };
    1349                 :            : 
    1350                 :            : } // end of namespace "generic"
    1351                 :            : } // end of namespace "rdata"
    1352                 :            : } // end of namespace "dns"
    1353                 :            : } // end of namespace "isc"
    1354                 :            : #endif // __GENERIC_NSEC3PARAM_51_H
    1355                 :            : 
    1356                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1357                 :            : //
    1358                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1359                 :            : // purpose with or without fee is hereby granted, provided that the above
    1360                 :            : // copyright notice and this permission notice appear in all copies.
    1361                 :            : //
    1362                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1363                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1364                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1365                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1366                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1367                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1368                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1369                 :            : 
    1370                 :            : #include <stdint.h>
    1371                 :            : 
    1372                 :            : #include <string>
    1373                 :            : 
    1374                 :            : #include <dns/name.h>
    1375                 :            : #include <dns/rrtype.h>
    1376                 :            : #include <dns/rrttl.h>
    1377                 :            : #include <dns/rdata.h>
    1378                 :            : 
    1379                 :            : #ifndef __GENERIC_NSEC_47_H
    1380                 :            : #define __GENERIC_NSEC_47_H 1
    1381                 :            : 
    1382                 :            : namespace isc {
    1383                 :            : namespace util {
    1384                 :            : 
    1385                 :            : class InputBuffer;
    1386                 :            : class OutputBuffer;
    1387                 :            : }
    1388                 :            : 
    1389                 :            : namespace dns {
    1390                 :            : 
    1391                 :            : // BEGIN_COMMON_DECLARATIONS
    1392                 :            : 
    1393                 :            : class AbstractMessageRenderer;
    1394                 :            : 
    1395                 :            : // END_COMMON_DECLARATIONS
    1396                 :            : 
    1397                 :            : namespace rdata {
    1398                 :            : namespace generic {
    1399                 :            : 
    1400                 :            : struct NSECImpl;
    1401                 :            : 
    1402                 :            : class NSEC : public Rdata {
    1403                 :            : public:
    1404                 :            :     // BEGIN_COMMON_MEMBERS
    1405                 :            : 
    1406                 :            :     explicit NSEC(const std::string& type_str);
    1407                 :            :     NSEC(isc::util::InputBuffer& buffer, size_t rdata_len);
    1408                 :            :     NSEC(const NSEC& other);
    1409                 :            :     virtual std::string toText() const;
    1410                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1411                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1412                 :            :     virtual int compare(const Rdata& other) const;
    1413                 :            : 
    1414                 :            :     // END_COMMON_MEMBERS
    1415                 :            :     NSEC& operator=(const NSEC& source);
    1416                 :            :     ~NSEC();
    1417                 :            : 
    1418                 :            :     // specialized methods
    1419                 :            : 
    1420                 :            :     /// Return the next domain name.
    1421                 :            :     ///
    1422                 :            :     /// \exception std::bad_alloc Resource allocation failure in name copy.
    1423                 :            :     ///
    1424                 :            :     /// \return The next domain name field in the form of \c Name object.
    1425                 :            :     const Name& getNextName() const;
    1426                 :            : 
    1427                 :            : private:
    1428                 :            :     NSECImpl* impl_;
    1429                 :            : };
    1430                 :            : 
    1431                 :            : } // end of namespace "generic"
    1432                 :            : } // end of namespace "rdata"
    1433                 :            : } // end of namespace "dns"
    1434                 :            : } // end of namespace "isc"
    1435                 :            : #endif // __GENERIC_NSEC_47_H
    1436                 :            : 
    1437                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1438                 :            : //
    1439                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1440                 :            : // purpose with or without fee is hereby granted, provided that the above
    1441                 :            : // copyright notice and this permission notice appear in all copies.
    1442                 :            : //
    1443                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1444                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1445                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1446                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1447                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1448                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1449                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1450                 :            : 
    1451                 :            : #ifndef __GENERIC_OPT_41_H
    1452                 :            : #define __GENERIC_OPT_41_H 1
    1453                 :            : 
    1454                 :            : #include <string>
    1455                 :            : 
    1456                 :            : #include <dns/rdata.h>
    1457                 :            : 
    1458                 :            : namespace isc {
    1459                 :            : namespace util {
    1460                 :            : 
    1461                 :            : class InputBuffer;
    1462                 :            : class OutputBuffer;
    1463                 :            : }
    1464                 :            : 
    1465                 :            : namespace dns {
    1466                 :            : 
    1467                 :            : // BEGIN_COMMON_DECLARATIONS
    1468                 :            : 
    1469                 :            : class AbstractMessageRenderer;
    1470                 :            : 
    1471                 :            : // END_COMMON_DECLARATIONS
    1472                 :            : 
    1473                 :            : namespace rdata {
    1474                 :            : namespace generic {
    1475                 :            : 
    1476                 :        206 : class OPT : public Rdata {
    1477                 :            : public:
    1478                 :            :     // BEGIN_COMMON_MEMBERS
    1479                 :            : 
    1480                 :            :     explicit OPT(const std::string& type_str);
    1481                 :            :     OPT(isc::util::InputBuffer& buffer, size_t rdata_len);
    1482                 :            :     OPT(const OPT& other);
    1483                 :            :     virtual std::string toText() const;
    1484                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1485                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1486                 :            :     virtual int compare(const Rdata& other) const;
    1487                 :            : 
    1488                 :            :     // END_COMMON_MEMBERS
    1489                 :            : 
    1490                 :            :     // The default constructor makes sense for OPT as it can be empty.
    1491                 :        308 :     OPT() {}
    1492                 :            : private:
    1493                 :            :     // RR-type specific members are here.
    1494                 :            : };
    1495                 :            : 
    1496                 :            : } // end of namespace "generic"
    1497                 :            : } // end of namespace "rdata"
    1498                 :            : } // end of namespace "dns"
    1499                 :            : } // end of namespace "isc"
    1500                 :            : #endif // __GENERIC_OPT_41_H
    1501                 :            : 
    1502                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1503                 :            : //
    1504                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1505                 :            : // purpose with or without fee is hereby granted, provided that the above
    1506                 :            : // copyright notice and this permission notice appear in all copies.
    1507                 :            : //
    1508                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1509                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1510                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1511                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1512                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1513                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1514                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1515                 :            : 
    1516                 :            : #ifndef __GENERIC_PTR_12_H
    1517                 :            : #define __GENERIC_PTR_12_H 1
    1518                 :            : 
    1519                 :            : #include <string>
    1520                 :            : 
    1521                 :            : #include <dns/name.h>
    1522                 :            : #include <dns/rdata.h>
    1523                 :            : 
    1524                 :            : namespace isc {
    1525                 :            : namespace util {
    1526                 :            : 
    1527                 :            : class InputBuffer;
    1528                 :            : class OutputBuffer;
    1529                 :            : }
    1530                 :            : 
    1531                 :            : namespace dns {
    1532                 :            : 
    1533                 :            : // BEGIN_COMMON_DECLARATIONS
    1534                 :            : 
    1535                 :            : class AbstractMessageRenderer;
    1536                 :            : 
    1537                 :            : // END_COMMON_DECLARATIONS
    1538                 :            : 
    1539                 :            : namespace rdata {
    1540                 :            : namespace generic {
    1541                 :            : 
    1542                 :         34 : class PTR : public Rdata {
    1543                 :            : public:
    1544                 :            :     // BEGIN_COMMON_MEMBERS
    1545                 :            : 
    1546                 :            :     explicit PTR(const std::string& type_str);
    1547                 :            :     PTR(isc::util::InputBuffer& buffer, size_t rdata_len);
    1548                 :            :     PTR(const PTR& other);
    1549                 :            :     virtual std::string toText() const;
    1550                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1551                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1552                 :            :     virtual int compare(const Rdata& other) const;
    1553                 :            : 
    1554                 :            :     // END_COMMON_MEMBERS
    1555                 :            : 
    1556                 :            :     ///
    1557                 :            :     /// Specialized constructor
    1558                 :            :     ///
    1559                 :            :     explicit PTR(const Name& ptr_name) : ptr_name_(ptr_name) {}
    1560                 :            :     ///
    1561                 :            :     /// Specialized methods
    1562                 :            :     ///
    1563                 :            :     const Name& getPTRName() const;
    1564                 :            : private:
    1565                 :            :     Name ptr_name_;
    1566                 :            : };
    1567                 :            : 
    1568                 :            : } // end of namespace "generic"
    1569                 :            : } // end of namespace "rdata"
    1570                 :            : } // end of namespace "dns"
    1571                 :            : } // end of namespace "isc"
    1572                 :            : #endif // __GENERIC_PTR_12_H
    1573                 :            : 
    1574                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
    1575                 :            : //
    1576                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1577                 :            : // purpose with or without fee is hereby granted, provided that the above
    1578                 :            : // copyright notice and this permission notice appear in all copies.
    1579                 :            : //
    1580                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1581                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1582                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1583                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1584                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1585                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1586                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1587                 :            : 
    1588                 :            : #ifndef __GENERIC_RP_17_H
    1589                 :            : #define __GENERIC_RP_17_H 1
    1590                 :            : 
    1591                 :            : #include <string>
    1592                 :            : 
    1593                 :            : #include <dns/name.h>
    1594                 :            : #include <dns/rdata.h>
    1595                 :            : 
    1596                 :            : namespace isc {
    1597                 :            : namespace util {
    1598                 :            : 
    1599                 :            : class InputBuffer;
    1600                 :            : class OutputBuffer;
    1601                 :            : }
    1602                 :            : 
    1603                 :            : namespace dns {
    1604                 :            : 
    1605                 :            : // BEGIN_COMMON_DECLARATIONS
    1606                 :            : 
    1607                 :            : class AbstractMessageRenderer;
    1608                 :            : 
    1609                 :            : // END_COMMON_DECLARATIONS
    1610                 :            : 
    1611                 :            : namespace rdata {
    1612                 :            : namespace generic {
    1613                 :            : 
    1614                 :            : /// \brief \c rdata::generic::RP class represents the RP RDATA as defined in
    1615                 :            : /// RFC1183.
    1616                 :            : ///
    1617                 :            : /// This class implements the basic interfaces inherited from the abstract
    1618                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
    1619                 :            : /// RP RDATA.
    1620                 :         40 : class RP : public Rdata {
    1621                 :            : public:
    1622                 :            :     // BEGIN_COMMON_MEMBERS
    1623                 :            : 
    1624                 :            :     explicit RP(const std::string& type_str);
    1625                 :            :     RP(isc::util::InputBuffer& buffer, size_t rdata_len);
    1626                 :            :     RP(const RP& other);
    1627                 :            :     virtual std::string toText() const;
    1628                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1629                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1630                 :            :     virtual int compare(const Rdata& other) const;
    1631                 :            : 
    1632                 :            :     // END_COMMON_MEMBERS
    1633                 :            : 
    1634                 :            :     /// We use the default copy constructor and assignment operator.
    1635                 :            : 
    1636                 :            :     /// \brief Constructor from RDATA field parameters.
    1637                 :            :     ///
    1638                 :            :     /// The parameters are a straightforward mapping of %RP RDATA
    1639                 :            :     /// fields as defined in RFC1183.
    1640                 :          3 :     RP(const Name& mailbox, const Name& text) :
    1641 [ +  - ][ +  - ]:          3 :         mailbox_(mailbox), text_(text)
    1642                 :          3 :     {}
    1643                 :            : 
    1644                 :            :     /// \brief Return the value of the mailbox field.
    1645                 :            :     ///
    1646                 :            :     /// This method normally does not throw an exception, but if resource
    1647                 :            :     /// allocation for the returned \c Name object fails, a corresponding
    1648                 :            :     /// standard exception will be thrown.
    1649                 :            :     ///
    1650                 :            :     /// \note
    1651                 :            :     /// Unlike the case of some other RDATA classes (such as
    1652                 :            :     /// \c NS::getNSName()), this method constructs a new \c Name object
    1653                 :            :     /// and returns it, instead of returning a reference to a \c Name object
    1654                 :            :     /// internally maintained in the class (which is a private member).
    1655                 :            :     /// This is based on the observation that this method will be rarely used
    1656                 :            :     /// and even when it's used it will not be in a performance context
    1657                 :            :     /// (for example, a recursive resolver won't need this field in its
    1658                 :            :     /// resolution process).  By returning a new object we have flexibility of
    1659                 :            :     /// changing the internal representation without the risk of changing
    1660                 :            :     /// the interface or method property.
    1661                 :            :     /// The same note applies to the \c getText() method.
    1662 [ +  - ][ +  - ]:          4 :     Name getMailbox() const { return (mailbox_); }
                 [ +  - ]
    1663                 :            : 
    1664                 :            :     /// \brief Return the value of the text field.
    1665                 :            :     ///
    1666                 :            :     /// This method normally does not throw an exception, but if resource
    1667                 :            :     /// allocation for the returned \c Name object fails, a corresponding
    1668                 :            :     /// standard exception will be thrown.
    1669 [ +  - ][ +  - ]:          4 :     Name getText() const { return (text_); }
                 [ +  - ]
    1670                 :            : 
    1671                 :            : private:
    1672                 :            :     Name mailbox_;
    1673                 :            :     Name text_;
    1674                 :            : };
    1675                 :            : 
    1676                 :            : } // end of namespace "generic"
    1677                 :            : } // end of namespace "rdata"
    1678                 :            : } // end of namespace "dns"
    1679                 :            : } // end of namespace "isc"
    1680                 :            : #endif // __GENERIC_RP_17_H
    1681                 :            : 
    1682                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1683                 :            : //
    1684                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1685                 :            : // purpose with or without fee is hereby granted, provided that the above
    1686                 :            : // copyright notice and this permission notice appear in all copies.
    1687                 :            : //
    1688                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1689                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1690                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1691                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1692                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1693                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1694                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1695                 :            : 
    1696                 :            : #include <stdint.h>
    1697                 :            : 
    1698                 :            : #include <string>
    1699                 :            : 
    1700                 :            : #include <dns/name.h>
    1701                 :            : #include <dns/rrtype.h>
    1702                 :            : #include <dns/rrttl.h>
    1703                 :            : #include <dns/rdata.h>
    1704                 :            : 
    1705                 :            : #ifndef __GENERIC_RRSIG_46_H
    1706                 :            : #define __GENERIC_RRSIG_46_H 1
    1707                 :            : 
    1708                 :            : namespace isc {
    1709                 :            : namespace util {
    1710                 :            : 
    1711                 :            : class InputBuffer;
    1712                 :            : class OutputBuffer;
    1713                 :            : }
    1714                 :            : 
    1715                 :            : namespace dns {
    1716                 :            : 
    1717                 :            : // BEGIN_COMMON_DECLARATIONS
    1718                 :            : 
    1719                 :            : class AbstractMessageRenderer;
    1720                 :            : 
    1721                 :            : // END_COMMON_DECLARATIONS
    1722                 :            : 
    1723                 :            : namespace rdata {
    1724                 :            : namespace generic {
    1725                 :            : 
    1726                 :            : struct RRSIGImpl;
    1727                 :            : 
    1728                 :            : class RRSIG : public Rdata {
    1729                 :            : public:
    1730                 :            :     // BEGIN_COMMON_MEMBERS
    1731                 :            : 
    1732                 :            :     explicit RRSIG(const std::string& type_str);
    1733                 :            :     RRSIG(isc::util::InputBuffer& buffer, size_t rdata_len);
    1734                 :            :     RRSIG(const RRSIG& other);
    1735                 :            :     virtual std::string toText() const;
    1736                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1737                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1738                 :            :     virtual int compare(const Rdata& other) const;
    1739                 :            : 
    1740                 :            :     // END_COMMON_MEMBERS
    1741                 :            :     RRSIG& operator=(const RRSIG& source);
    1742                 :            :     ~RRSIG();
    1743                 :            : 
    1744                 :            :     // specialized methods
    1745                 :            :     const RRType& typeCovered() const;
    1746                 :            : private:
    1747                 :            :     RRSIGImpl* impl_;
    1748                 :            : };
    1749                 :            : 
    1750                 :            : } // end of namespace "generic"
    1751                 :            : } // end of namespace "rdata"
    1752                 :            : } // end of namespace "dns"
    1753                 :            : } // end of namespace "isc"
    1754                 :            : #endif // __GENERIC_RRSIG_46_H
    1755                 :            : 
    1756                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1757                 :            : //
    1758                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1759                 :            : // purpose with or without fee is hereby granted, provided that the above
    1760                 :            : // copyright notice and this permission notice appear in all copies.
    1761                 :            : //
    1762                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1763                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1764                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1765                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1766                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1767                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1768                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1769                 :            : 
    1770                 :            : #ifndef __GENERIC_SOA_6_H
    1771                 :            : #define __GENERIC_SOA_6_H 1
    1772                 :            : 
    1773                 :            : #include <string>
    1774                 :            : 
    1775                 :            : #include <dns/name.h>
    1776                 :            : #include <dns/rdata.h>
    1777                 :            : #include <dns/serial.h>
    1778                 :            : 
    1779                 :            : namespace isc {
    1780                 :            : namespace util {
    1781                 :            : 
    1782                 :            : class InputBuffer;
    1783                 :            : class OutputBuffer;
    1784                 :            : }
    1785                 :            : 
    1786                 :            : namespace dns {
    1787                 :            : 
    1788                 :            : // BEGIN_COMMON_DECLARATIONS
    1789                 :            : 
    1790                 :            : class AbstractMessageRenderer;
    1791                 :            : 
    1792                 :            : // END_COMMON_DECLARATIONS
    1793                 :            : 
    1794                 :            : namespace rdata {
    1795                 :            : namespace generic {
    1796                 :            : 
    1797                 :      15965 : class SOA : public Rdata {
    1798                 :            : public:
    1799                 :            :     // BEGIN_COMMON_MEMBERS
    1800                 :            : 
    1801                 :            :     explicit SOA(const std::string& type_str);
    1802                 :            :     SOA(isc::util::InputBuffer& buffer, size_t rdata_len);
    1803                 :            :     SOA(const SOA& other);
    1804                 :            :     virtual std::string toText() const;
    1805                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1806                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1807                 :            :     virtual int compare(const Rdata& other) const;
    1808                 :            : 
    1809                 :            :     // END_COMMON_MEMBERS
    1810                 :            : 
    1811                 :            :     SOA(const Name& mname, const Name& rname, uint32_t serial,
    1812                 :            :         uint32_t refresh, uint32_t retry, uint32_t expire,
    1813                 :            :         uint32_t minimum);
    1814                 :            :     /// \brief Returns the serial stored in the SOA.
    1815                 :            :     Serial getSerial() const;
    1816                 :            : private:
    1817                 :            :     /// Note: this is a prototype version; we may reconsider
    1818                 :            :     /// this representation later.
    1819                 :            :     Name mname_;
    1820                 :            :     Name rname_;
    1821                 :            :     /// serial, refresh, retry, expire, minimum, stored in network byte order
    1822                 :            :     uint8_t numdata_[20];
    1823                 :            : };
    1824                 :            : 
    1825                 :            : } // end of namespace "generic"
    1826                 :            : } // end of namespace "rdata"
    1827                 :            : } // end of namespace "dns"
    1828                 :            : } // end of namespace "isc"
    1829                 :            : #endif // __GENERIC_SOA_6_H
    1830                 :            : 
    1831                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    1832                 :            : //
    1833                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1834                 :            : // purpose with or without fee is hereby granted, provided that the above
    1835                 :            : // copyright notice and this permission notice appear in all copies.
    1836                 :            : //
    1837                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1838                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1839                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1840                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1841                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1842                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1843                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1844                 :            : 
    1845                 :            : #ifndef __GENERIC_SPF_99_H
    1846                 :            : #define __GENERIC_SPF_99_H 1
    1847                 :            : 
    1848                 :            : #include <stdint.h>
    1849                 :            : 
    1850                 :            : #include <string>
    1851                 :            : #include <vector>
    1852                 :            : 
    1853                 :            : #include <dns/rdata.h>
    1854                 :            : 
    1855                 :            : namespace isc {
    1856                 :            : namespace util {
    1857                 :            : 
    1858                 :            : class InputBuffer;
    1859                 :            : class OutputBuffer;
    1860                 :            : }
    1861                 :            : 
    1862                 :            : namespace dns {
    1863                 :            : 
    1864                 :            : // BEGIN_COMMON_DECLARATIONS
    1865                 :            : 
    1866                 :            : class AbstractMessageRenderer;
    1867                 :            : 
    1868                 :            : // END_COMMON_DECLARATIONS
    1869                 :            : 
    1870                 :            : namespace rdata {
    1871                 :            : namespace generic {
    1872                 :            : 
    1873                 :            : template<class Type, uint16_t typeCode> class TXTLikeImpl;
    1874                 :            : 
    1875                 :            : /// \brief \c rdata::SPF class represents the SPF RDATA as defined %in
    1876                 :            : /// RFC4408.
    1877                 :            : ///
    1878                 :            : /// This class implements the basic interfaces inherited from the abstract
    1879                 :            : /// \c rdata::Rdata class. The semantics of the class is provided by
    1880                 :            : /// a copy of instantiated TXTLikeImpl class common to both TXT and SPF.
    1881                 :            : class SPF : public Rdata {
    1882                 :            : public:
    1883                 :            :     // BEGIN_COMMON_MEMBERS
    1884                 :            : 
    1885                 :            :     explicit SPF(const std::string& type_str);
    1886                 :            :     SPF(isc::util::InputBuffer& buffer, size_t rdata_len);
    1887                 :            :     SPF(const SPF& other);
    1888                 :            :     virtual std::string toText() const;
    1889                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1890                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1891                 :            :     virtual int compare(const Rdata& other) const;
    1892                 :            : 
    1893                 :            :     // END_COMMON_MEMBERS
    1894                 :            : 
    1895                 :            :     /// \brief Assignment operator.
    1896                 :            :     ///
    1897                 :            :     /// It internally allocates a resource, and if it fails a corresponding
    1898                 :            :     /// standard exception will be thrown.
    1899                 :            :     /// This operator never throws an exception otherwise.
    1900                 :            :     ///
    1901                 :            :     /// This operator provides the strong exception guarantee: When an
    1902                 :            :     /// exception is thrown the content of the assignment target will be
    1903                 :            :     /// intact.
    1904                 :            :     SPF& operator=(const SPF& source);
    1905                 :            : 
    1906                 :            :     /// \brief The destructor.
    1907                 :            :     ~SPF();
    1908                 :            : 
    1909                 :            :     ///
    1910                 :            :     /// Specialized methods
    1911                 :            :     ///
    1912                 :            : 
    1913                 :            :     /// \brief Return a reference to the data strings
    1914                 :            :     ///
    1915                 :            :     /// This method never throws an exception.
    1916                 :            :     const std::vector<std::vector<uint8_t> >& getString() const;
    1917                 :            : 
    1918                 :            : private:
    1919                 :            :     typedef TXTLikeImpl<SPF, 99> SPFImpl;
    1920                 :            :     SPFImpl* impl_;
    1921                 :            : };
    1922                 :            : 
    1923                 :            : } // end of namespace "generic"
    1924                 :            : } // end of namespace "rdata"
    1925                 :            : } // end of namespace "dns"
    1926                 :            : } // end of namespace "isc"
    1927                 :            : #endif // __GENERIC_SPF_99_H
    1928                 :            : 
    1929                 :            : // Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
    1930                 :            : //
    1931                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    1932                 :            : // purpose with or without fee is hereby granted, provided that the above
    1933                 :            : // copyright notice and this permission notice appear in all copies.
    1934                 :            : //
    1935                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    1936                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    1937                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    1938                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    1939                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    1940                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1941                 :            : // PERFORMANCE OF THIS SOFTWARE.
    1942                 :            : 
    1943                 :            : #ifndef __GENERIC_SSHFP_44_H
    1944                 :            : #define __GENERIC_SSHFP_44_H 1
    1945                 :            : 
    1946                 :            : #include <stdint.h>
    1947                 :            : 
    1948                 :            : #include <string>
    1949                 :            : 
    1950                 :            : #include <dns/name.h>
    1951                 :            : #include <dns/rdata.h>
    1952                 :            : 
    1953                 :            : namespace isc {
    1954                 :            : namespace util {
    1955                 :            : 
    1956                 :            : class InputBuffer;
    1957                 :            : class OutputBuffer;
    1958                 :            : }
    1959                 :            : 
    1960                 :            : namespace dns {
    1961                 :            : 
    1962                 :            : // BEGIN_COMMON_DECLARATIONS
    1963                 :            : 
    1964                 :            : class AbstractMessageRenderer;
    1965                 :            : 
    1966                 :            : // END_COMMON_DECLARATIONS
    1967                 :            : 
    1968                 :            : namespace rdata {
    1969                 :            : namespace generic {
    1970                 :            : 
    1971                 :          9 : class SSHFP : public Rdata {
    1972                 :            : public:
    1973                 :            :     // BEGIN_COMMON_MEMBERS
    1974                 :            : 
    1975                 :            :     explicit SSHFP(const std::string& type_str);
    1976                 :            :     SSHFP(isc::util::InputBuffer& buffer, size_t rdata_len);
    1977                 :            :     SSHFP(const SSHFP& other);
    1978                 :            :     virtual std::string toText() const;
    1979                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    1980                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    1981                 :            :     virtual int compare(const Rdata& other) const;
    1982                 :            : 
    1983                 :            :     // END_COMMON_MEMBERS
    1984                 :            : 
    1985                 :            :     SSHFP(uint8_t algorithm, uint8_t fingerprint_type, const std::string& fingerprint);
    1986                 :            : 
    1987                 :            :     ///
    1988                 :            :     /// Specialized methods
    1989                 :            :     ///
    1990                 :            :     uint8_t getSSHFPAlgorithmNumber() const;
    1991                 :            :     uint8_t getSSHFPFingerprintType() const;
    1992                 :            : 
    1993                 :            : private:
    1994                 :            :     /// Note: this is a prototype version; we may reconsider
    1995                 :            :     /// this representation later.
    1996                 :            :     uint8_t algorithm_;
    1997                 :            :     uint8_t fingerprint_type_;
    1998                 :            :     std::vector<uint8_t> fingerprint_;
    1999                 :            : };
    2000                 :            : 
    2001                 :            : } // end of namespace "generic"
    2002                 :            : } // end of namespace "rdata"
    2003                 :            : } // end of namespace "dns"
    2004                 :            : } // end of namespace "isc"
    2005                 :            : #endif // __GENERIC_SSHFP_44_H
    2006                 :            : 
    2007                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    2008                 :            : //
    2009                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    2010                 :            : // purpose with or without fee is hereby granted, provided that the above
    2011                 :            : // copyright notice and this permission notice appear in all copies.
    2012                 :            : //
    2013                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    2014                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    2015                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    2016                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    2017                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    2018                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    2019                 :            : // PERFORMANCE OF THIS SOFTWARE.
    2020                 :            : 
    2021                 :            : #ifndef __GENERIC_TXT_16_H
    2022                 :            : #define __GENERIC_TXT_16_H 1
    2023                 :            : 
    2024                 :            : #include <stdint.h>
    2025                 :            : 
    2026                 :            : #include <string>
    2027                 :            : #include <vector>
    2028                 :            : 
    2029                 :            : #include <dns/rdata.h>
    2030                 :            : 
    2031                 :            : namespace isc {
    2032                 :            : namespace util {
    2033                 :            : 
    2034                 :            : class InputBuffer;
    2035                 :            : class OutputBuffer;
    2036                 :            : }
    2037                 :            : 
    2038                 :            : namespace dns {
    2039                 :            : 
    2040                 :            : // BEGIN_COMMON_DECLARATIONS
    2041                 :            : 
    2042                 :            : class AbstractMessageRenderer;
    2043                 :            : 
    2044                 :            : // END_COMMON_DECLARATIONS
    2045                 :            : 
    2046                 :            : namespace rdata {
    2047                 :            : namespace generic {
    2048                 :            : 
    2049                 :            : template<class Type, uint16_t typeCode> class TXTLikeImpl;
    2050                 :            : 
    2051                 :            : class TXT : public Rdata {
    2052                 :            : public:
    2053                 :            :     // BEGIN_COMMON_MEMBERS
    2054                 :            : 
    2055                 :            :     explicit TXT(const std::string& type_str);
    2056                 :            :     TXT(isc::util::InputBuffer& buffer, size_t rdata_len);
    2057                 :            :     TXT(const TXT& other);
    2058                 :            :     virtual std::string toText() const;
    2059                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    2060                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    2061                 :            :     virtual int compare(const Rdata& other) const;
    2062                 :            : 
    2063                 :            :     // END_COMMON_MEMBERS
    2064                 :            : 
    2065                 :            :     TXT& operator=(const TXT& source);
    2066                 :            :     ~TXT();
    2067                 :            : 
    2068                 :            : private:
    2069                 :            :     typedef TXTLikeImpl<TXT, 16> TXTImpl;
    2070                 :            :     TXTImpl* impl_;
    2071                 :            : };
    2072                 :            : 
    2073                 :            : } // end of namespace "generic"
    2074                 :            : } // end of namespace "rdata"
    2075                 :            : } // end of namespace "dns"
    2076                 :            : } // end of namespace "isc"
    2077                 :            : #endif // __GENERIC_TXT_16_H
    2078                 :            : 
    2079                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    2080                 :            : //
    2081                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    2082                 :            : // purpose with or without fee is hereby granted, provided that the above
    2083                 :            : // copyright notice and this permission notice appear in all copies.
    2084                 :            : //
    2085                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    2086                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    2087                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    2088                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    2089                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    2090                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    2091                 :            : // PERFORMANCE OF THIS SOFTWARE.
    2092                 :            : 
    2093                 :            : #ifndef __HS_A_1_H
    2094                 :            : #define __HS_A_1_H 1
    2095                 :            : 
    2096                 :            : #include <string>
    2097                 :            : 
    2098                 :            : #include <dns/rdata.h>
    2099                 :            : 
    2100                 :            : namespace isc {
    2101                 :            : namespace util {
    2102                 :            : 
    2103                 :            : class InputBuffer;
    2104                 :            : class OutputBuffer;
    2105                 :            : }
    2106                 :            : 
    2107                 :            : namespace dns {
    2108                 :            : 
    2109                 :            : // BEGIN_COMMON_DECLARATIONS
    2110                 :            : 
    2111                 :            : class AbstractMessageRenderer;
    2112                 :            : 
    2113                 :            : // END_COMMON_DECLARATIONS
    2114                 :            : 
    2115                 :            : namespace rdata {
    2116                 :            : namespace hs {
    2117                 :            : 
    2118                 :          0 : class A : public Rdata {
    2119                 :            : public:
    2120                 :            :     // BEGIN_COMMON_MEMBERS
    2121                 :            : 
    2122                 :            :     explicit A(const std::string& type_str);
    2123                 :            :     A(isc::util::InputBuffer& buffer, size_t rdata_len);
    2124                 :            :     A(const A& other);
    2125                 :            :     virtual std::string toText() const;
    2126                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    2127                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    2128                 :            :     virtual int compare(const Rdata& other) const;
    2129                 :            : 
    2130                 :            :     // END_COMMON_MEMBERS
    2131                 :            : };
    2132                 :            : 
    2133                 :            : } // end of namespace "hs"
    2134                 :            : } // end of namespace "rdata"
    2135                 :            : } // end of namespace "dns"
    2136                 :            : } // end of namespace "isc"
    2137                 :            : #endif // __HS_A_1_H
    2138                 :            : 
    2139                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    2140                 :            : //
    2141                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    2142                 :            : // purpose with or without fee is hereby granted, provided that the above
    2143                 :            : // copyright notice and this permission notice appear in all copies.
    2144                 :            : //
    2145                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    2146                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    2147                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    2148                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    2149                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    2150                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    2151                 :            : // PERFORMANCE OF THIS SOFTWARE.
    2152                 :            : 
    2153                 :            : #ifndef __IN_A_1_H
    2154                 :            : #define __IN_A_1_H 1
    2155                 :            : 
    2156                 :            : #include <string>
    2157                 :            : 
    2158                 :            : #include <dns/rdata.h>
    2159                 :            : 
    2160                 :            : namespace isc {
    2161                 :            : namespace util {
    2162                 :            : 
    2163                 :            : class InputBuffer;
    2164                 :            : class OutputBuffer;
    2165                 :            : }
    2166                 :            : 
    2167                 :            : namespace dns {
    2168                 :            : 
    2169                 :            : // BEGIN_COMMON_DECLARATIONS
    2170                 :            : 
    2171                 :            : class AbstractMessageRenderer;
    2172                 :            : 
    2173                 :            : // END_COMMON_DECLARATIONS
    2174                 :            : 
    2175                 :            : namespace rdata {
    2176                 :            : namespace in {
    2177                 :            : 
    2178                 :       5541 : class A : public Rdata {
    2179                 :            : public:
    2180                 :            :     // BEGIN_COMMON_MEMBERS
    2181                 :            : 
    2182                 :            :     explicit A(const std::string& type_str);
    2183                 :            :     A(isc::util::InputBuffer& buffer, size_t rdata_len);
    2184                 :            :     A(const A& other);
    2185                 :            :     virtual std::string toText() const;
    2186                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    2187                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    2188                 :            :     virtual int compare(const Rdata& other) const;
    2189                 :            : 
    2190                 :            :     // END_COMMON_MEMBERS
    2191                 :            : 
    2192                 :            :     //We can use the default destructor.
    2193                 :            :     //virtual ~A() {}
    2194                 :            :     // notyet:
    2195                 :            :     //const struct in_addr& getAddress() const { return (addr_); }
    2196                 :            : private:
    2197                 :            :     uint32_t addr_;             // raw IPv4 address (network byte order)
    2198                 :            : };
    2199                 :            : } // end of namespace "in"
    2200                 :            : } // end of namespace "rdata"
    2201                 :            : } // end of namespace "dns"
    2202                 :            : } // end of namespace "isc"
    2203                 :            : #endif // __IN_A_1_H
    2204                 :            : 
    2205                 :            : // Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
    2206                 :            : //
    2207                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    2208                 :            : // purpose with or without fee is hereby granted, provided that the above
    2209                 :            : // copyright notice and this permission notice appear in all copies.
    2210                 :            : //
    2211                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    2212                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    2213                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    2214                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    2215                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    2216                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    2217                 :            : // PERFORMANCE OF THIS SOFTWARE.
    2218                 :            : 
    2219                 :            : #ifndef __IN_AAAA_28_H
    2220                 :            : #define __IN_AAAA_28_H 1
    2221                 :            : 
    2222                 :            : #include <stdint.h>
    2223                 :            : 
    2224                 :            : #include <string>
    2225                 :            : 
    2226                 :            : #include <dns/rdata.h>
    2227                 :            : 
    2228                 :            : namespace isc {
    2229                 :            : namespace util {
    2230                 :            : 
    2231                 :            : class InputBuffer;
    2232                 :            : class OutputBuffer;
    2233                 :            : }
    2234                 :            : 
    2235                 :            : namespace dns {
    2236                 :            : 
    2237                 :            : // BEGIN_COMMON_DECLARATIONS
    2238                 :            : 
    2239                 :            : class AbstractMessageRenderer;
    2240                 :            : 
    2241                 :            : // END_COMMON_DECLARATIONS
    2242                 :            : 
    2243                 :            : namespace rdata {
    2244                 :            : namespace in {
    2245                 :            : 
    2246                 :       1306 : class AAAA : public Rdata {
    2247                 :            : public:
    2248                 :            :     // BEGIN_COMMON_MEMBERS
    2249                 :            : 
    2250                 :            :     explicit AAAA(const std::string& type_str);
    2251                 :            :     AAAA(isc::util::InputBuffer& buffer, size_t rdata_len);
    2252                 :            :     AAAA(const AAAA& other);
    2253                 :            :     virtual std::string toText() const;
    2254                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    2255                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    2256                 :            :     virtual int compare(const Rdata& other) const;
    2257                 :            : 
    2258                 :            :     // END_COMMON_MEMBERS
    2259                 :            :     // notyet:
    2260                 :            :     //const struct in6_addr& getAddress() const { return (addr_); }
    2261                 :            : private:
    2262                 :            :     uint8_t addr_[16];        // raw IPv6 address (network byte order)
    2263                 :            : };
    2264                 :            : 
    2265                 :            : } // end of namespace "in"
    2266                 :            : } // end of namespace "rdata"
    2267                 :            : } // end of namespace "dns"
    2268                 :            : } // end of namespace "isc"
    2269                 :            : #endif // __IN_AAAA_28_H
    2270                 :            : 
    2271                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
    2272                 :            : //
    2273                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    2274                 :            : // purpose with or without fee is hereby granted, provided that the above
    2275                 :            : // copyright notice and this permission notice appear in all copies.
    2276                 :            : //
    2277                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    2278                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    2279                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    2280                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    2281                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    2282                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    2283                 :            : // PERFORMANCE OF THIS SOFTWARE.
    2284                 :            : 
    2285                 :            : #ifndef __IN_DHCID_49_H
    2286                 :            : #define __IN_DHCID_49_H 1
    2287                 :            : 
    2288                 :            : #include <string>
    2289                 :            : #include <vector>
    2290                 :            : 
    2291                 :            : #include <dns/rdata.h>
    2292                 :            : 
    2293                 :            : namespace isc {
    2294                 :            : namespace util {
    2295                 :            : 
    2296                 :            : class InputBuffer;
    2297                 :            : class OutputBuffer;
    2298                 :            : }
    2299                 :            : 
    2300                 :            : namespace dns {
    2301                 :            : 
    2302                 :            : // BEGIN_COMMON_DECLARATIONS
    2303                 :            : 
    2304                 :            : class AbstractMessageRenderer;
    2305                 :            : 
    2306                 :            : // END_COMMON_DECLARATIONS
    2307                 :            : 
    2308                 :            : namespace rdata {
    2309                 :            : namespace in {
    2310                 :            : 
    2311                 :            : /// \brief \c rdata::DHCID class represents the DHCID RDATA as defined %in
    2312                 :            : /// RFC4701.
    2313                 :            : ///
    2314                 :            : /// This class implements the basic interfaces inherited from the abstract
    2315                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
    2316                 :            : /// DHCID RDATA.
    2317                 :         15 : class DHCID : public Rdata {
    2318                 :            : public:
    2319                 :            :     // BEGIN_COMMON_MEMBERS
    2320                 :            : 
    2321                 :            :     explicit DHCID(const std::string& type_str);
    2322                 :            :     DHCID(isc::util::InputBuffer& buffer, size_t rdata_len);
    2323                 :            :     DHCID(const DHCID& other);
    2324                 :            :     virtual std::string toText() const;
    2325                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    2326                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    2327                 :            :     virtual int compare(const Rdata& other) const;
    2328                 :            : 
    2329                 :            :     // END_COMMON_MEMBERS
    2330                 :            : 
    2331                 :            :     /// \brief Return the digest.
    2332                 :            :     ///
    2333                 :            :     /// This method never throws an exception.
    2334                 :            :     const std::vector<uint8_t>& getDigest() const;
    2335                 :            : 
    2336                 :            : private:
    2337                 :            :     /// \brief Private data representation
    2338                 :            :     ///
    2339                 :            :     /// Opaque data at least 3 octets long as per RFC4701.
    2340                 :            :     ///
    2341                 :            :     std::vector<uint8_t> digest_;
    2342                 :            : };
    2343                 :            : } // end of namespace "in"
    2344                 :            : } // end of namespace "rdata"
    2345                 :            : } // end of namespace "dns"
    2346                 :            : } // end of namespace "isc"
    2347                 :            : #endif // __IN_DHCID_49_H
    2348                 :            : 
    2349                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
    2350                 :            : //
    2351                 :            : // Permission to use, copy, modify, and/or distribute this software for any
    2352                 :            : // purpose with or without fee is hereby granted, provided that the above
    2353                 :            : // copyright notice and this permission notice appear in all copies.
    2354                 :            : //
    2355                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
    2356                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    2357                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
    2358                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    2359                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
    2360                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    2361                 :            : // PERFORMANCE OF THIS SOFTWARE.
    2362                 :            : 
    2363                 :            : #ifndef __IN_SRV_33_H
    2364                 :            : #define __IN_SRV_33_H 1
    2365                 :            : 
    2366                 :            : #include <stdint.h>
    2367                 :            : 
    2368                 :            : #include <dns/name.h>
    2369                 :            : #include <dns/rdata.h>
    2370                 :            : 
    2371                 :            : namespace isc {
    2372                 :            : namespace util {
    2373                 :            : 
    2374                 :            : class InputBuffer;
    2375                 :            : class OutputBuffer;
    2376                 :            : }
    2377                 :            : 
    2378                 :            : namespace dns {
    2379                 :            : 
    2380                 :            : // BEGIN_COMMON_DECLARATIONS
    2381                 :            : 
    2382                 :            : class AbstractMessageRenderer;
    2383                 :            : 
    2384                 :            : // END_COMMON_DECLARATIONS
    2385                 :            : 
    2386                 :            : namespace rdata {
    2387                 :            : namespace in {
    2388                 :            : 
    2389                 :            : struct SRVImpl;
    2390                 :            : 
    2391                 :            : /// \brief \c rdata::SRV class represents the SRV RDATA as defined %in
    2392                 :            : /// RFC2782.
    2393                 :            : ///
    2394                 :            : /// This class implements the basic interfaces inherited from the abstract
    2395                 :            : /// \c rdata::Rdata class, and provides trivial accessors specific to the
    2396                 :            : /// SRV RDATA.
    2397                 :            : class SRV : public Rdata {
    2398                 :            : public:
    2399                 :            :     // BEGIN_COMMON_MEMBERS
    2400                 :            : 
    2401                 :            :     explicit SRV(const std::string& type_str);
    2402                 :            :     SRV(isc::util::InputBuffer& buffer, size_t rdata_len);
    2403                 :            :     SRV(const SRV& other);
    2404                 :            :     virtual std::string toText() const;
    2405                 :            :     virtual void toWire(isc::util::OutputBuffer& buffer) const;
    2406                 :            :     virtual void toWire(AbstractMessageRenderer& renderer) const;
    2407                 :            :     virtual int compare(const Rdata& other) const;
    2408                 :            : 
    2409                 :            :     // END_COMMON_MEMBERS
    2410                 :            : 
    2411                 :            :     /// \brief Assignment operator.
    2412                 :            :     ///
    2413                 :            :     /// It internally allocates a resource, and if it fails a corresponding
    2414                 :            :     /// standard exception will be thrown.
    2415                 :            :     /// This operator never throws an exception otherwise.
    2416                 :            :     ///
    2417                 :            :     /// This operator provides the strong exception guarantee: When an
    2418                 :            :     /// exception is thrown the content of the assignment target will be
    2419                 :            :     /// intact.
    2420                 :            :     SRV& operator=(const SRV& source);
    2421                 :            : 
    2422                 :            :     /// \brief The destructor.
    2423                 :            :     ~SRV();
    2424                 :            : 
    2425                 :            :     ///
    2426                 :            :     /// Specialized methods
    2427                 :            :     ///
    2428                 :            : 
    2429                 :            :     /// \brief Return the value of the priority field.
    2430                 :            :     ///
    2431                 :            :     /// This method never throws an exception.
    2432                 :            :     uint16_t getPriority() const;
    2433                 :            : 
    2434                 :            :     /// \brief Return the value of the weight field.
    2435                 :            :     ///
    2436                 :            :     /// This method never throws an exception.
    2437                 :            :     uint16_t getWeight() const;
    2438                 :            : 
    2439                 :            :     /// \brief Return the value of the port field.
    2440                 :            :     ///
    2441                 :            :     /// This method never throws an exception.
    2442                 :            :     uint16_t getPort() const;
    2443                 :            : 
    2444                 :            :     /// \brief Return the value of the target field.
    2445                 :            :     ///
    2446                 :            :     /// \return A reference to a \c Name class object corresponding to the
    2447                 :            :     /// internal target name.
    2448                 :            :     ///
    2449                 :            :     /// This method never throws an exception.
    2450                 :            :     const Name& getTarget() const;
    2451                 :            : 
    2452                 :            : private:
    2453                 :            :     SRVImpl* impl_;
    2454                 :            : };
    2455                 :            : 
    2456                 :            : } // end of namespace "in"
    2457                 :            : } // end of namespace "rdata"
    2458                 :            : } // end of namespace "dns"
    2459                 :            : } // end of namespace "isc"
    2460                 :            : #endif // __IN_SRV_33_H
    2461                 :            : 
    2462                 :            : 
    2463                 :            : // Local Variables:
    2464                 :            : // mode: c++
    2465                 :            : // End:

Generated by: LCOV version 1.9