diff options
author | Mukund Sivaraman <muks@isc.org> | 2014-01-29 11:48:29 +0100 |
---|---|---|
committer | Mukund Sivaraman <muks@isc.org> | 2014-01-29 11:48:29 +0100 |
commit | 2002e7a128f2b4d84d0f67a45e8e0fec2bf541c3 (patch) | |
tree | 58e9801ea20849b87a98d45bf56917677e6103b8 /src/lib/dns/rrset.h | |
parent | [master] Add ChangeLog entry for #3239 (diff) | |
parent | [1396] Use RRset::getLength() in xfrout (diff) | |
download | kea-2002e7a128f2b4d84d0f67a45e8e0fec2bf541c3.tar.xz kea-2002e7a128f2b4d84d0f67a45e8e0fec2bf541c3.zip |
Merge branch 'trac1396'
Diffstat (limited to 'src/lib/dns/rrset.h')
-rw-r--r-- | src/lib/dns/rrset.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/dns/rrset.h b/src/lib/dns/rrset.h index e2301d641b..42b890d778 100644 --- a/src/lib/dns/rrset.h +++ b/src/lib/dns/rrset.h @@ -206,6 +206,20 @@ public: /// \return The number of \c Rdata objects contained. virtual unsigned int getRdataCount() const = 0; + /// \brief Get the wire format length of the \c AbstractRRset. + /// + /// This method returns the wire format length of the + /// \c AbstractRRset, which is calculated by summing the individual + /// lengths of the various fields that make up each RR. + /// + /// NOTE: When including name lengths, the allocation for + /// uncompressed name wire format representation is used. + /// + /// \return The length of the wire format representation of the + /// \c AbstractRRset. + /// \throw \c EmptyRRset if the \c AbstractRRset is empty. + virtual uint16_t getLength() const = 0; + /// \brief Returns the owner name of the \c RRset. /// /// \return A reference to a \c Name class object corresponding to the @@ -649,6 +663,13 @@ public: /// \return The number of \c Rdata objects contained. virtual unsigned int getRdataCount() const; + /// \brief Get the wire format length of the \c BasicRRset. + /// + /// \return The length of the wire format representation of the + /// \c BasicRRset. + /// \throw \c EmptyRRset if the \c BasicRRset is empty. + virtual uint16_t getLength() const; + /// \brief Returns the owner name of the \c RRset. /// /// This method never throws an exception. @@ -820,6 +841,13 @@ public: virtual ~RRset(); + /// \brief Get the wire format length of the \c RRset. + /// + /// \return The length of the wire format representation of the + /// \c RRset. + /// \throw \c EmptyRRset if the \c RRset is empty. + virtual uint16_t getLength() const; + /// \brief Render the RRset in the wire format with name compression and /// truncation handling. /// |