Class CICMPSocket Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: Custom Code in Source After IncludesNext page: m_pICMPHeader    Show member index
Class Declared in:
ICMPSocket.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 CSpoofSocket

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

Private data LPICMPHeader m_pICMPHeader The ICMP header
Private data LPICMPHeader m_pICMPICMPHeader The ICMP ICMP header
Private data LPIpHeader m_pICMPIPHeader The ICMP IP header
Private data char * m_pICMPReceiveData ICMP receive data
Private data LPIpHeader m_pIPHeader The IP header
Private data const char * m_pSendBuffer Our send buffer
Private data unsigned short m_usBufferSendSize Our send buffer size
Private data unsigned short m_usDataSize The data size

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

Private constructor

CICMPSocket( const CICMPSocket& rICMP )

No copy Ctor
Public constructor

CICMPSocket( BOOL bRawSocket )

Ctor and Dtor

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

Public destructor virtual

~CICMPSocket()

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

Protected function virtual LPICMPHeader

ConstructICMP() const

Construct an ICMP header
Public function virtual BOOL

Create()

Create an ICMP socket
Protected function virtual void

FinalICMPHeader( LPICMPHeader lpHead ) const

Modify the ICMP
Protected function int

GetBufferSize() const

Get the send buffer size
Public function const char *

GetLastData() const

Get the last data
Public function unsigned long

GetLastDataSize()

Get the last ICMP data size
Public function const LPICMPHeader

GetLastICMPHeader() const

Get the last ICMP header
Public function const LPICMPHeader

GetLastICMPICMPHeader() const

Get the last ICMP - ICMP header
Public function const LPIpHeader

GetLastICMPIPHeader() const

Get the last ICMP - IP header
Public function const LPIpHeader

GetLastIPHeader() const

The the last IP header
Protected function const char *

GetSendBuffer() const

Get the send buffer
Private function CICMPSocket &

operator =( CICMPSocket& rSocket )

No assigment operator
Protected function virtual BOOL

ProccessICMP( const char* pBuffer )

Proccess incoming ICMP data
Private function void

ReverseHeader( LPICMPHeader pHeader )

Reverse the header (big little endian)
Private function BOOL

Send( IP aDestinationAddress, unsigned char ucICMP, unsigned char ucType )

Send the data
Public function BOOL

SendEcho( const std::string& rDestinationAddress, BOOL bReply, unsigned short usIdentifier, unsigned short usSequence, unsigned long ulData )

Public function BOOL

SendEcho( IP aDestinationAddress, BOOL bReply, unsigned short usIdentifier, unsigned short usSequence, unsigned long ulData )

Protected function BOOL

SendICMP( LPICMPHeader lpHead, const std::string& rDestinationAddress )

Send all ICMP data with headers
Protected function BOOL

SendICMP( LPICMPHeader lpHead, IP aDestinationAddress )

Public function BOOL

SendInformation( const std::string& rDestinationAddress, BOOL bReply, unsigned short usIdentifier, unsigned short usSequence )

Send ICMP messages according to the name
Public function BOOL

SendInformation( IP aDestinationAddress, BOOL bReply, unsigned short usIdentifier, unsigned short usSequence )

Public function BOOL

SendParameter( const std::string& rDestinationAddress, unsigned char ucError )

Public function BOOL

SendParameter( IP aDestinationAddress, unsigned char ucError )

Public function BOOL

SendQuench( const std::string& rDestinationAddress )

Public function BOOL

SendQuench( IP aDestinationAddress )

Public function BOOL

SendRedirect( const std::string& rDestinationAddress, unsigned char ucType, const std::string& rGatewayAddress )

Public function BOOL

SendRedirect( IP aDestinationAddress, unsigned char ucType, IP aGatewayAddress )

Public function BOOL

SendTime( const std::string& rDestinationAddress, unsigned char ucType )

Public function BOOL

SendTime( IP aDestinationAddress, unsigned char ucType )

Public function BOOL

SendTimestamp( const std::string& rDestinationAddress, BOOL bReply, unsigned short usIdentifier, unsigned short usSequence, unsigned long ulOriginateTimestamp, unsigned long ulReceiveTimestamp, unsigned long ulTransmitTimestamp )

Public function BOOL

SendTimestamp( IP aDestinationAddress, BOOL bReply, unsigned short usIdentifier, unsigned short usSequence, unsigned long ulOriginateTimestamp, unsigned long ulReceiveTimestamp, unsigned long ulTransmitTimestamp )

Public function BOOL

SendUnreachable( const std::string& rDestinationAddress, unsigned char ucType )

Public function BOOL

SendUnreachable( IP aDestinationAddress, unsigned char ucType )

Public function void

SetSendBuffer( const char* pBuffer, unsigned short usSendSize )

Set the buffer to send (the socket just keeps the address of the buffer, user has to keep it legal as long as the socket is alive)

'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\ICMPSocket.cpp
C:\dev\Komodia\ICMPSocket.h
Header Includes
SpoofSocket.h     
Source Includes
stdafx.h     for precompiled header directive
ICMPSocket.h     
ErrorHandlerMacros.h     
memory     
Owner
tcpip4
Last Modified
12/02/2003 16:04:34 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.