Class KomodiaDNS::CDNSManager Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: Custom Code in Source After IncludesNext page: m_aData    Show member index
Class Declared in:
DNSManager.h

'Overview' icon -- Shortcut to top of page. Overview

Copyright (c) 2000-2003 Barak Weichselbaum <barak@komodia.com> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Contact info:

Site:                  http://www.komodia.com Main contact:          barak@komodia.com For custom projects, consulting, or other paid services:         sales@komodia.com

Hierarchy Chart Hierarchy Chart

'Base Classes' icon -- Shortcut to top of page. Base Classes

Public base class CErrorHandler

'Data Items' icon -- Shortcut to top of page. Data Items

Private data IDMap m_aData Our query data
Private data BOOL m_bAsync Status flags
Private data BOOL m_bInitialized Are we initialized
Private data BOOL m_bTCP
Private data DWORD m_dwTimeout The timeout
Private data int m_iParseThreads Do we parse multithreaded
Private data CGenericCriticalSection * m_pCSection Our cs
Private data CDNSSocket * m_pSocket Our socket
Private data CPeriodicThread * m_pThread Our periodic thread
Private data std::string m_strDNSServer Our DNS server

'Constructors' icon -- Shortcut to top of page. Constructors

Private constructor

CDNSManager( const CDNSManager& rManager )

No copy Ctor
Public constructor

CDNSManager( const std::string strDNSServer, BOOL bTCP, BOOL bAsync, BOOL bAsyncConnect=FALSE )

Ctor and Dtor bTCP - Use DNS TCP bAsync - Use async sockets bAsyncConnect - Connect blockingly

'Destructors' icon -- Shortcut to top of page. Destructors

Public destructor virtual

~CDNSManager()

'Functions' icon -- Shortcut to top of page. Functions

Private function void

AddRecord( unsigned short usID, LPVOID lpLocalIDData, DWORD dwTimeout, const CDNSQuery& rQuery )

Add a record
Public function unsigned short

GetDNSEntry( const std::string& rAddress, unsigned short usID=0, LPVOID lpLocalIDData=NULL )

Get the dns entry of an address usID - ID of the DNS (if zero, library will allocate one) lpLocalIDData - Custome user data
Public function unsigned short

GetDNSEntry( unsigned long ulAddress, unsigned short usID=0, LPVOID lpLocalIDData=NULL )

Protected function virtual LPDnsHeaderHeader

GetDNSHeaderHeader( unsigned short usID, unsigned short usFlags, unsigned short usQuestions, unsigned short usAnswers=0 ) const

Get a generic DNS
Private function LPVOID

GetRecord( unsigned short usID ) const

Get a record
Public function CThreadPool *

GetThreadManager() const

Get the thread manager
Public function BOOL

Initialize()

Initialize ourselves
Public function BOOL

IsInitialized() const

Are we initialized
Protected function virtual void

OnDNSError( int iErrorCode, LPVOID lpLocalIDData )

Events for user to override
Private function void

OnDNSReceive( CDNSAnswers* pAnswers )

Receive an answer from the sockets
Protected function virtual void

OnDNSReceive( CDNSAnswers* pAnswers, LPVOID lpLocalIDData )

Protected function virtual void

OnDNSTimeout( const CDNSQuery& rQuery, LPVOID lpLocalIDData )

Private function CDNSManager &

operator =( const CDNSManager& rManager )

No copy operator
Public function static std::string

ParseAddress( const std::string& rAddress )

Parse an address, convert it to DNS
Public function void

ParseMultithreaded( int iThreadNumber )

Allow to parse multithreaded
Public function void

ParseMultithreaded( CThreadPool* pThreadManager )

of namespace
Public function unsigned short

QueryDNS( const CDNSQuery& rQuery, unsigned short usID=0, LPVOID lpLocalIDData=NULL )

Send a query (Returns the Query ID)
Public function CDNSAnswers *

Receive()

Receive data
Private function void

RemoveRecord( unsigned short usID )

Remove a record
Public function BOOL

SetConnectionTimeout( DWORD dwMS )

Set the timeout (for the sockets)
Public function void

SetDNSTimeout( DWORD dwMS )

Set the timeout for the DNS
Private function static BOOL

ThreadProc( CPeriodicThread::ThreadStage aStage, LPVOID lpData )

Thread proc to iterate the records
Public function void

Uninitialize()

Clean the data (incase we are static)
Private function BOOL

WasTimedout( unsigned short usID )

Did we timeout

'Friends' icon -- Shortcut to top of page. Friends

class CDNSSocket

'Custom Code' icon -- Shortcut to top of page. Custom Code

'Implementation Details' icon -- Shortcut to top of page. Implementation Details

File(s)
C:\dev\Komodia\KomodiaDNS\DNSManager.cpp
C:\dev\Komodia\KomodiaDNS\DNSManager.h
Header Includes
ErrorHandler.h     
PeriodicThread.h     
DNSAnswers.h     
string     
map     
Source Includes
stdafx.h     for precompiled header directive
DNSManager.h     
ErrorHandlerMacros.h     
Array_ptr.h     
OSManager.h     
GenericCriticalSection.h     
GenericThread.h     
ThreadPool.h     
DNSSocket.h     
DNSQuery.h     
memory     
Owner
tcpip4
Last Modified
23/02/2003 22:34:03 PM

Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.