reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::DnsStub Class Reference

#include <DnsStub.hxx>

Inheritance diagram for resip::DnsStub:
[legend]

Classes

class  Command
 
class  DnsStubException
 
class  ResultTransform
 

Public Types

typedef RRCache::Protocol Protocol
 
typedef std::vector< Data > DataArr
 
typedef std::vector< DnsResourceRecord * > DnsResourceRecordsByPtr
 
typedef std::vector< GenericIPAddress > NameserverList
 

Public Member Functions

 DnsStub (const NameserverList &additional=EmptyNameserverList, AfterSocketCreationFuncPtr socketFunc=0, AsyncProcessHandler *asyncProcessHandler=0, FdPollGrp *pollGrp=0)
 
 ~DnsStub ()
 
void setResultTransform (ResultTransform *)
 
void removeResultTransform ()
 
void setEnumSuffixes (const std::vector< Data > &suffixes)
 
const std::vector< Data > & getEnumSuffixes () const
 
void setEnumDomains (const std::map< Data, Data > &domains)
 
const std::map< Data, Data > & getEnumDomains () const
 
void clearDnsCache ()
 
void logDnsCache ()
 
void getDnsCacheDump (std::pair< unsigned long, unsigned long > key, GetDnsCacheDumpHandler *handler)
 
void setDnsCacheTTL (int ttl)
 
void setDnsCacheSize (int size)
 
void reloadDnsServers ()
 
bool changeNameServers (const NameserverList &additional)
 
bool checkDnsChange ()
 
bool supportedType (int)
 
template<class QueryType >
void lookup (const Data &target, DnsResultSink *sink)
 
template<class QueryType >
void lookup (const Data &target, int protocol, DnsResultSink *sink)
 
virtual void handleDnsRaw (ExternalDnsRawResult)
 
virtual void process (FdSet &fdset)
 
virtual unsigned int getTimeTillNextProcessMS ()
 
virtual void buildFdSet (FdSet &fdset)
 
void setPollGrp (FdPollGrp *pollGrp)
 
void processTimers ()
 
virtual void queueCommand (Command *command)
 
template<class QueryType >
void query (const Data &target, int proto, DnsResultSink *sink)
 
- Public Member Functions inherited from resip::ExternalDnsHandler
virtual ~ExternalDnsHandler ()
 

Static Public Member Functions

static void setDnsTimeoutAndTries (int timeoutInSec, int tries)
 
static void enableDnsFeatures (unsigned int features)
 

Static Public Attributes

static NameserverList EmptyNameserverList
 

Protected Member Functions

void cache (const Data &key, in_addr addr)
 
void cache (const Data &key, const unsigned char *abuf, int alen)
 
void cacheTTL (const Data &key, int rrType, int status, const unsigned char *abuf, int alen)
 

Detailed Description

Definition at line 111 of file DnsStub.hxx.

Member Typedef Documentation

◆ DataArr

typedef std::vector<Data> resip::DnsStub::DataArr

Definition at line 115 of file DnsStub.hxx.

◆ DnsResourceRecordsByPtr

Definition at line 116 of file DnsStub.hxx.

◆ NameserverList

Definition at line 117 of file DnsStub.hxx.

◆ Protocol

Definition at line 114 of file DnsStub.hxx.

Constructor & Destructor Documentation

◆ DnsStub()

DnsStub::DnsStub ( const NameserverList &  additional = EmptyNameserverList,
AfterSocketCreationFuncPtr  socketFunc = 0,
AsyncProcessHandler *  asyncProcessHandler = 0,
FdPollGrp *  pollGrp = 0 
)

Definition at line 82 of file DnsStub.cxx.

◆ ~DnsStub()

DnsStub::~DnsStub ( )

Definition at line 112 of file DnsStub.cxx.

Member Function Documentation

◆ buildFdSet()

void DnsStub::buildFdSet ( FdSet &  fdset)
virtual

Definition at line 131 of file DnsStub.cxx.

◆ cache() [1/2]

void DnsStub::cache ( const Data &  key,
const unsigned char *  abuf,
int  alen 
)
protected

Definition at line 185 of file DnsStub.cxx.

◆ cache() [2/2]

void DnsStub::cache ( const Data &  key,
in_addr  addr 
)
protected

Definition at line 177 of file DnsStub.cxx.

◆ cacheTTL()

void DnsStub::cacheTTL ( const Data &  key,
int  rrType,
int  status,
const unsigned char *  abuf,
int  alen 
)
protected

Definition at line 242 of file DnsStub.cxx.

◆ changeNameServers()

bool DnsStub::changeNameServers ( const NameserverList &  additional)

