Class CWhoisSocket Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: Custom Code in Source After IncludesNext page: m_aData    Show member index
Class Declared in:
WhoisSocket.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 CTCPSocketAsync

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

Private data static WhoisMAP m_aData Our data map
Private data static std::string m_aIPWhois[wsLast] Our IP whois
Private data WhoisServer m_aProgress Where are we
Private data WhoisServer m_aServer Server we searched
Private data static CWhoisSocket m_aSocket Our building instance
Private data static std::string m_aWhoisNotFound[wsLast] Whois not found strings
Private data BOOL m_bAdditionalServer Does our whois server has additional whois servers
Private data BOOL m_bAsync Are we async
Private data BOOL m_bDone Are we whoising ?
Private data BOOL m_bError Did we have an error
Private data BOOL m_bURL What trace are we doing
Private data DWORD m_dwTimeout Our timeout
Private data char * m_pData The whois data
Private data std::string m_sAdditionalWhoisServer Do we have another whois server
Private data static std::string m_sData[] Our extensions
Private data std::string m_sDataToSend Data to send
Private data static std::string m_sEmpty Empty string
Private data static const std::string m_sWhoisClause Our whois clause
Private data std::string m_sWhoisData The whois data
Private data unsigned long m_ulDataSize Data size

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

Private constructor

CWhoisSocket()

ctor for map build
Public constructor

CWhoisSocket( BOOL bAsync )

Ctor and Dtor

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

Public destructor virtual

~CWhoisSocket()

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

Public function static CWhoisSocket::AddressVector

AnalyzeAddress( const std::string& rAddress )

Break an address
Public function virtual BOOL

Create()

Create this socket as a regular socket
Private function std::string

ExtractAdditionalWhoisServer( const std::string rWhoisQuery ) const

Extract the addtional DNS server
Public function const std::string &

GetAdditionalWhoisServer() const

Get the additional whois server
Public function static std::string

GetAddressForWhois( const std::string& rAddress )

Get an address for whois
Public function const std::string &

GetLastTarget() const

Get the target server
Public function const std::string &

GetWhoisData() const

Get the whois data
Protected function const std::string &

GetWhoisServer( const std::string& rURL ) const

Public function virtual BOOL

IsError() const

Did we have an error
Public function BOOL

IsIPTrace() const

Get type of trace
Public function virtual BOOL

IsWhoisDone() const

Are we done
Private function void

ModifyBuffer( char* pBuffer, int iBufferSize ) const

Modify the buffer
Private function void

ModifyString( std::string& rString ) const

Process a string and modify it's 10
Protected function virtual BOOL

OnSocketClose( int iErrorCode )

Protected function virtual BOOL

OnSocketConnect( int iErrorCode )

Protected function virtual BOOL

OnSocketReceive( int iErrorCode )

Protected function virtual BOOL

OnSocketTimeout()

Socket events
Private function static void

PopulateMap()

Populate the map
Private function void

QueryDone( BOOL bError, BOOL bReallocate )

Set the query is done
Private function BOOL

ReceiveWhois()

Receive data from the whois
Private function BOOL

SendURL( const std::string& rURL )

Send the URL
Public function void

SetWhoisTimeout( DWORD dwMS )

Set the timeout
Protected function virtual void

WhoisDone( BOOL bError )

Overide when the query is done
Public function BOOL

WhoisIP( const std::string& rIP )

Trace an IP
Public function BOOL

WhoisIP( IP aAddress )

Public function BOOL

WhoisIP( IP aAddress, const std::string& rWhoisServer )

Public function BOOL

WhoisURL( const std::string& rURL )

Trace a URL
Public function BOOL

WhoisURL( const std::string& rURL, const std::string& rWhoisServer )

'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\KomodiaIPUtils\WhoisSocket.cpp
C:\dev\Komodia\KomodiaIPUtils\WhoisSocket.h
Header Includes
TCPSocketAsync.h     
map     
vector     
Source Includes
stdafx.h     for precompiled header directive
WhoisSocket.h     
ErrorHandlerMacros.h     
Owner
tcpip4
Last Modified
21/02/2003 19:07:28 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.