From cd9f9a8add02597a2998ba74b803ed3fbf81314c Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 27 Nov 2005 01:44:46 +0000 Subject: Added new documentation git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1966 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classDNS.html | 390 ++++++++++++++++++++---------------------- 1 file changed, 185 insertions(+), 205 deletions(-) (limited to 'docs/module-doc/classDNS.html') diff --git a/docs/module-doc/classDNS.html b/docs/module-doc/classDNS.html index 13a0af42f..0ed6c7daa 100644 --- a/docs/module-doc/classDNS.html +++ b/docs/module-doc/classDNS.html @@ -1,110 +1,109 @@ - + -InspIRCd: DNS class Reference +InspIRCd: DNS Class Reference - -
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members
-

DNS Class Reference

The DNS class allows fast nonblocking resolution of hostnames and ip addresses. + +
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members
+

DNS Class Reference

The DNS class allows fast nonblocking resolution of hostnames and ip addresses. More...

#include <dns.h>

Collaboration diagram for DNS:

Collaboration graph
-
[legend]
List of all members. +
[legend]
List of all members.
- - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - +

Public Member Functions

 DNS ()

Public Member Functions

 DNS ()
 The default constructor uses dns addresses read from /etc/resolv.conf.

 DNS (std::string dnsserver)
 The default constructor uses dns addresses read from /etc/resolv.conf.
 DNS (std::string dnsserver)
 This constructor accepts a dns server address.

 ~DNS ()
 This constructor accepts a dns server address.
 ~DNS ()
 The destructor frees all used structures.

bool ReverseLookup (std::string ip)
 The destructor frees all used structures.
bool ReverseLookup (std::string ip)
 This method will start the reverse lookup of an ip given in dotted decimal format, e.g.

bool ForwardLookup (std::string host)
 This method will start the reverse lookup of an ip given in dotted decimal format, e.g.
bool ForwardLookup (std::string host)
 This method will start the forward lookup of a hostname, e.g.

bool HasResult ()
 This method will start the forward lookup of a hostname, e.g.
bool HasResult ()
 This method will return true when the lookup is completed.

std::string GetResult ()
 This method will return true when the lookup is completed.
std::string GetResult ()
 This method returns the result of your query as a string, depending upon wether you called DNS::ReverseLookup() or DNS::ForwardLookup.

int GetFD ()
 This method returns the result of your query as a string, depending upon wether you called DNS::ReverseLookup() or DNS::ForwardLookup.
int GetFD ()
 This method returns the file handle used by the dns query socket or zero if the query is invalid for some reason, e.g.

void SetNS (std::string dnsserver)
 This method returns the file handle used by the dns query socket or zero if the query is invalid for some reason, e.g.
void SetNS (std::string dnsserver)

Private Member Functions

void dns_init ()

Private Member Functions

void dns_init ()
void dns_init_2 (const char *dnsserver)
void dns_init_2 (const char *dnsserver)
in_addr * dns_aton4 (const char *const ipstring)
in_addr * dns_aton4 (const char *const ipstring)
char * dns_ntoa4 (const in_addr *const ip)
char * dns_ntoa4 (const in_addr *const ip)
int dns_getip4 (const char *const name)
int dns_getip4 (const char *const name)
int dns_getip4list (const char *const name)
int dns_getip4list (const char *const name)
int dns_getname4 (const in_addr *const ip)
int dns_getname4 (const in_addr *const ip)
char * dns_getresult (const int fd)
char * dns_getresult (const int fd)
in_addr * dns_aton4_s (const char *const ipstring, in_addr *const ip)
in_addr * dns_aton4_s (const char *const ipstring, in_addr *const ip)
char * dns_ntoa4_s (const in_addr *const ip, char *const result)
char * dns_ntoa4_s (const in_addr *const ip, char *const result)
char * dns_getresult_s (const int fd, char *const result)
char * dns_getresult_s (const int fd, char *const result)
in_addr * dns_aton4_r (const char *const ipstring)
in_addr * dns_aton4_r (const char *const ipstring)
char * dns_ntoa4_r (const in_addr *const ip)
char * dns_ntoa4_r (const in_addr *const ip)
char * dns_getresult_r (const int fd)
char * dns_getresult_r (const int fd)

Private Attributes

in_addr * binip

Private Attributes

in_addr * binip
char * result
char * result
int t
int t
unsigned int fd
int fd

Detailed Description

The DNS class allows fast nonblocking resolution of hostnames and ip addresses.

-It is based heavily upon firedns by Ian Gulliver. +It is based heavily upon firedns by Ian Gulliver.

Definition at line 35 of file dns.h.


Constructor & Destructor Documentation

-

- +

+

- + -
DNS::DNS DNS::DNS  ) 
- +
  @@ -117,25 +116,24 @@ The default constructor uses dns addresses read from /etc/resolv.conf. Please note that it will re-read /etc/resolv.conf for each copy of the class you instantiate, causing disk access and slow lookups if you create a lot of them. Consider passing the constructor a server address as a parameter instead.
-

- +

+

- + - + -
DNS::DNS DNS::DNS std::string std::string  dnsserver  ) 
- +
  @@ -148,24 +146,23 @@ This constructor accepts a dns server address. The address must be in dotted decimal form, e.g. 1.2.3.4.
-

- +

+

- + -
DNS::~DNS DNS::~DNS  ) 
- +
  @@ -179,25 +176,24 @@ The destructor frees all used structures.


Member Function Documentation

-

- +

+

