![]() |
CTCPPortScanner | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: TCPPortScanner.h |
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
![]() |
ScanPair | m_aCurrentPair | Current pair we are working on |
![]() |
PortsList | m_aPortAnswers | List of all answers |
![]() |
PortsList | m_aPortList | Our answered ports list |
![]() |
DataMap | m_aPortsData | The ports data map |
![]() |
PortsVector | m_aPortsToScan | Our ports to scan |
![]() |
IP | m_aTarget | Our target |
![]() |
BOOL | m_bDone | Are we done ? |
![]() |
BOOL | m_bError | Did we have an error |
![]() |
BOOL | m_bFinished | Did we finish (not for user indication) |
![]() |
DWORD | m_dwTimeout | Timeout |
![]() |
int | m_iActiveSockets | Number of active sockets |
![]() |
int | m_iConnectionTimeout | Connection timeout |
![]() |
int | m_iMaxSockets | Number of max sockets |
![]() |
int | m_iReceiveData | Do we receive data |
![]() |
CGenericCriticalSection * | m_pCSection | Our CS |
![]() |
CGenericCriticalSection * | m_pCSectionDone | Done CS |
![]() |
CTCPPortScanner( const CTCPPortScanner& rScanner ) |
No copy Ctor | |
![]() |
Ctor and Dtor | ||
![]() |
CTCPScanner::CTCPScanner( CTCPPortScanner* pFather, unsigned short usPort, int iDataSize, DWORD dwTimeout ) |
![]() |
virtual | ||
![]() |
![]() |
void | AddPorts( unsigned short usFromPort, unsigned short usToPort ) |
Add ports to scan |
![]() |
int | AdjustNumberOfSockets( int iIncrement ) |
Adjust the number of sockets |
![]() |
virtual CTCPSocketAsync * | AllocateSocket( unsigned short usPort ) const |
Actual a new socket Derived class should override this for their sockets |
![]() |
BOOL | CanScan() |
Do we have something to scan |
![]() |
BOOL | CTCPScanner::OnSocketClose( int iErrorCode ) |
|
![]() |
BOOL | CTCPScanner::OnSocketConnect( int iErrorCode ) |
|
![]() |
BOOL | CTCPScanner::OnSocketReceive( int iErrorCode ) |
|
![]() |
BOOL | ||
![]() |
void | Delete the ports map | |
![]() |
virtual void | DestroySocket( CTCPSocketAsync* pSocket ) const |
Unallocate the socket |
![]() |
static DWORD | DoneThread( LPVOID lpData ) |
Our thread |
![]() |
int | GetConnectionTimeout() const |
|
![]() |
const char * | GetData( unsigned short usPort ) const |
Get the data for the port |
![]() |
char * | GetDataForModify( unsigned short usPort ) const |
Get the data for the port |
![]() |
int | GetMaxSockets() const |
|
![]() |
unsigned short | Get the next port | |
![]() |
const PortsList & | GetPortList() const |
Get the ports list |
![]() |
int | GetReceiveDataSize() const |
|
![]() |
DWORD | GetReceiveDataTimeout() const |
|
![]() |
IP | GetTarget() const |
|
![]() |
BOOL | IsDone() const |
Status of the scanner |
![]() |
BOOL | IsError() const |
|
![]() |
BOOL | IsFinished() const |
Are we finished (before done, for internal uses) |
![]() |
BOOL | Create a new socket | |
![]() |
virtual void | OnPort( unsigned short usPort, BOOL bConnected ) |
Events for user to override Port status usPort - The port bConnected - Did we manager to connect? |
![]() |
virtual void | OnPortData( unsigned short usPort, const char* pData, int iDataSize ) |
Port status with data (port sent data) usPort - The port pData - The data iDataSize - The data size |
![]() |
CTCPPortScanner & | operator =( const CTCPPortScanner& rScanner ) |
No copy operator |
![]() |
virtual void | PortScanned( unsigned short usPort ) |
Port was scanned (no resolution yet, for lib to overide) |
![]() |
void | Reset the data | |
![]() |
void | Reset pair data | |
![]() |
void | Reset the socket count | |
![]() |
virtual BOOL | Scan( const std::string& rDestinationAddress )=0 |
Do the scan |
![]() |
virtual BOOL | Scan( IP aTarget )=0 |
|
![]() |
void | ScanDone( BOOL bError, BOOL bSpawnThread=TRUE ) |
We are done |
![]() |
void | SetConnectionTimeout( int iMS ) |
Set/get the connection timeout |
![]() |
void | SetDone( BOOL bDone ) |
Set the done flag |
![]() |
void | SetError( BOOL bError ) |
Set there's an error |
![]() |
void | SetMaxSockets( int iMaxSockets ) |
Set/get max sockets |
![]() |
void | SetReceiveData( int iMaxDataSize, DWORD dwTimeout ) |
Set/get we can receive data (0 for none) |
![]() |
void | SetTarget( IP aTarget ) |
Set/get the target address |
![]() |
void | SocketDone( unsigned short usPort, BOOL bConnected ) |
When socket is done |
![]() |
void | SocketDone( unsigned short usPort, char* pData, int iDataSize ) |
Socket done and received data |
![]() |
virtual BOOL | StopScan() |
Stop the scan |
![]() |
virtual void | TCPScanDone( BOOL bError ) |
Scan is done (for user to override) |
![]() |
virtual void | TCPScanDoneLib( BOOL bError ) |
Scan is done (for library) |
CTCPScanner |
TCPSocketAsync.h | |
deque | |
map | |
set |
stdafx.h | for precompiled header directive |
TCPPortScanner.h | |
ErrorHandlerMacros.h | |
OSManager.h | |
GenericCriticalSection.h | |
ThreadPool.h | |
GenericThread.h |
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |