E-MailRelay

Public Types | Public Member Functions | Friends | List of all members
GNet::DnsMessageRR Class Reference

Represents DNS response record. More...

`#include <gdnsmessage.h>`

Inheritance diagram for GNet::DnsMessageRR:
[legend]
Collaboration diagram for GNet::DnsMessageRR:
[legend]

## Public Types
using | RR = DnsMessageRR

## Public Member Functions
| DnsMessageRR (const DnsMessage &, unsigned int offset)
| Constructor from DnsMessage data. More...
bool | isa (std::string_view) const noexcept
| Returns true if the type() has the given name(). More...
unsigned int | type () const
| Returns the RR TYPE value(). More...
unsigned int | class_ () const
| Returns the RR CLASS value(). More...
unsigned int | size () const
| Returns the size of the RR. More...
std::string | name () const
| Returns the RR NAME. More...
Address | address (unsigned int port=0U) const
| Returns the Address if isa(A) or isa(AAAA). More...
Address | address (unsigned int port, std::nothrow_t) const
| Returns the Address if isa(A) or isa(AAAA). More...
const DnsMessageRRData & | rdata () const
| Provides access to the message RDATA. More...
| DnsMessageRR (const DnsMessageRR &)=default
| DnsMessageRR (DnsMessageRR &&)=default
DnsMessageRR & | operator= (const DnsMessageRR &)=delete
DnsMessageRR & | operator= (DnsMessageRR &&)=delete

## Friends
class | GNet::DnsMessageRRData

## Detailed Description

Represents DNS response record.

Definition at line 240 of file gdnsmessage.h.

## Member Typedef Documentation

## ◆ RR

using GNet::DnsMessageRR::RR = DnsMessageRR

Definition at line 243 of file gdnsmessage.h.

## Constructor & Destructor Documentation

## ◆ DnsMessageRR()

GNet::DnsMessageRR::DnsMessageRR | ( | const DnsMessage & | msg,
|  | unsigned int | offset
| ) |  |

Constructor from DnsMessage data.

Keeps the DnsMessage reference, which is then passed to copies.

Definition at line 401 of file gdnsmessage.cpp.

## Member Function Documentation

## ◆ address() [1/2]

GNet::Address GNet::DnsMessageRR::address | ( | unsigned int | port,
|  | std::nothrow_t |
| ) |  | const

Returns the Address if isa(A) or isa(AAAA).

Returns Address::defaultAddress() (with a zero port number) if not valid.

Definition at line 499 of file gdnsmessage.cpp.

## ◆ address() [2/2]

GNet::Address GNet::DnsMessageRR::address | ( | unsigned int | port = `0U` | ) | const

Returns the Address if isa(A) or isa(AAAA).

Throws if not A or AAAA.

Definition at line 505 of file gdnsmessage.cpp.

## ◆ class_()

unsigned int GNet::DnsMessageRR::class_ | ( |  | ) | const

Returns the RR CLASS value().

Definition at line 428 of file gdnsmessage.cpp.

## ◆ isa()

bool GNet::DnsMessageRR::isa | ( | std::string_view | type_name | ) | const
| noexcept

Returns true if the type() has the given name().

Definition at line 434 of file gdnsmessage.cpp.

## ◆ name()

std::string GNet::DnsMessageRR::name | ( |  | ) | const

Returns the RR NAME.

Definition at line 445 of file gdnsmessage.cpp.

## ◆ rdata()

const GNet::DnsMessageRRData & GNet::DnsMessageRR::rdata | ( |  | ) | const
| inline

Provides access to the message RDATA.

Definition at line 382 of file gdnsmessage.h.

## ◆ size()

unsigned int GNet::DnsMessageRR::size | ( |  | ) | const

Returns the size of the RR.

Definition at line 439 of file gdnsmessage.cpp.

## ◆ type()

unsigned int GNet::DnsMessageRR::type | ( |  | ) | const

Returns the RR TYPE value().

Definition at line 421 of file gdnsmessage.cpp.

## Friends And Related Function Documentation

## ◆ GNet::DnsMessageRRData

friend class GNet::DnsMessageRRData
| friend

Definition at line 286 of file gdnsmessage.h.

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

- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/gnet/gdnsmessage.h
- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/gnet/gdnsmessage.cpp