//////////////////////////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012 Microsoft Corporation. All Rights Reserved. // // Module Name: // HelperFunctions_ICMPMessages.h // // Abstract: // This module contains prototypes for kernel helper functions that assist with ICMP Message // packets. // // Author: // Dusty Harper (DHarper) // // Revision History: // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // //////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef HELPERFUNCTIONS_ICMP_MESSAGES_H #define HELPERFUNCTIONS_ICMP_MESSAGES_H /* ICMP V4 Echo Message

ICMP Type 0 = Echo Request
8 = Echo Reply

ICMP Code 0
*/ typedef struct _ECHO_MESSAGE_ { UINT16 identifier; UINT16 sequence; BYTE pStartOfData[1]; }ECHO_MESSAGE, *PECHO_MESSAGE; /* ICMP V4 Destination Unreachable Message

ICMP Type 3

ICMP Code 0 = Network Unreachable
1 = Host Unreachable
2 = Protocol Unreachable
3 = Port Unreachable
4 = Fragmentation needed but IP Header's Don't Fragment Flag is set
5 = Source Route Failed
*/ typedef struct _DESTINATION_UNREACHABLE_MESSAGE_ { UINT32 unused; IPV4_HEADER originalIPHeader; BYTE pOriginalData[64]; }DESTINATION_UNREACHABLE_MESSAGE, *PDESTINATION_UNREACHABLE_MESSAGE; /* ICMP V4 Source Quench Message

ICMP Type 4

ICMP Code 0
*/ typedef struct _SOURCE_QUENCH_MESSAGE_ { UINT32 unused; IPV4_HEADER originalIPHeader; BYTE pOriginalData[64]; }SOURCE_QUENCH_MESSAGE, *PSOURCE_QUENCH_MESSAGE; /* ICMP V4 Redirect Message

ICMP Type 5

ICMP Code 0 = Redrect datagrams for the Network
1 = Redrect datagrams for the Host
2 = Redrect datagrams for the Type of Service and Network
3 = Redrect datagrams for the Type of Service and Host
*/ typedef struct _REDIRECT_MESSAGE_ { UINT32 gatewayInternetAddress; IPV4_HEADER originalIPHeader; BYTE pOriginalData[64]; }REDIRECT_MESSAGE, *PREDIRECT_MESSAGE; /* ICMP V4 Time Exceeded Message

ICMP Type 11

ICMP Code 0 = Time To Live exceeded in transit
1 = Fragment reassembly time exceeded
*/ typedef struct _TIME_EXCEEDED_MESSAGE_ { UINT32 unused; IPV4_HEADER originalIPHeader; BYTE pOriginalData[64]; }TIME_EXCEEDED_MESSAGE, *PTIME_EXCEEDED_MESSAGE; /* ICMP V4 Parameter Problem Message

ICMP Type 12

ICMP Code 0 = Pointer indicates the error
*/ typedef struct _PARAMETER_PROBLEM_MESSAGE_ { UINT8 pointer; BYTE pUnused[3]; IPV4_HEADER originalIPHeader; BYTE pOriginalData[64]; }PARAMETER_PROBLEM_MESSAGE, *PPARAMETER_PROBLEM_MESSAGE; /* ICMP V4 Timestamp Message

ICMP Type 13 = Timestamp Request
14 = Timestamp Reply

ICMP Code 0
*/ typedef struct _TIMESTAMP_MESSAGE_ { UINT16 identifier; UINT16 sequence; UINT32 originateTimestamp; UINT32 receiveTimestamp; UINT32 transmitTimestamp; }TIMESTAMP_MESSAGE, *PTIMESTAMP_MESSAGE; /* ICMP V4 Information Message

ICMP Type 15 = Information Request
16 = Information Reply

ICMP Code 0
*/ typedef struct _INFORMATION_MESSAGE_ { UINT16 identifier; UINT16 sequence; }INFORMATION_MESSAGE, *PINFORMATION_MESSAGE; #endif /// HELPERFUNCTIONS_ICMP_MESSAGES_H