|
@@ -596,9 +596,41 @@ public:
|
|
|
/// \brief Parse the header section of the \c Message.
|
|
|
void parseHeader(isc::util::InputBuffer& buffer);
|
|
|
|
|
|
- /// \brief Parse the \c Message.
|
|
|
- ///
|
|
|
- /// \param buffer
|
|
|
+ /// \brief (Re)build a \c Message object from wire-format data.
|
|
|
+ ///
|
|
|
+ /// This method parses the given wire format data to build a
|
|
|
+ /// complete Message object. On success, the values of the header section
|
|
|
+ /// fields can be accessible via corresponding get methods, and the
|
|
|
+ /// question and following sections can be accessible via the
|
|
|
+ /// corresponding iterators. If the message contains an EDNS or TSIG,
|
|
|
+ /// they can be accessible via \c getEDNS() and \c getTSIGRecord(),
|
|
|
+ /// respectively.
|
|
|
+ ///
|
|
|
+ /// This \c Message must be in the \c PARSE mode.
|
|
|
+ ///
|
|
|
+ /// This method performs strict validation on the given message based
|
|
|
+ /// on the DNS protocol specifications. If the given message data is
|
|
|
+ /// invalid, this method throws an exception (see the exception list).
|
|
|
+ ///
|
|
|
+ /// By default, this method combines RRs of the same name, RR type and
|
|
|
+ /// RR class in a section into a single RRset, even if they are interleaved
|
|
|
+ /// with a different type of RR (though it would be a rare case in
|
|
|
+ /// practice). If the \c PRESERVE_ORDER option is specified, it handles
|
|
|
+ /// each RR separately, in the appearing order, and converts it to a
|
|
|
+ /// separate RRset (so this RRset should contain exactly one Rdata).
|
|
|
+ /// This mode will be necessary when the higher level protocol is
|
|
|
+ /// ordering conscious. For example, in AXFR and IXFR, the position of
|
|
|
+ /// the SOA RRs are crucial.
|
|
|
+ ///
|
|
|
+ /// \exception InvalidMessageOperation \c Message is in the RENDER mode
|
|
|
+ /// \exception DNSMessageFORMERR The given message data is syntactically
|
|
|
+ /// \exception MessageTooShort The given data is shorter than a valid
|
|
|
+ /// header section
|
|
|
+ /// \exception std::bad_alloc Memory allocation failure
|
|
|
+ /// \exception Others \c Name, \c Rdata, and \c EDNS classes can also throw
|
|
|
+ ///
|
|
|
+ /// \param buffer A input buffer object that stores the wire data
|
|
|
+ /// \param options Parse options
|
|
|
void fromWire(isc::util::InputBuffer& buffer, ParseOptions options
|
|
|
= PARSE_DEFAULT);
|
|
|
|