| CICMPSocket:: ReverseHeader() |

Private Function | Declared in: ICMPSocket.h

## Declaration

    void ReverseHeader();

## Description

Reverse the header (big little endian)

## 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

Class Overview | CSpoofSocket | Hierarchy Chart

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.