| CSpoofBase |

Class | Declared in: SpoofBase.h

## Overview

Copyright (c) 2000 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 Email: barak@komodia.com

---------------------------------------------------------------------------

Handles basic errors

Hierarchy Chart

## Data Items

| static BOOL | m_bMultiThreaded | Are we multithreaded
| static BOOL | m_Initialized | Are we initialized
| mutable int | m_LastError | Last error we had
| CSpoofLog * | m_LocalLog | If we have a local log
| static CSpoofLog * | m_Log | CSpoofLog start
| mutable LPSTR | m_lpClassName | Our class name
| static int | m_NumberOfThreads | Number of threaded
| static `CGenericCriticalSection` * | m_pCSection | Our critical section
| static `CSpoofBase` * | m_pShutdownClass | Class to notify

## Constructors

|  | CSpoofBase() | ctor and dtor
|  | CSpoofLog::CSpoofLog() |

## Destructors

| virtual | ~CSpoofBase() |
|  | CSpoofLog::~CSpoofLog() | CSpoofLog end

## Functions

| int | GetLastError() const | Get the last error
| `CSpoofBase`::CSpoofLog * | GetLog() const | Get the correct log
| static int | GetNumberOfThreads() | Get the number of threads
| static BOOL | InitializeSockets( BOOL bMultiThreaded=FALSE, int iNumberOfThreads=0 ) | Initialize the sockets
| static BOOL | IsInitialized() | Are we initialized
| static BOOL | IsMultiThreaded() | Are we multithreaded
| static char FAR * | LongToString( long lAddr ) | Convert long to string
| virtual void | NotifyShutdown() | Shutdown notifier
| void | RegisterShutdown( `CSpoofBase`* pBase ) | Register shutdown class
| void | ReportError( LPCSTR lpMethod ) const | Report an unknown error (use GetLastError)
| void | ReportError( LPCSTR lpMethod, LPCSTR lpMessage ) const | Report an error
| virtual void | ReportError( LPCSTR lpMethod, int iErrorCode ) const | Report and error
| static void | ReportStaticError( LPCSTR lpClass, LPCSTR lpMethod ) | Report an unknown error (use GetLastError)
| static void | ReportStaticError( LPCSTR lpClass, LPCSTR lpMethod, LPCSTR lpMessage ) | Report an unknown error (use GetLastError)
| void | SetLastError( LPCSTR lpMethod ) const | Set the socket last error
| void | SetLastError( LPCSTR lpMethod, int iErrorCode ) const |
| void | SetLocalLog( CSpoofLog* pLog ) | Set the local log
| static void | SetLog( CSpoofLog* pLog ) | Save a new log
| void | SetName( LPCSTR lpName ) const | Set the name of the current class
| static BOOL | ShutdownSockets() | Shutdown the sockets

## Custom Code

- Custom Code in Header Before Includes (62 bytes)
- Custom Code in Header After Includes (988 bytes)
- Custom Code in Header Public Section (447 bytes)

## Implementation Details

File(s)
  C:\dev\Komodia\SpoofBase.cpp
  C:\dev\Komodia\SpoofBase.h

Header Includes

  winsock2.h |
  defined(WIN32)
  ws2tcpip.h |
  defined(WIN32)
  UnixTypes.h |
  !defined(WIN32)
  sys/types.h |
  !defined(WIN32)
  sys/socket.h |
  !defined(WIN32)
  netinet/in.h |
  !defined(WIN32)
  arpa/inet.h |
  !defined(WIN32)
  netdb.h |
  !defined(WIN32)
  GenericCriticalSection.h |

Source Includes

  stdafx.h | for precompiled header directive
  SpoofBase.h |
  OSManager.h |

Owner
  LibV3

Last Modified
  26-Jun-01 3:01:35 PM

This web site was generated using Surveyor V4.50.811.1. Click here for more information. | Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.