Async 1.8.0
|
A class for representing a CNAME DNS resource record. More...
#include <AsyncDnsResourceRecord.h>
Public Types | |
using | CName = std::string |
![]() | |
using | List |
The type for a list of resource records. | |
![]() | |
enum class | Type { ANY , A , PTR , CNAME , SRV , A , PTR , CNAME , SRV } |
The record type. More... | |
enum class | Class { IN , IN } |
The record class. More... | |
enum class | Type { ANY , A , PTR , CNAME , SRV , A , PTR , CNAME , SRV } |
enum class | Class { IN , IN } |
using | Name = std::string |
using | Ttl = uint32_t |
using | List = std::vector<std::unique_ptr<DnsResourceRecord>> |
The type for a list of resource records. | |
Public Member Functions | |
DnsResourceRecordCNAME (const Name &name, Ttl ttl, const CName &cname="") | |
Constructor. | |
virtual bool | operator== (const DnsResourceRecordCNAME &other) const |
Equality comparison operator. | |
virtual std::string | toString (void) const |
The string representation of this record. | |
void | setName (const CName &cname) |
Set the FQDN for this record. | |
const CName & | cname (void) const |
The FQDN for this record. | |
DnsResourceRecordCNAME (const std::string &name, uint32_t ttl, const std::string &cname="") | |
~DnsResourceRecordCNAME (void) | |
virtual const Type | type (void) const |
The type of record. | |
virtual std::string | toString (void) const |
The string representation of this record. | |
void | setName (const std::string &cname) |
const std::string & | cname (void) const |
![]() | |
DnsResourceRecordCRTP (const Name &name, Ttl ttl) | |
Constructor. | |
virtual DnsResourceRecord * | clone (void) const |
Clone this class. | |
virtual bool | operator== (const DnsResourceRecord &other) const |
Equality comparison operator. | |
![]() | |
DnsResourceRecord (const Name &name, Ttl ttl) | |
Constructor. | |
virtual | ~DnsResourceRecord (void) |
Destructor. | |
Class | classId (void) const |
The DNS class for the record. | |
const char * | classStr (void) const |
The DNS class for the record as a string. | |
const std::string & | typeStr (void) const |
The type of record as a string. | |
void | setName (const Name &name) |
Set the name for this record. | |
const Name & | name (void) const |
The name of this record. | |
void | setTtl (Ttl ttl) |
Set the TTL for this record. | |
Ttl | ttl (void) const |
The TTL for this record. | |
DnsResourceRecord (const std::string &name, uint32_t ttl) | |
Default constructor. | |
DnsResourceRecord (const DnsResourceRecord &)=delete | |
Disallow copy construction. | |
DnsResourceRecord & | operator= (const DnsResourceRecord &)=delete |
Disallow copy assignment. | |
virtual | ~DnsResourceRecord (void) |
Destructor. | |
Class | classId (void) const |
A_brief_member_function_description. | |
const char * | classStr (void) const |
const std::string & | typeStr (void) const |
void | setName (const std::string &name) |
const std::string & | name (void) const |
void | setTtl (uint32_t ttl) |
uint32_t | ttl (void) const |
Static Public Member Functions | |
static const Type | staticType (void) |
The type for this specific class. | |
static const Type | staticType (void) |
![]() | |
static const Type | staticType (void) |
The type for this specific class. | |
static const std::string & | typeToString (Type type) |
The type for this specific class represented as a string. | |
static const std::string & | typeToString (Type type) |
Additional Inherited Members | |
![]() | |
static constexpr Ttl | MAX_TTL = 0x7fffffff |
The maximum allowed value for a TTL. | |
A class for representing a CNAME DNS resource record.
This class represents a CNAME DNS resource record. One or more resource records is the result of performing a DNS query. This specific resource record maps a hostname to other hostnames.
Definition at line 249 of file AsyncResourceRecord.h.
using Async::DnsResourceRecordCNAME::CName = std::string |
Definition at line 487 of file AsyncDnsResourceRecord.h.
|
inline |
Constructor.
name | The name of this record |
ttl | The time-to-live, in seconds, for this record |
cname | The FQDN associaated with this record name |
Definition at line 500 of file AsyncDnsResourceRecord.h.
|
inline |
Definition at line 254 of file AsyncResourceRecord.h.
|
inline |
Definition at line 257 of file AsyncResourceRecord.h.
|
inline |
The FQDN for this record.
Definition at line 538 of file AsyncDnsResourceRecord.h.
Referenced by operator==(), setName(), setName(), and toString().
|
inline |
Definition at line 268 of file AsyncResourceRecord.h.
|
inlinevirtual |
Equality comparison operator.
other | The other resource record to comapare to |
NOTE: The TTL is not used in the comparison.
Implements Async::DnsResourceRecordCRTP< DnsResourceRecordCNAME >.
Definition at line 511 of file AsyncDnsResourceRecord.h.
References cname(), and Async::DnsResourceRecord::operator==().
|
inline |
Set the FQDN for this record.
cname | The new FQDN for this record |
Definition at line 532 of file AsyncDnsResourceRecord.h.
References cname().
|
inline |
Definition at line 267 of file AsyncResourceRecord.h.
References cname().
|
inlinestatic |
The type for this specific class.
Definition at line 492 of file AsyncDnsResourceRecord.h.
References Async::DnsResourceRecord::CNAME.
Referenced by type().
|
inlinestatic |
Definition at line 252 of file AsyncResourceRecord.h.
References Async::DnsResourceRecord::CNAME.
|
inlinevirtual |
The string representation of this record.
Reimplemented from Async::DnsResourceRecord.
Definition at line 521 of file AsyncDnsResourceRecord.h.
References cname(), and Async::DnsResourceRecord::toString().
|
inlinevirtual |
The string representation of this record.
Reimplemented from Async::DnsResourceRecord.
Definition at line 260 of file AsyncResourceRecord.h.
References cname(), and Async::DnsResourceRecord::toString().
|
inlinevirtual |
The type of record.
Reimplemented from Async::DnsResourceRecordCRTP< DnsResourceRecordCNAME >.
Definition at line 259 of file AsyncResourceRecord.h.
References staticType().