#include <AsyncResolver.h>
Inheritance diagram for OW32::CAsyncResolver:

Public Member Functions | |
| CAsyncResolver () | |
| Construct an uninitialised resolver. | |
| AsyncResolverError | initialise (const CAsyncResolverOptions *pOptions, HANDLE hIoPort, CFileWatcher *pFileWatcher=NULL, const char *random_data=NULL) |
| Initialise the resolver. | |
| ~CAsyncResolver () | |
| Destructor for final cleanup. | |
| AsyncResolverError | terminate () |
| Shutdown the resolver. | |
| HANDLE | getIoCompletionPort () |
| Return the IO completion port in use. | |
| void | gethostbyname (CAsyncResolverHostCallback *pCallback, void *context, const char *name, int family) |
| Asynchronous version of gethostbynmae. | |
| void | gethostbyaddr (CAsyncResolverHostCallback *pCallback, void *context, const void *addr, int addrlen, int family) |
| Asynchronous version of gethostbyaddr. | |
| void | search (CAsyncResolverCallback *pCallback, void *context, const char *name, int dnsclass, int type) |
| Asynchronous version of search. | |
| void | sendQuery (CAsyncResolverQuery *query) |
| Initiate transmission of a CAsyncResolverQuery object. | |
| AsyncResolverError | getHostsDB (CAsyncResolverHostsDBPtr &hostsDB) |
| Get the hosts file database, reading it in if this is the first call. | |
| unsigned int | random (unsigned int n) |
| Return a random number modulo n. | |
| const CAsyncResolverOptions * | getOptions () const |
| Return the options object in use by this resolver. | |
| void | OnAnswer (size_t serverIndex, bool fTCP, BYTE *abuf, size_t alen) |
| Callback from CAsyncResolverServer. | |
| void | OnError (size_t serverIndex, bool fTCP, AsyncResolverError status, CAsyncResolverQuery *query) |
| Callback from CAsyncResolverServer. | |
| virtual void | onTimeout (LPVOID key) |
| Called by the I/O timeout manager when a timeout occurs. | |
| virtual bool | drainTimeout (CIoTimeoutCallback *pCallback, LPVOID key) |
| Called by the I/O timeout manager during timeout queue draining. | |
Static Public Member Functions | |
| AsyncResolverError | expandName (const unsigned char *encoded, const unsigned char *abuf, size_t alen, char **s, size_t *enclen) |
| Utility function to expand a name in a DNS packet. | |
| AsyncResolverError | getHostEnt (FILE *fp, struct hostent **host) |
| Utility function to get a hostent structure by reading a line from a 'hosts' style file. | |
| void | freeHostEnt (struct hostent *host) |
| Utility function to free a hostent structure where all fields are allocated with malloc (e.g. | |
| const TCHAR * | describeError (AsyncResolverError code) |
| Utility function to provide a textual description of an error code. | |
| AsyncResolverError | readLine (FILE *fp, char **buf, size_t *bufsize) |
| Utility function to read a line from a file. | |
|
|
Construct an uninitialised resolver. initialise must be called before use. |
|
|
Destructor for final cleanup. Must call terminate() first. |
|
|
Utility function to provide a textual description of an error code. Currently only English is supported.
|
|
||||||||||||
|
Called by the I/O timeout manager during timeout queue draining. Not to be called directly. Implements OW32::CIoTimeoutDrainCallback. |
|
||||||||||||||||||||||||
|
Utility function to expand a name in a DNS packet.
|
|
|
Utility function to free a hostent structure where all fields are allocated with malloc (e.g. from getHostEnt).
|
|
||||||||||||||||||||||||
|
Asynchronous version of gethostbyaddr.
All errors are reported via the callback |
|
||||||||||||||||||||
|
Asynchronous version of gethostbynmae.
|
|
||||||||||||
|
Utility function to get a hostent structure by reading a line from a 'hosts' style file.
|
|
|
Get the hosts file database, reading it in if this is the first call.
|
|
||||||||||||||||||||
|
Initialise the resolver.
|
|
||||||||||||||||||||
|
Callback from CAsyncResolverServer. Not for direct use. |
|
||||||||||||||||||||
|
Callback from CAsyncResolverServer. Not for direct use. |
|
|
Called by the I/O timeout manager when a timeout occurs. Not to be called directly. Implements OW32::CIoTimeoutCallback. |
|
|
Return a random number modulo n. If n is 0, 0 is returned. |
|
||||||||||||||||
|
Utility function to read a line from a file.
|
|
||||||||||||||||||||||||
|
Asynchronous version of search.
|
|
|
Initiate transmission of a CAsyncResolverQuery object.
|
|
|
Shutdown the resolver. Must be called before disposing of the resolver object. |
1.3.9.1