Kea: d2_zone.cc Source File

| Kea 2.2.0

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
11namespace isc {
12namespace d2 {
13
14D2Zone::D2Zone(const dns::Name& name, const dns::RRClass& rrclass)
15 : name_(name), rrclass_(rrclass) {
16}
17
18std::string D2Zone::toText() const {
19 return (name_.toText() + " " + rrclass_.toText() + " SOA\n");
20}
21
22std::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
isc::d2::D2Zone
The D2Zone encapsulates the Zone section in DNS Update message.
Definition: d2_zone.h:32
isc::d2::D2Zone::toText
std::string toText() const
Returns text representation of the Zone.
Definition: d2_zone.cc:18
isc::d2::D2Zone::D2Zone
D2Zone(const dns::Name &name, const dns::RRClass &rrclass)
Constructor from Name and RRClass.
Definition: d2_zone.cc:14
isc::dns::Name
The Name class encapsulates DNS names.
Definition: name.h:223
isc::dns::Name::toText
std::string toText(bool omit_final_dot=false) const
Convert the Name to a string.
Definition: name.cc:507
isc::dns::RRClass
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:98
isc::dns::RRClass::toText
const std::string toText() const
Convert the RRClass to a string.
Definition: rrclass.cc:44
d2_zone.h
rrclass_
const RRClass & rrclass_
Definition: dns/message.cc:695
name_
const Name & name_
Definition: dns/message.cc:693
isc::d2::operator<<
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
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143