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();

'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 (m_ICMPHeader->ICMPType==ICMP_Timestamp || m_ICMPHeader->ICMPType==ICMP_Timestamp_Reply)
    {
        m_ICMPHeader->ICMP_Originate_Timestamp=htonl(m_ICMPHeader->ICMP_Originate_Timestamp);
        m_ICMPHeader->ICMP_Receive_Timestamp=htonl(m_ICMPHeader->ICMP_Receive_Timestamp);
        m_ICMPHeader->ICMP_Transmit_Timestamp=htonl(m_ICMPHeader->ICMP_Transmit_Timestamp);
    }


    //Reverse ID and Sequence
    if (m_ICMPHeader->ICMPType==ICMP_Echo || m_ICMPHeader->ICMPType==ICMP_Echo_Reply)
    {
        m_ICMPHeader->sICMP.sUS.us1=htons(m_ICMPHeader->sICMP.sUS.us1);
        m_ICMPHeader->sICMP.sUS.us2=htons(m_ICMPHeader->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 © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.