Main Page | Class List | File List | Class Members | File Members

icmp.h File Reference

#include <windows.h>

Include dependency graph for icmp.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagIP_HEADER
struct  tagICMP_HEADER

Defines

#define ICMP_ECHO_REPLY   0
#define ICMP_ECHO_REQUEST   8
#define ICMP_DESTINATION_UNREACHABLE   3
#define ICMP_TIME_EXCEEDED   11

Typedefs

typedef tagIP_HEADER IP_HEADER
typedef tagICMP_HEADER ICMP_HEADER

Functions

void FillICMPData (char *pData, int size)
USHORT IPChecksum (USHORT *pBuffer, int nSize)
void EncodePacket (char *pPacket, int iDataSize, USHORT uSequence)
bool DecodePacket (char *pPacket, int iSize, USHORT &uSequence, LONGLONG &llTick)


Define Documentation

#define ICMP_DESTINATION_UNREACHABLE   3
 

Definition at line 7 of file icmp.h.

Referenced by DecodePacket().

#define ICMP_ECHO_REPLY   0
 

Definition at line 5 of file icmp.h.

Referenced by DecodePacket().

#define ICMP_ECHO_REQUEST   8
 

Definition at line 6 of file icmp.h.

Referenced by EncodePacket().

#define ICMP_TIME_EXCEEDED   11
 

Definition at line 8 of file icmp.h.

Referenced by DecodePacket().


Typedef Documentation

typedef struct tagICMP_HEADER ICMP_HEADER
 

typedef struct tagIP_HEADER IP_HEADER
 


Function Documentation

bool DecodePacket char *  pPacket,
int  iSize,
USHORT &  uSequence,
LONGLONG &  llTick
 

Definition at line 57 of file icmp.cpp.

References tagICMP_HEADER::cksum, tagICMP_HEADER::code, tagIP_HEADER::h_len, ICMP_DESTINATION_UNREACHABLE, ICMP_ECHO_REPLY, ICMP_TIME_EXCEEDED, tagICMP_HEADER::id, IPChecksum(), and tagICMP_HEADER::seq.

Referenced by main().

Here is the call graph for this function:

void EncodePacket char *  pPacket,
int  iDataSize,
USHORT  uSequence
 

Definition at line 40 of file icmp.cpp.

References tagICMP_HEADER::cksum, tagICMP_HEADER::code, FillICMPData(), ICMP_ECHO_REQUEST, tagICMP_HEADER::id, IPChecksum(), tagICMP_HEADER::seq, and tagICMP_HEADER::type.

Referenced by main().

Here is the call graph for this function:

void FillICMPData char *  pData,
int  size
 

Definition at line 7 of file icmp.cpp.

References ICMPDATATEMPLATE.

Referenced by EncodePacket().

USHORT IPChecksum USHORT *  pBuffer,
int  nSize
 

Definition at line 22 of file icmp.cpp.

Referenced by DecodePacket(), and EncodePacket().


Generated on Sun Jun 26 13:43:52 2005 for pingem by  doxygen 1.4.3