![]() |
ReverseHeader() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: ICMPSocket.h |
Declaration
void ReverseHeader(
LPICMPHeader pHeader);
DescriptionReverse the header (big little endian)
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
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. |