- + - + -
in_addr* DNS::dns_aton4 in_addr* DNS::dns_aton4 const char *const const char *const   ipstring  )  [private]
- +
  @@ -208,25 +204,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
in_addr* DNS::dns_aton4_r in_addr* DNS::dns_aton4_r const char *const const char *const   ipstring  )  [private]
- +
  @@ -237,34 +232,33 @@ The destructor frees all used structures.
-

- +

+

- + - + - - - + + + - + -
in_addr* DNS::dns_aton4_s in_addr* DNS::dns_aton4_s const char *const const char *const   ipstring,
in_addr *const in_addr *const   ip
[private]
- +
  @@ -275,25 +269,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
int DNS::dns_getip4 int DNS::dns_getip4 const char *const const char *const   name  )  [private]
- +
  @@ -304,25 +297,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
int DNS::dns_getip4list int DNS::dns_getip4list const char *const const char *const   name  )  [private]
- +
  @@ -333,25 +325,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
int DNS::dns_getname4 int DNS::dns_getname4 const in_addr *const const in_addr *const   ip  )  [private]
- +
  @@ -362,25 +353,24 @@ The destructor frees all used structures.
-

- +

+

- + -
char* DNS::dns_getresult char* DNS::dns_getresult const int  fd  )  [private]
- +
  @@ -391,25 +381,24 @@ The destructor frees all used structures.
-

- +

+

- + -
char* DNS::dns_getresult_r char* DNS::dns_getresult_r const int  fd  )  [private]
- +
  @@ -420,34 +409,33 @@ The destructor frees all used structures.
-

- +

+

- + - - - + + + - + -
char* DNS::dns_getresult_s char* DNS::dns_getresult_s const int  fd,
char *const char *const   result
[private]
- +
  @@ -458,24 +446,23 @@ The destructor frees all used structures.
-

- +

+

- + -
void DNS::dns_init void DNS::dns_init  )  [private]
- +
  @@ -486,25 +473,24 @@ The destructor frees all used structures.
-

- +

+

- + -
void DNS::dns_init_2 void DNS::dns_init_2 const char *  dnsserver  )  [private]
- +
  @@ -515,25 +501,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
char* DNS::dns_ntoa4 char* DNS::dns_ntoa4 const in_addr *const const in_addr *const   ip  )  [private]
- +
  @@ -544,25 +529,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
char* DNS::dns_ntoa4_r char* DNS::dns_ntoa4_r const in_addr *const const in_addr *const   ip  )  [private]
- +
  @@ -573,34 +557,33 @@ The destructor frees all used structures.
-

- +

+

- + - + - - - + + + - + -
char* DNS::dns_ntoa4_s char* DNS::dns_ntoa4_s const in_addr *const const in_addr *const   ip,
char *const char *const   result
[private]
- +
  @@ -611,25 +594,24 @@ The destructor frees all used structures.
-

- +

+

- + - + -
bool DNS::ForwardLookup bool DNS::ForwardLookup std::string std::string  host  ) 
- +
  @@ -642,24 +624,23 @@ This method will start the forward lookup of a hostname, e.g. www.inspircd.org, and returns true if the lookup was successfully initiated.
-

- +

+

- + -
int DNS::GetFD int DNS::GetFD  ) 
- +
  @@ -672,24 +653,23 @@ This method returns the file handle used by the dns query socket or zero if the the dns server not responding.
-

- +

+

- + -
std::string DNS::GetResult std::string DNS::GetResult  ) 
- +
  @@ -697,29 +677,28 @@ the dns server not responding.

-This method returns the result of your query as a string, depending upon wether you called DNS::ReverseLookup() or DNS::ForwardLookup. +This method returns the result of your query as a string, depending upon wether you called DNS::ReverseLookup() or DNS::ForwardLookup.

-

- +

+

- + -
bool DNS::HasResult bool DNS::HasResult  ) 
- +
  @@ -732,25 +711,24 @@ This method will return true when the lookup is completed. It uses poll internally to determine the status of the socket.
-

- +

+

- + - + -
bool DNS::ReverseLookup bool DNS::ReverseLookup std::string std::string  ip  ) 
- +
  @@ -763,25 +741,24 @@ This method will start the reverse lookup of an ip given in dotted decimal forma 1.2.3.4, and returns true if the lookup was successfully initiated.
-

- +

+

- + - + -
void DNS::SetNS void DNS::SetNS std::string std::string  dnsserver  ) 
- +
  @@ -793,18 +770,19 @@ This method will start the reverse lookup of an ip given in dotted decimal forma


Member Data Documentation

-

- +

+

- +
in_addr* DNS::binip [private] + in_addr* DNS::binip [private]
- +
  @@ -817,18 +795,19 @@ This method will start the reverse lookup of an ip given in dotted decimal forma Definition at line 38 of file dns.h.
-

- +

+

- +
unsigned int DNS::fd [private] + int DNS::fd [private]
- +
  @@ -841,18 +820,19 @@ Definition at line 38 of file Definition at line 42 of file dns.h.
-

- +

+

- +
char* DNS::result [private] + char* DNS::result [private]
- +
  @@ -865,18 +845,19 @@ Definition at line 42 of file Definition at line 39 of file dns.h.
-

- +

+

- +
int DNS::t [private] + int DNS::t [private]
- +
  @@ -891,9 +872,8 @@ Definition at line 40 of file


The documentation for this class was generated from the following file: -
Generated on Mon May 30 05:16:48 2005 for InspIRCd by +
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  -doxygen -1.3.3
+doxygen 1.4.4-20050815
-- cgit v1.2.3