Kea  2.5.2
d2_zone.cc
Go to the documentation of this file.
1 // Copyright (C) 2013-2021 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #include <config.h>
8 
9 #include <d2srv/d2_zone.h>
10 
11 namespace isc {
12 namespace d2 {
13 
14 D2Zone::D2Zone(const dns::Name& name, const dns::RRClass& rrclass)
15  : name_(name), rrclass_(rrclass) {
16 }
17 
18 std::string D2Zone::toText() const {
19  return (name_.toText() + " " + rrclass_.toText() + " SOA\n");
20 }
21 
22 std::ostream&
23 operator<<(std::ostream& os, const D2Zone& zone) {
24  os << zone.toText();
25  return (os);
26 }
27 
28 } // namespace d2
29 } // namespace isc
30 
The D2Zone encapsulates the Zone section in DNS Update message.
Definition: d2_zone.h:32
std::string toText() const
Returns text representation of the Zone.
Definition: d2_zone.cc:18
D2Zone(const dns::Name &name, const dns::RRClass &rrclass)
Constructor from Name and RRClass.
Definition: d2_zone.cc:14
The Name class encapsulates DNS names.
Definition: name.h:223
std::string toText(bool omit_final_dot=false) const
Convert the Name to a string.
Definition: name.cc:507
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:98
const std::string toText() const
Convert the RRClass to a string.
Definition: rrclass.cc:44
const RRClass & rrclass_
Definition: dns/message.cc:705
const Name & name_
Definition: dns/message.cc:701
std::ostream & operator<<(std::ostream &os, const D2Params &config)
Dumps the contents of a D2Params as text to an output stream.
Definition: d2_config.cc:120
Defines the logger used by the top-level component of kea-lfc.