Kea: d2_zone.cc Source File

| Kea 3.2.0-git

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:219
isc::dns::RRClass
The RRClass class encapsulates DNS resource record classes.
Definition rrclass.h:89
d2_zone.h
isc::asiolink::operator<<
std::ostream & operator<<(std::ostream &os, const IOAddress &address)
Insert the IOAddress as a string into stream.
Definition io_address.cc:131
isc::d2
Definition check_exists_add.cc:19
isc::dns::name
Definition name.cc:69
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18