Async 1.8.0
|
A class for representing an A DNS resource record. More...
#include <AsyncDnsResourceRecord.h>
Public Types | |
using | Ip = Async::IpAddress |
![]() | |
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 | |
DnsResourceRecordA (const Name &name, Ttl ttl, const Ip &ip=Ip()) | |
Constructor. | |
virtual bool | operator== (const DnsResourceRecordA &other) const |
Equality comparison operator. | |
virtual std::string | toString (void) const |
The string representation of this record. | |
void | setIp (const Ip &ip) |
Set the IP address for this record. | |
const Ip & | ip (void) const |
The IP address for this record. | |
DnsResourceRecordA (const std::string &name, uint32_t ttl, const IpAddress &ip=IpAddress()) | |
~DnsResourceRecordA (void) | |
virtual const Type | type (void) const |
The type of record. | |
virtual std::string | toString (void) const |
The string representation of this record. | |
void | setIp (const IpAddress &ip) |
const IpAddress & | ip (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 an A DNS resource record.
This class represents an A DNS resource record. One or more resource records is the result of performing a DNS query. This specific resource record maps a hostname to an IP address.
Definition at line 197 of file AsyncResourceRecord.h.
Definition at line 343 of file AsyncDnsResourceRecord.h.
|
inline |
Constructor.
name | The name of this record |
ttl | The time-to-live, in seconds, for this record |
ip | The IP address associated with the record name |
Definition at line 356 of file AsyncDnsResourceRecord.h.
|
inline |
Definition at line 202 of file AsyncResourceRecord.h.
|
inline |
Definition at line 205 of file AsyncResourceRecord.h.
|
inline |
The IP address for this record.
Definition at line 393 of file AsyncDnsResourceRecord.h.
Referenced by operator==(), setIp(), setIp(), and toString().
|
inline |
Definition at line 216 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< DnsResourceRecordA >.
Definition at line 366 of file AsyncDnsResourceRecord.h.
References ip(), and Async::DnsResourceRecord::operator==().
|
inline |
Set the IP address for this record.
ip | The new IP address to set |
Definition at line 387 of file AsyncDnsResourceRecord.h.
References ip().
|
inline |
Definition at line 215 of file AsyncResourceRecord.h.
References ip().
|
inlinestatic |
The type for this specific class.
Definition at line 348 of file AsyncDnsResourceRecord.h.
References Async::DnsResourceRecord::A.
Referenced by type().
|
inlinestatic |
Definition at line 200 of file AsyncResourceRecord.h.
References Async::DnsResourceRecord::A.
|
inlinevirtual |
The string representation of this record.
Reimplemented from Async::DnsResourceRecord.
Definition at line 376 of file AsyncDnsResourceRecord.h.
References ip(), and Async::DnsResourceRecord::toString().
|
inlinevirtual |
The string representation of this record.
Reimplemented from Async::DnsResourceRecord.
Definition at line 208 of file AsyncResourceRecord.h.
References ip(), and Async::DnsResourceRecord::toString().
|
inlinevirtual |
The type of record.
Reimplemented from Async::DnsResourceRecordCRTP< DnsResourceRecordA >.
Definition at line 207 of file AsyncResourceRecord.h.
References staticType().