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

DNSBLResolver Class Reference

Resolver for CGI:IRC hostnames encoded in ident/GECOS. More...

Inheritance diagram for DNSBLResolver:

Inheritance graph
[legend]
Collaboration diagram for DNSBLResolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DNSBLResolver (Module *me, InspIRCd *Instance, const std::string &hostname, User *u, int userfd, DNSBLConfEntry *conf, bool &cached)
virtual void OnLookupComplete (const std::string &result, unsigned int ttl, bool cached, int resultnum=0)
 When your lookup completes, this method will be called.
virtual 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.
virtual ~DNSBLResolver ()

Private Attributes

int theirfd
Userthem
DNSBLConfEntryConfEntry

Detailed Description

Resolver for CGI:IRC hostnames encoded in ident/GECOS.

Definition at line 46 of file m_dnsbl.cpp.


Constructor & Destructor Documentation

DNSBLResolver::DNSBLResolver Module me,
InspIRCd Instance,
const std::string hostname,
User u,
int  userfd,
DNSBLConfEntry conf,
bool &  cached
[inline]
 

Definition at line 54 of file m_dnsbl.cpp.

References ConfEntry, theirfd, and them.

virtual DNSBLResolver::~DNSBLResolver  )  [inline, virtual]
 

Definition at line 174 of file m_dnsbl.cpp.


Member Function Documentation

virtual void DNSBLResolver::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 170 of file m_dnsbl.cpp.

virtual void DNSBLResolver::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 63 of file m_dnsbl.cpp.

References DNSBLConfEntry::A_BITMASK, DNSBLConfEntry::A_RECORD, XLineManager::AddLine(), XLineManager::ApplyLines(), DNSBLConfEntry::banaction, DNSBLConfEntry::bitmask, ConfEntry, InspIRCd::Config, DNSBLConfEntry::duration, User::GetFullRealHost(), User::GetIPString(), SocketEngine::GetRef(), DNSBLConfEntry::I_GLINE, DNSBLConfEntry::I_KILL, DNSBLConfEntry::I_KLINE, DNSBLConfEntry::I_UNKNOWN, DNSBLConfEntry::I_ZLINE, DNSBLConfEntry::name, UserManager::QuitUser(), DNSBLConfEntry::reason, DNSBLConfEntry::records, InspIRCd::SE, Resolver::ServerInstance, ServerConfig::ServerName, InspIRCd::SNO, DNSBLConfEntry::stats_hits, DNSBLConfEntry::stats_misses, theirfd, them, InspIRCd::Time(), DNSBLConfEntry::type, InspIRCd::Users, SnomaskManager::WriteToSnoMask(), and InspIRCd::XLines.


Member Data Documentation

DNSBLConfEntry* DNSBLResolver::ConfEntry [private]
 

Definition at line 50 of file m_dnsbl.cpp.

Referenced by DNSBLResolver(), and OnLookupComplete().

int DNSBLResolver::theirfd [private]
 

Definition at line 48 of file m_dnsbl.cpp.

Referenced by DNSBLResolver(), and OnLookupComplete().

User* DNSBLResolver::them [private]
 

Definition at line 49 of file m_dnsbl.cpp.

Referenced by DNSBLResolver(), and OnLookupComplete().


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