Kea: isc::d2::D2Zone Class Reference

| Kea 3.2.0-git

isc::d2::D2Zone Class Reference

The `D2Zone` encapsulates the Zone section in DNS Update message. More...

`#include <d2_zone.h>`

## Public Member Functions
| D2Zone (const dns::Name &name, const dns::RRClass &rrclass)
| Constructor from Name and RRClass.
Getters
const dns::Name & | getName () const
| Returns the Zone name.
const dns::RRClass & | getClass () const
| Returns the Zone class.
std::string | toText () const
| Returns text representation of the Zone.

## Comparison Operators
bool | operator== (const D2Zone &rhs) const
| Equality operator to compare `D2Zone` objects in query and response messages.
bool | operator!= (const D2Zone &rhs) const
| Inequality operator to compare `D2Zone` objects in query and response messages.

## Detailed Description

The `D2Zone` encapsulates the Zone section in DNS Update message.

This class is used by the `D2UpdateMessage` to encapsulate the Zone section of the DNS Update message. Class members hold corresponding values of section's fields: NAME, CLASS. This class does not hold the RTYPE field value because RTYPE is always equal to SOA for DNS Update message (see RFC 2136, section 2.3).

Note, that this `D2Zone` class neither exposes functions to decode messages from wire format nor to encode to wire format. This is not needed, because `isc::d2::D2UpdateMessage` class uses `D2Zone` only to return the parsed Zone information to the caller. Internally, D2UpdateMessage parses and stores Zone section using `isc::dns::Question` class, and the `toWire` and `fromWire` functions of the `isc::dns::Question` class are used.

Definition at line 32 of file d2_zone.h.

## Constructor & Destructor Documentation

## ◆ D2Zone()

isc::d2::D2Zone::D2Zone | ( | const dns::Name & | name,
|  | const dns::RRClass & | rrclass )

Constructor from Name and RRClass.

Parameters

  name | The name of the Zone.
  rrclass | The RR class of the Zone.

Definition at line 14 of file d2_zone.cc.

Referenced by operator!=(), and operator==().

## Member Function Documentation

## ◆ getClass()

const dns::RRClass & isc::d2::D2Zone::getClass | ( |  | ) | const
| inline

Returns the Zone class.

Returns
  A reference to the Zone class.

Definition at line 52 of file d2_zone.h.

## ◆ getName()

const dns::Name & isc::d2::D2Zone::getName | ( |  | ) | const
| inline

Returns the Zone name.

Returns
  A reference to the Zone name.

Definition at line 47 of file d2_zone.h.

## ◆ operator!=()

bool isc::d2::D2Zone::operator!= | ( | const D2Zone & | rhs | ) | const
| inline

Inequality operator to compare `D2Zone` objects in query and response messages.

Parameters

  rhs | Zone to compare against.

Returns
  true if any of name or class are unequal, false otherwise.

Definition at line 83 of file d2_zone.h.

References D2Zone().

Here is the call graph for this function:

## ◆ operator==()

bool isc::d2::D2Zone::operator== | ( | const D2Zone & | rhs | ) | const
| inline

Equality operator to compare `D2Zone` objects in query and response messages.

Parameters

  rhs | Zone to compare against.

Returns
  true if name and class are equal, false otherwise.

Definition at line 73 of file d2_zone.h.

References D2Zone().

Here is the call graph for this function:

## ◆ toText()

std::string isc::d2::D2Zone::toText | ( |  | ) | const

Returns text representation of the Zone.

This function concatenates the name of the Zone, Class and Type. The type is always SOA.

Returns
  A text representation of the Zone.

Definition at line 18 of file d2_zone.cc.

Referenced by isc::d2::operator<<().

The documentation for this class was generated from the following files:

- d2_zone.h
- d2_zone.cc