Kea 2.5.8
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&
23operator<<(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:219
std::string toText(bool omit_final_dot=false) const
Convert the Name to a string.
Definition: name.cc:503
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:89
const std::string toText() const
Convert the RRClass to a string.
Definition: rrclass.cc:43
const RRClass & rrclass_
Definition: dns/message.cc:700
const Name & name_
Definition: dns/message.cc:696
Defines the logger used by the top-level component of kea-lfc.