Definition at line 307 of file DnsStub.cxx.

◆ checkDnsChange()

bool DnsStub::checkDnsChange ( )

Definition at line 318 of file DnsStub.cxx.

◆ clearDnsCache()

void DnsStub::clearDnsCache ( )

Definition at line 856 of file DnsStub.cxx.

◆ enableDnsFeatures()

static void resip::DnsStub::enableDnsFeatures ( unsigned int  features)
inlinestatic

Definition at line 159 of file DnsStub.hxx.

◆ getDnsCacheDump()

void DnsStub::getDnsCacheDump ( std::pair< unsigned long, unsigned long >  key,
GetDnsCacheDumpHandler *  handler 
)

Definition at line 882 of file DnsStub.cxx.

◆ getEnumDomains()

const std::map< Data, Data > & DnsStub::getEnumDomains ( ) const

Definition at line 844 of file DnsStub.cxx.

◆ getEnumSuffixes()

const std::vector< Data > & DnsStub::getEnumSuffixes ( ) const

Definition at line 825 of file DnsStub.cxx.

◆ getTimeTillNextProcessMS()

unsigned int DnsStub::getTimeTillNextProcessMS ( )
virtual

Definition at line 124 of file DnsStub.cxx.

◆ handleDnsRaw()

void DnsStub::handleDnsRaw ( ExternalDnsRawResult  res)
virtual

Implements resip::ExternalDnsHandler.

Definition at line 811 of file DnsStub.cxx.

◆ logDnsCache()

void DnsStub::logDnsCache ( )

Definition at line 869 of file DnsStub.cxx.

◆ lookup() [1/2]

template<class QueryType >
void resip::DnsStub::lookup ( const Data &  target,
DnsResultSink *  sink 
)
inline

Definition at line 189 of file DnsStub.hxx.

◆ lookup() [2/2]

template<class QueryType >
void resip::DnsStub::lookup ( const Data &  target,
int  protocol,
DnsResultSink *  sink 
)
inline

Definition at line 201 of file DnsStub.hxx.

◆ process()

void DnsStub::process ( FdSet &  fdset)
virtual

Definition at line 149 of file DnsStub.cxx.

◆ processTimers()

void DnsStub::processTimers ( )

Definition at line 157 of file DnsStub.cxx.

◆ query()

template<class QueryType >
void resip::DnsStub::query ( const Data &  target,
int  proto,
DnsResultSink *  sink 
)
inline

Definition at line 305 of file DnsStub.hxx.

◆ queueCommand()

void DnsStub::queueCommand ( Command *  command)
virtual

Definition at line 165 of file DnsStub.cxx.

◆ reloadDnsServers()

void DnsStub::reloadDnsServers ( )

Definition at line 898 of file DnsStub.cxx.

◆ removeResultTransform()

void DnsStub::removeResultTransform ( )

Definition at line 403 of file DnsStub.cxx.

◆ setDnsCacheSize()

void DnsStub::setDnsCacheSize ( int  size)

Definition at line 923 of file DnsStub.cxx.

◆ setDnsCacheTTL()

void DnsStub::setDnsCacheTTL ( int  ttl)

Definition at line 917 of file DnsStub.cxx.

◆ setDnsTimeoutAndTries()

static void resip::DnsStub::setDnsTimeoutAndTries ( int  timeoutInSec,
int  tries 
)
inlinestatic

Definition at line 154 of file DnsStub.hxx.

◆ setEnumDomains()

void DnsStub::setEnumDomains ( const std::map< Data, Data > &  domains)
Parameters
enumDomainsThe ENUM possibility is only considered if the URI domain part is one of these domains

Definition at line 837 of file DnsStub.cxx.

◆ setEnumSuffixes()

void DnsStub::setEnumSuffixes ( const std::vector< Data > &  suffixes)
Parameters
enumSuffixesIf the uri is enum searchable, this is the list of enum suffixes (for example "e164.arpa") that will be used in the attempt to resolve this uri.

Definition at line 818 of file DnsStub.cxx.

◆ setPollGrp()

void DnsStub::setPollGrp ( FdPollGrp *  pollGrp)

Definition at line 409 of file DnsStub.cxx.

◆ setResultTransform()

void DnsStub::setResultTransform ( ResultTransform *  transform)

Definition at line 397 of file DnsStub.cxx.

◆ supportedType()

bool DnsStub::supportedType ( int  type)

Definition at line 324 of file DnsStub.cxx.

Member Data Documentation

◆ EmptyNameserverList

DnsStub::NameserverList DnsStub::EmptyNameserverList
static

Definition at line 119 of file DnsStub.hxx.


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