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

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

void ReverseHeader(
    LPICMPHeader pHeader);

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

Reverse the header (big little endian)

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

try
{
    //Reverse timestamps
    if (pHeader->ucICMPType==ICMP_Timestamp || pHeader->ucICMPType==ICMP_Timestamp_Reply)
    {
        pHeader->ulICMP_Originate_Timestamp=htonl(pHeader->ulICMP_Originate_Timestamp);
        pHeader->ulICMP_Receive_Timestamp=htonl(pHeader->ulICMP_Receive_Timestamp);
        pHeader->ulICMP_Transmit_Timestamp=htonl(pHeader->ulICMP_Transmit_Timestamp);
    }


    //Reverse ID and Sequence
    if (pHeader->ucICMPType==ICMP_Echo ||
        pHeader->ucICMPType==ICMP_Echo_Reply ||
        pHeader->ucICMPType==ICMP_Time)
    {
        pHeader->sICMP.sUS.us1=htons(pHeader->sICMP.sUS.us1);
        pHeader->sICMP.sUS.us2=htons(pHeader->sICMP.sUS.us2);
    }
}
ERROR_HANDLER("ReverseHeader")

'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 © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.