| CICMPSocket |

Custom Code in Header After Includes | Declared in: ICMPSocket.h

## Custom Code

    // Regular ICMP Header
    typedef struct _ICMPHeader
    {
      unsigned char         ICMPType;
      unsigned char         ICMPCode;           // Type sub code
      unsigned short        ICMPChecksum;
      union
      {
          struct {unsigned char uc1,uc2,uc3,uc4;} sUC;
          struct {unsigned short us1,us2;} sUS;
          unsigned long sUL;
      } sICMP;
      unsigned long         ICMP_Originate_Timestamp; // Not standard field in header, but reserved nonetheless
      unsigned long         ICMP_Receive_Timestamp;
      unsigned long         ICMP_Transmit_Timestamp;
    } ICMPHeader;
    typedef ICMPHeader FAR * LPICMPHeader;
    #define ICMPHeaderLength sizeof(ICMPHeader)

    // ICMP data size
    #define ICMP_DATA_SIZE 8

    // ICMP Message unreachable
    #define ICMP_Unreachable 3
    #define ICMP_Unreachable_SIZE 8
    #define ICMP_Unreachable_NET 0
    #define ICMP_Unreachable_HOST 1
    #define ICMP_Unreachable_PROTOCOL 2
    #define ICMP_Unreachable_PORT 3
    #define ICMP_Unreachable_FRAGMENTATION 4
    #define ICMP_Unreachable_SOURCE 5

    // ICMP Time exceeded
    #define ICMP_Time 11
    #define ICMP_Time_TRANSIT 0
    #define ICMP_Time_FRAGMENT 1

    // ICMP Parameter problem
    #define ICMP_Parameter 12
    #define ICMP_Parameter_ERROR 0

    // ICMP Source quench
    #define ICMP_Quench 4

    // ICMP Redirect
    #define ICMP_Redirect 5
    #define ICMP_Redirect_NETWORK 0
    #define ICMP_Redirect_HOST 1
    #define ICMP_Redirect_SERVICE_NETWORK 2
    #define ICMP_Redirect_SERVICE_HOST 3

    // ICMP Echo
    #define ICMP_Echo 8
    #define ICMP_Echo_Reply 0

    // ICMP Timestamp
    #define ICMP_Timestamp 13
    #define ICMP_Timestamp_Reply 14

    // ICMP Information request
    #define ICMP_Information 15
    #define ICMP_Information_Reply 16
    #define ICMP_Information_SIZE 8

    //Max buf
    #define ICMP_BUF 100

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