join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
DnsTest Class Reference

DNS test class. More...

Inheritance diagram for DnsTest:
Collaboration diagram for DnsTest:

Protected Member Functions

void SetUp () override
 set up the test fixture.
 
void TearDown () override
 tear down the test fixture.
 
void onQuery (const DnsPacket &query) override
 handle a DNS query.
 

Protected Attributes

std::unique_ptr< Dns::Resolver > _resolver
 DNS resolver instance.
 

Static Protected Attributes

static const uint16_t _dnsPort = 5353
 DNS server port.
 
static const IpAddress _fakeIPv4
 fake IPv4 address.
 
static const IpAddress _fakeIPv6
 fake IPv6 address.
 
static constexpr const char * _fakePTR = "fake.local"
 fake PTR record.
 
static constexpr const char * _fakeNS = "ns.fake.local"
 fake NS record.
 
static constexpr const char * _fakeSOA = "soa.fake.local"
 fake SOA record.
 
static constexpr const char * _fakeMX = "mail.fake.local"
 fake MX record.
 

Detailed Description

DNS test class.

Member Function Documentation

◆ onQuery()

void DnsTest::onQuery ( const DnsPacket & query)
inlineoverrideprotected

handle a DNS query.

Parameters
querythe DNS query.

◆ SetUp()

void DnsTest::SetUp ( )
inlineoverrideprotected

set up the test fixture.

◆ TearDown()

void DnsTest::TearDown ( )
inlineoverrideprotected

tear down the test fixture.

Member Data Documentation

◆ _dnsPort

const uint16_t DnsTest::_dnsPort = 5353
staticprotected

DNS server port.

◆ _fakeIPv4

const IpAddress DnsTest::_fakeIPv4
staticprotected

fake IPv4 address.

◆ _fakeIPv6

const IpAddress DnsTest::_fakeIPv6
staticprotected

fake IPv6 address.

◆ _fakeMX

const char* DnsTest::_fakeMX = "mail.fake.local"
staticconstexprprotected

fake MX record.

◆ _fakeNS

const char* DnsTest::_fakeNS = "ns.fake.local"
staticconstexprprotected

fake NS record.

◆ _fakePTR

const char* DnsTest::_fakePTR = "fake.local"
staticconstexprprotected

fake PTR record.

◆ _fakeSOA

const char* DnsTest::_fakeSOA = "soa.fake.local"
staticconstexprprotected

fake SOA record.

◆ _resolver

std::unique_ptr<Dns::Resolver> DnsTest::_resolver
protected

DNS resolver instance.


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