Class CICMPSocket::
Send()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: ReverseHeaderNext page: SendEcho    Show member index
Private Function Declared in:
ICMPSocket.h

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

BOOL Send(
    LPCSTR lpDestinationAddress,
    unsigned char cICMP,
    unsigned char cType);

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

Send the data

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Generic ICMP send
    LPICMPHeader lpHead;
    lpHead=ConstructICMP();

    if (!lpHead)
    {
        ReportError("Send","Failed to construct ICMP header!");
        return FALSE;
    }

    lpHead->ICMPType=cICMP;
    lpHead->ICMPCode=cType;

    //And the checksum
    lpHead->ICMPChecksum=CalculateChecksum((unsigned short*)lpHead,ICMPHeaderLength);

    //Send it
    BOOL bSend;
    bSend=CSpoofSocket::Send(lpDestinationAddress,(char*)lpHead,ICMPHeaderLength);

    //Clear up
    delete lpHead;

    return bSend;
}
ERROR_HANDLER_RETURN("Send",FALSE)

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CSpoofSocket  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!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: 24 Apr 2001.