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

dns.h File Reference

#include "socket.h"
#include "hashcomp.h"

Include dependency graph for dns.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DNSResult
 Result status, used internally. More...
class  CachedQuery
 Cached item stored in the query cache. More...
class  Resolver
 The Resolver class is a high-level abstraction for resolving DNS entries. More...
class  DNS
 DNS is a singleton class used by the core to dispatch dns requests to the dns server, and route incoming dns replies back to Resolver objects, based upon the request ID. More...

Typedefs

typedef std::pair< unsigned
char *, std::string
DNSInfo
 Information on a completed lookup, used internally.
typedef nspace::hash_map<
irc::string, CachedQuery,
nspace::hash< irc::string > > 
dnscache
 DNS cache information.

Enumerations

enum  ResolverError {
  RESOLVER_NOERROR = 0, RESOLVER_NSDOWN = 1, RESOLVER_NXDOMAIN = 2, RESOLVER_NOTREADY = 3,
  RESOLVER_BADIP = 4, RESOLVER_TIMEOUT = 5, RESLOVER_FORCEUNLOAD = 6
}
 Error types that class Resolver can emit to its error method. More...
enum  QueryType {
  DNS_QUERY_NONE = 0, DNS_QUERY_A = 1, DNS_QUERY_CNAME = 5, DNS_QUERY_PTR = 12,
  DNS_QUERY_AAAA = 28, DNS_QUERY_PTR4 = 0xFFFD, DNS_QUERY_PTR6 = 0xFFFE
}
 Query and resource record types. More...
enum  ForceProtocol { PROTOCOL_IPV4 = 0, PROTOCOL_IPV6 = 1 }
 Used internally to force PTR lookups to use a certain protocol scemantics, e.g. More...

Variables

const QueryType DNS_QUERY_FORWARD = DNS_QUERY_A
const QueryType DNS_QUERY_REVERSE = DNS_QUERY_PTR


Typedef Documentation

typedef nspace::hash_map<irc::string, CachedQuery, nspace::hash<irc::string> > dnscache
 

DNS cache information.

Holds IPs mapped to hostnames, and hostnames mapped to IPs.

Definition at line 107 of file dns.h.

typedef std::pair<unsigned char*, std::string> DNSInfo
 

Information on a completed lookup, used internally.

Definition at line 71 of file dns.h.


Enumeration Type Documentation

enum ForceProtocol
 

Used internally to force PTR lookups to use a certain protocol scemantics, e.g.

x.x.x.x.in-addr.arpa for v4, and *.ip6.arpa for v6.

Enumerator:
PROTOCOL_IPV4 
PROTOCOL_IPV6 

Definition at line 166 of file dns.h.

enum QueryType
 

Query and resource record types.

Enumerator:
DNS_QUERY_NONE 
DNS_QUERY_A 
DNS_QUERY_CNAME 
DNS_QUERY_PTR 
DNS_QUERY_AAAA 
DNS_QUERY_PTR4 
DNS_QUERY_PTR6 

Definition at line 144 of file dns.h.

enum ResolverError
 

Error types that class Resolver can emit to its error method.

Enumerator:
RESOLVER_NOERROR 
RESOLVER_NSDOWN 
RESOLVER_NXDOMAIN 
RESOLVER_NOTREADY 
RESOLVER_BADIP 
RESOLVER_TIMEOUT 
RESLOVER_FORCEUNLOAD 

Definition at line 115 of file dns.h.


Variable Documentation

const QueryType DNS_QUERY_FORWARD = DNS_QUERY_A
 

Definition at line 159 of file dns.h.

const QueryType DNS_QUERY_REVERSE = DNS_QUERY_PTR
 

Definition at line 161 of file dns.h.