The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SecurityIPResolver Class Reference

Handle resolving of server IPs for the cache. More...

#include <resolvers.h>

Inheritance diagram for SecurityIPResolver:

Inheritance graph
[legend]
Collaboration diagram for SecurityIPResolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SecurityIPResolver (Module *me, SpanningTreeUtilities *U, InspIRCd *Instance, const std::string &hostname, Link x, bool &cached, QueryType qt)
void OnLookupComplete (const std::string &result, unsigned int ttl, bool cached, int resultnum=0)
 When your lookup completes, this method will be called.
void OnError (ResolverError e, const std::string &errormessage)
 If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.

Private Attributes

Link MyLink
SpanningTreeUtilitiesUtils
Modulemine
std::string host
QueryType query

Detailed Description

Handle resolving of server IPs for the cache.

Definition at line 29 of file resolvers.h.


Constructor & Destructor Documentation

SecurityIPResolver::SecurityIPResolver Module me,
SpanningTreeUtilities U,
InspIRCd Instance,
const std::string hostname,
Link  x,
bool &  cached,
QueryType  qt
[inline]
 

Definition at line 38 of file resolvers.h.

Referenced by OnError().


Member Function Documentation

void SecurityIPResolver::OnError ResolverError  e,
const std::string errormessage
[inline, virtual]
 

If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.

Parameters:
e A ResolverError enum containing the error type which has occured.
errormessage The error text of the error that occured.

Reimplemented from Resolver.

Definition at line 48 of file resolvers.h.

References InspIRCd::AddResolver(), DEFAULT, DNS_QUERY_A, DNS_QUERY_AAAA, host, LogManager::Log(), InspIRCd::Logs, mine, MyLink, Link::Name, query, SecurityIPResolver(), Resolver::ServerInstance, and Utils.

void SecurityIPResolver::OnLookupComplete const std::string result,
unsigned int  ttl,
bool  cached,
int  resultnum = 0
[inline, virtual]
 

When your lookup completes, this method will be called.

Parameters:
result The resulting DNS lookup, either an IP address or a hostname.
ttl The time-to-live value of the result, in the instance of a cached result, this is the number of seconds remaining before refresh/expiry.
cached True if the result is a cached result, false if it was requested from the DNS server.
resultnum Result number, for records with multiple matching results. Normally, you will only want to act on this when the result is 0.

Implements Resolver.

Definition at line 43 of file resolvers.h.

References Utils, and SpanningTreeUtilities::ValidIPs.


Member Data Documentation

std::string SecurityIPResolver::host [private]
 

Definition at line 35 of file resolvers.h.

Referenced by OnError().

Module* SecurityIPResolver::mine [private]
 

Definition at line 34 of file resolvers.h.

Referenced by OnError().

Link SecurityIPResolver::MyLink [private]
 

Definition at line 32 of file resolvers.h.

Referenced by OnError().

QueryType SecurityIPResolver::query [private]
 

Definition at line 36 of file resolvers.h.

Referenced by OnError().

SpanningTreeUtilities* SecurityIPResolver::Utils [private]
 

Definition at line 33 of file resolvers.h.

Referenced by OnError(), and OnLookupComplete().


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